Dist Tags for NuGet or advanced pre-release Wildcards #12011
Replies: 2 comments 2 replies
-
Fyi @joelverhagen @JonDouglas @nkolev92 ^ This sounds interesting, similar to github tagging. |
Beta Was this translation helpful? Give feedback.
-
It's a really interesting use case. The True Identity of a package is Version + ID + feed (barring mutability complexities). Do you think using a dedicated feed or ID would express this intent better? If we use a tagging aspect, it's almost like a fourth pivot that we can decide package selection based on. Said another way, we don't have to pivot on version necessarily. We could also consider pivoting on package ID or feed. Something that should be mentioned is that the * in version ranges means floating version. Calling it a wild card can maybe help a little bit but folks assumption about wild card in software world don't always translate well to NuGet floating versions. I think encoding this pattern into the package version and using the * character would cause problems. The package consumer might actually want the lowest version matching that pattern rather than opting into the floating version behavior. If changes to the core of package identity or version range syntax is not desired, the easiest way to achieve this in the current world is to have a dedicated feed per team. This is relatively easy on a Azure DevOps. |
Beta Was this translation helpful? Give feedback.
-
Hello there. 👋
I was wondering if the community ever discussed the following usecases:
alpha
,beta
etc. and a customer wants to consume exactly such a specific level and there the 'latest' version of it.1.0.0-alpha.team01.build.02
. Now a customer wants to consume packages from a specific branch/team and limit the set of pre-release versions to be considered further.With the current floating-version range possibilities in NuGet none of these use-cases seem to be possible and the whole version ranges and floating version topic is quite sensitive in NuGet.
For case 1 in the NPM world they have introduced dist-tags where you can additionaly flag versions with a tag and clients can consume those tags.
For case 2 I was thinking of more flexible wild-cards in the currently supported ranges like allowing
(1.0.*-alpha.team01.*, 1.0.9999)
where the*
are then the typical placeholders used for alphabetical sorting. We would then even like to parameterize this range with properties like(1.0.*-alpha.$(TeamBranch).*, 1.0.9999)
.I think the NPM and the wildcard approach would both fit our needs but there the implication is quite different.
The NPM apporach would mean a large scale adjustment in the NuGet ecosystems as all servers (nuget.org, lokal disk source, Artifactory, GitHub Packages,..) and clients (NuGet.exe, dotnet nuget, Rider) would need support for it.
The wildcard approach is likely something that could be maybe handled on the client side (filtering on the server like today, and then advanced filter on client side).
Disclaimer: This is more an enterprise level requirement where really many teams are working in parallel on multiple products and libraries and it would be the goal not to have clashes between the developed features.
Looking forward to some feedback on this idea and maybe how others have solved similar challenges.
Cheers
Daniel
Beta Was this translation helpful? Give feedback.
All reactions