-
Notifications
You must be signed in to change notification settings - Fork 252
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
[CPVM] Add support for optional pack the pinned transitive dependencies. #10115
Comments
Hello, Good catch on that, the behavior seen in
As a library author, I might not be whiling to apply this I really think that as it look like, this will kill the adoption of it for all library author OpportunityThis feature is not activated by default Side effectsConsumer madnessAs a consumer I won't be able to understand anymore what the library I consume directly depends on. Funny Scenario
Your consumer will never be able to get rid of I am aware that
NetworkThis also means that when the dependencies tree will change, the |
As you all know, we are working very hard to use your user feedback to make our decisions for Central Package Version Management. @kevinchalet and @tebeco have noticed a change in the way that transitive dependency pinning works with CPVM. For web services, applications, and scripts, it should heave a smaller impact. For library authors, it could lead to transitive dependencies leaking across packages. We changed the transitive behavior for CPVM based on feedback from some of our internal teams, and we have tried to design the feature to maximize the chances that a dependency will be available if it is referenced. We want to understand from you, our users, what behavior you want to see in the .NET 5 SDK GA release. Example Directory.Packages.props<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- foo has a dependency on bar v2 -->
<PackageVersion Include="foo" Version="1" />
<PackageVersion Include="bar" Version="3" />
</ItemGroup>
</Project> Example.csproj<Project>
<ItemGroup>
<PackageReference Include="foo"/>
</ItemGroup>
</Project> Example Outputs
Questions
|
The The |
BTW, the behavior of E.g: Example Directory.Packages.props
Example.csproj
|
I think having the choice is the key here Questions
Same for both, I try to always have the latest bits but having a lockfile. This allows on the consumer side to quickly pin what I depend on so I keep being in control So I guess it's the "old behavior"
If my lib depends on another lib Now what the pinning intend to make sure that when you resolves the dependency tree, you could resolve VERY OLD version Though, what I'm aiming at (and this is a very personal opinion, is to have a boolean to tell nuget to resolve the latest even if it breaks me.
Update are "on demands" and can be easily automated on CI local branch:
This reminds me of this issue a bit where the idea is a => give back the choice to the owner of the developper that will run Aside nugetWe've used The previous "OPT_IN" mentioned earlier is what I would love to have: |
I also think that it is better to make the "No Transitive Pinning" behaviour to be the default one. It is exactly as @kevinchalet said, the default behaviour should be consistent with how |
I think transitive pinning would make the most sense for the reason given in the description. But I have no objection to it being an optional behavior. My preference would be to make transitive pinning be on by default. |
#10578 seems to be an example of undesired pinned transitive dependencies. |
There are more upvotes and engagement in #10389 than this issue (plus a PR linking to that issue), so closing this one as a duplicate. |
Hi everyone, There's some differing opinions on whether or not an opt-in or opt-out experience for transitive pinning is desired. To learn more from people on this thread, I'd love to invite you all to talk directly to the NuGet team about your thoughts on transitive pinning & central package version management as a whole. You can schedule a call with us here: Your feedback will really help us out! Otherwise, if you'd like to leave some thoughts/feedback on #10389, it would be greatly appreciated. |
Details about Problem
One of the features that CPVM supports is enforcing transitive dependencies to the central defined versions. As all the testing and development for an application is done using the specified dependency set, on pack the enforced/pinned transitive dependencies are packed as well.
However this may not be the desired experience for some of the scenarios.
Suggestion
Consider to optional pack the transitive dependencies .
Related with: openiddict/openiddict-core#1113
The text was updated successfully, but these errors were encountered: