Update metadata contract to be backcompatible with SPDX 2.2 parser by pragnya17 · Pull Request #918 · microsoft/sbom-tool (original) (raw)

@pragnya17

The metadata class name was updated in an earlier PR (https://github.com/microsoft/sbom-tool/pull/860/files) which was a breaking change for consumers of the SPDX 2.2 parser. We are introducing this change to allow for backwards compatibility with the SPDX 2.2 parser and compatibility with the SPDX 3.0 parser.

@sfoslund

@sfoslund

sfoslund

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one other place we will need to change is SbomParser, which references SpdxMetadata right now in the GetMetadata method, making it not backwards compatible. Depending on how permanent we want these changes to be, we could do this by making ISbomParser generic depending on metadata type, or we can just temporarily revert it to only use the 2.2 metadata version

DaveTryon

DaveTryon

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left 1 question to consider.

@pragnya17

The one other place we will need to change is SbomParser, which references SpdxMetadata right now in the GetMetadata method, making it not backwards compatible. Depending on how permanent we want these changes to be, we could do this by making ISbomParser generic depending on metadata type, or we can just temporarily revert it to only use the 2.2 metadata version

Would you mind linking which file you're referring to? I looked through all the references of GetMetadata and it seems right to me

@sfoslund

@sfoslund

sfoslund

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})