How are build systems supposed to choose configurations of transitive dependencies?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- build-system
Research direction
Start by reading the CPS specification sections covering components, Requires, and configurations, then review the nine comments for any emerging consensus. Compare the three approaches described in the issue and document clear guidance for build tools and packagers, including whether the approaches can coexist.
Written by the indexing model from the issue text.
Description
Say we have:
- A package
Awith a componentA.A:Ahas aRequiresonB:B. - A package
Bwith a componentB.B:Bhas two configurations,B-config1andB-config2.
And now say that the user of a CPS-compatible build tool wants to build their project against A:A. The build tool will have to transitively process B:B, and will have to choose whether it consumes the B-config1 configuration or the B-config2 one. How do you envision that tools should do this? I can think of three different approaches:
- The user of the build tool explicitly specifies the desired configurations even for their transitive dependencies. So the user, somewhere in their build config, would have to specify "For
B:B, I want to useB-config1". This is not very scalable, specially as dependency trees become deeper and deeper. For deep dependency trees, the user might not even know aboutB, so they wouldn't necessarily be capable of choosing betweenconfig1andconfig2. Requiresin components should explicitly specify their desired configs.A:A, instead ofRequiresingB:B, would explicitly requireB:B@B-config1(which is already permitted by the specification). This is an expectation we would be placing on packagers.- Packages only define configurations with semantics that are well known to the build tool. When the build tool finds
B-config1, it doesn't know whatB-config1means, so it cannot choose for the user. However, if the configurations were juststaticandshared, the build tool could choose itself to usestaticif the user expressed a preference for static linking. Build tools could support other well-known configuration names, and packages and components would be created that provide only such well-known configurations. This would imply a contract between package manager/packagers/build tools about what configuration names have well-known semantics (likestatic,shared, ...)
The specification doesn't necessarily have to prescribe one of these three options. The current version allows for the three, and it would be a matter of how the ecosystem grows around it. Perhaps the three can coexist for different use-cases.
But maybe you already have something in mind, and it could be useful to provide guidance in the site.
- Dominant language
- Python
- Stars
- 191
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from cps-org/cps
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 40/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
fix formatting of the sample database page of the docsPossibly taken @Aaqibhafeezkhan claimed this today. Opendocumentation good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 72/100
chaoss/CollectOSS#544 · 1 comment ·
Maintainers usually reply within 1 day
-
area/plugin good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kestra-io/plugin-soda#137 ·
-
Difficulty 2/5 Half a day Newbie friendliness 62/100
ibm-granite/granite.build#504 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day