-
Notifications
You must be signed in to change notification settings - Fork 694
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
Add option to enable floating versions in CPM #5440
Conversation
0c3055a
to
3df7ed6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also enable floating versions in the PM UI?
How much work would it be for PM UI to read the |
3df7ed6
to
1e9f3e1
Compare
@jeffkl Probably a day for work and another day for testing, we are already reading the CPM enabled property and that decides if the combobox is going to be editable or not. Floating Versions in PM UI is only a project level feature, since this is more of a "Solution" level feature is it worth enabling it? |
@martinrrm I guess we might as well read the new property and allow the user to specify a floating version? If its only 1 day of work I think its worth it. I would also be interested in adding telemetry so we know how many users are enabling it. |
1e9f3e1
to
156032e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably already know, but just in case, we'll need to make dotnet/project-system change to have the new property flow through nominations.
CPM is considered an enterprise-level feature
I don't agree, and I wish this would stop being repeated. Given the amount of customer feedback we've gotten, I think it's clear that CPM is broadly interesting, not just for "enterprise" developers. Ever since I first heard about the idea I thought it would be useful even for personal projects with more than 1 project in the repo, so I really don't understand why certain people keep repeating that it's "an enterprise-level feature".
src/NuGet.Core/NuGet.Build.Tasks.Console/MSBuildStaticGraphRestore.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.Tests/NuGet.Commands.Test/MSBuildRestoreUtilityTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.Tests/NuGet.Commands.Test/RestoreCommandTests/RestoreCommandTests.cs
Outdated
Show resolved
Hide resolved
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
Pul request created for the property here: dotnet/project-system#9295 |
156032e
to
b087968
Compare
test/NuGet.Core.Tests/NuGet.Commands.Test/RestoreCommandTests/RestoreCommandTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.Tests/NuGet.Commands.Test/RestoreCommandTests/RestoreCommandTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think this change is touching a lot of different parts of the code, so I think we should make sure we add the good test coverage.
src/NuGet.Clients/NuGet.SolutionRestoreManager/VsSolutionRestoreService.cs
Show resolved
Hide resolved
75f3106
to
bb4e54d
Compare
test/NuGet.Core.Tests/NuGet.Commands.Test/RestoreCommandTests/RestoreCommandTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.Tests/NuGet.ProjectModel.Test/PackageSpecTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.SolutionRestoreManager.Test/VsSolutionRestoreServiceTests.cs
Show resolved
Hide resolved
ba00ec4
to
4fdc758
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider filing a techdebt issue for the spaces around the msbuild property values.
Bug
Fixes: NuGet/Home#10432
Regression? Last working version:
Description
By default, central package management (CPM) does not allow users to specify floating version (i.e.
1.*
). CPM is considered an enterprise-level feature and since floating versions can introduce non-deterministic restores we want users to not be able to get situations where restores in different environments could not be identical.However, the community has left a good amount of feedback that such a feature should be allowed with more details available in NuGet/Home#10432. This change allows a user to enable floating versions by setting an MSBuild property which remains off by default.
The only place the MSBuild property will be documented is at https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1011 where users will be encouraged to use non floating versions and educated on the potential issues they could encounter.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation