Skip to content
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

[Question] Does this spec support to describe the transitivity and scope of dependencies #1121

Open
WestFarmer opened this issue Sep 24, 2024 · 2 comments
Labels
question Request for information or clarification

Comments

@WestFarmer
Copy link

In java's ecosystem, with maven as build tool.

when a project specify it depends on some libraries, those libraries can also depends on other libraries.

for example:

project P -> lib A -> lib B -> lib c

for project P, only lib A is called direct dependency, while B and C are called transitive dependencies.

and dependencies can have scope, for example a project P may depends on lib B, but only for running unit tests.

project P -> lib A 
         \-> lib B(test scope)

what's the corresponding concepts in this spec ?

@bact
Copy link
Collaborator

bact commented Sep 24, 2024

For scoping, I believe you can use LifecycleScopedRelationship

  • with scope = test
  • with relationshipType = dependsOn

https://spdx.github.io/spdx-spec/v3.0.1/model/Core/Classes/LifecycleScopedRelationship/

@bact bact added the question Request for information or clarification label Sep 26, 2024
@goneall
Copy link
Member

goneall commented Nov 14, 2024

Transitive dependencies are handles by creating relationship between the dependent library and their dependencies.

ie:

project P -> lib A : P dependsOn A
         \-> lib B(test scope) : A dependsOn, scope=test B

@goneall goneall added this to the release-independent milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Request for information or clarification
Projects
None yet
Development

No branches or pull requests

3 participants