Long strings when verifying an SPDX document with deeply nested relationships
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 71
- Forks
- 44
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 7
Description
With the fix for verifying related elements verify will now report any Relationship as invalid if it references an invalid Element, this will create one line for the package, and one line each for the the relationships that reference the package. What makes the worse is that it is recursive - so if a package has a relationship which references a different package with a different relationship that references the package with the invalid license, you'll get a very long String for the invalid relationship with all the intermediate relationship ID's.
Note that this is somewhat expected since we do want to report every element that has an issue even if it is indirect. However, we may want to figure out a way to short the verify messages.
An ideal solution (difficult to implement) would be to report the root verify issue and list all other issues that have a relationship with the root verify issue (e.g. "Invalid license found in Package-X. This package is referenced in relationshipA, relationshipB, ...")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing verification of related elements introduced by pull request #159 and inspect how recursive relationship errors are assembled. Define the desired concise message format while preserving reporting for every affected element. Add coverage for deeply nested relationships and verify that the resulting messages avoid repeating the full relationship chain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100