New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tvloader: Error when Snippet does not immediately follow its File section #124
Comments
Thanks for filing this @CatalinStratu -- I'm taking a look now to see whether this is an issue with the example / sample document, or with the tvloader parser. As mentioned here, note though that I think the files being compared in this example are not actually identical. That shouldn't cause the parsing issue here, but just flagging to avoid confusion. |
example_licensediff
when two equal files are entered as input
OK -- so it looks like this is a parsing error in tvloader, due to an ambiguity in the SPDX spec. See spdx/spdx-spec#651 for more details. Basically, one possible reading of the spec says that, for tag-value files, a Snippet section should always come immediately after the File section that "contains" it. But a different reading is just that the Snippet needs to be somewhere after the corresponding File, even if it's not immediately after it. The current tvloader code takes the first reading, and because of that it assumes that a We'll need to see how spdx/spdx-spec#651 is resolved before we can address this here. That means we'll kick this down the road to 0.4.0. In the meantime, for the 0.3.0 release I'm going to add another different sample document, so that example 6 can be run without erroring out. |
@swinslow I would like to work on this issue, can you give me some suggestions on where I can look for the problem? Thanks! |
This problem was solved in the PR #133 |
When two identical files are inserted, the error below appears.
The file that I used when I identified this error is: https://github.com/spdx/spdx-spec/blob/development/v2.2.2/examples/SPDXTagExample-v2.2.spdx
I want to mention that the SnippetSPDXID tag is in both files.
The text was updated successfully, but these errors were encountered: