-
Notifications
You must be signed in to change notification settings - Fork 258
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
Feature request: patch roll forward #6848
Comments
No I think think this should be a thing. It causes so many problems and would require the introduction of a lock file. Being able to marking a package deprecated makes sense so the client can earn but automatically rolling forward on patches causes other problems. PS: Nuget used to do this automatically and we removed that behavior because your package install graph changes depending on what day you installed it. This isn’t the case today unless somebody deletes packages from a feed |
ok, perhaps a bad start by proposing a solution. use-case: as a developer I want my application to include important fixes (especially: security fixes) |
From the discussion here, I'm assuming you're asking for an npm tilde equivalent in the nuspec? NuGet's implementation of ^ and ~ is *, but it's only used in package declaration, not in the nuspec. There's an ask for changing the pessimistic resolution strategy to Highest in the same issue. I'd like to dupe this out to #6770, add the comments there and continue the discussion. I'm with @davidfowl though, floating/bumping up versions is and should stay a consumption time feature. |
You should include that package as direct dependencies and control it's behavior to upgrade to include those important fixes. After having multiple discussions recently, I too think that it will be a bad design to allow consumers to control resolution strategy for transitive world, which will eventually end up creating more problems than solving few edge cases. |
I don't know what this tilde is, but if it is a wildcard version dependency, then: no, that is not what I'm asking. I want the maintainer of the package to be able to push me a more recent version when he thinks that is appropriate. The maintainer must be committed to provide such patch releases. So this doesn't apply to every package. The packages provided by Microsoft that make up .NET Core follow this model. Mechanisms are in place to provide users with the latest patched versions and make applications use that version (roll forward).
I may not even know I am using a package that has a security issue. |
We should consider how a developer would discover that such updates are available (currently I'm not aware of any tooling to help with this). We should also consider the impact of having to promote transitive dependencies to direct ones just for this purpose- as you no longer capture the intent of what you intend to directly reference, and may run into issues such as package downgrades as your dependencies get updated over time. |
Commands like outdated could be implemented to help discover NuGet packages that are not current. #5762 Note that not current doesn't mean bad, or unsafe. The npm ~ (tilde) is exactly what NuGet's * is. The difference is that, ~ can be both a consumer and author decision, while the * is a consumer time decision only. I think the OS parallel is not a great one. It's the equivalent of having all the packages with *s. Also all the packages are explicitly defined. No implicit transitive dependencies. |
Yes. For example, if I am using 'Microsoft.AspNetCore.All' version '2.0.6', there is no way for me to figure out '2.0.7' is available. I may not be depending on that package directly.
The maintainer knows this, but there is no way to convey this in his NuGet package.
I need to look into this a bit more.
Yes, for the OS it is the equivalent of having all the packages with '*' since they get updated automatically. I'm not sure what you mean by there being no implicit transitive dependencies. An OS will have very strict guidelines for what packages updates are allowed. For example: https://fedoraproject.org/wiki/Updates_Policy#Stable_Releases. If you can't live up to these rules your packages won't be part of the OS feeds. Similarly, patch forward doesn't apply to every NuGet package. This is why I'm suggesting the maintainer should be capable of expressing he is committed to update his packages in an appropriate way. |
When referencing dotnet/designs#36 I thought everything was fixed with a custom solution. However that design is also missing the ability to figure out the latest patch version:
New templates for ASP.NET Core 2.1 don't include a version number for the package, and have a similar limited awareness of the patch version. <PackageReference Include="Microsoft.AspNetCore.App" /> |
This feature request is inspired by dotnet/designs#36 which proposes automatic patch roll forward the .NET Core runtime used in self-contained apps.
Generalizing this for any NuGet package: allow marking a package to have 'patch roll forward' semantics. The maintainer can then provide patch releases, which are automatically consumed by new builds.
At some point, the maintainer will stop patching the version, so deprecating packages (#2867) is needed too.
CC @dsplaisted @natemcmaster
The text was updated successfully, but these errors were encountered: