-
Notifications
You must be signed in to change notification settings - Fork 56
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
SPDX tag-value parsing fails for ExternalDocumentRef in document. #195
Comments
Hi @surendrapathak -- a quick look makes me think your assessment is correct -- it looks like some processing got removed that would handle this. The tag-value format is very difficult for me to understand completely; one of the last SPDX WG meetings I was told that certain ordering of elements results in different processing. Is there some definition of the exact parsing rules that should be used? |
@kzantow Thanks for checking it out. Here is what I think is going on:
Assuming that's correct, the problem with this file is that If that's correct then the problem is with the SPDX generator itself (Zephyr SPDX builder) rather than this code. |
Hi @surendrapathak and @kzantow, Thanks for the comments on this. I don't think the issue is with the linked SPDX file being invalid. It passes validation using the SPDX online tools which I believe are using the SPDX java tools under the hood. I'm taking a look at the past and current tools-golang tag-value parser code, will circle back in a bit with a few thoughts. |
Removing 0.5.0 milestone tag since there is not yet a resolution near the release deadline. |
The attached file fails to parse with the following error message (please remove .txt before processing)
ExternalDocumentRef is a valid tag with 1+ cardinality, so this appears to be a bug.
My guess is we are missing ExternalDocumentReference check in this enumeration of tags: https://github.com/spdx/tools-golang/blob/main/spdx/v2/v2_2/tagvalue/reader/parse_creation_info.go#L26-L101
It got lost around this refactor: 460cf54#diff-dc282dc5935546282e5429e56eda94391c511ea039311c1d9db2f6501f730d4cL41
96b_aerocore2-hello_world-build.spdx.txt
The text was updated successfully, but these errors were encountered: