Skip to content

Conversation

nkolev92
Copy link
Contributor

@nkolev92 nkolev92 commented Aug 12, 2025

Related to NuGet/NuGet.Client#6696.

Used for inferring pruning defaults.

Microsoft Reviewers: Open in CodeFlow

@nkolev92 nkolev92 requested a review from a team as a code owner August 12, 2025 18:24
@nkolev92 nkolev92 requested a review from drewnoakes August 12, 2025 22:12
Copy link
Member

@drewnoakes drewnoakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the first example of a "private" (starting with underscore) variable being bound by the project system. My only concern here is that whoever defines this property decides it's safe to change on this basis, which breaks the contract here.

@drewnoakes drewnoakes merged commit 8ba13c7 into main Aug 14, 2025
6 checks passed
@drewnoakes drewnoakes deleted the dev-nkolev92-addPruning branch August 14, 2025 01:22
@dotnet-policy-service dotnet-policy-service bot added this to the 17.15 milestone Aug 14, 2025
@lifengl
Copy link
Contributor

lifengl commented Aug 29, 2025

@nkolev92 & @drewnoakes : private '_' properties are not saved in the project cache, so the value would be different when the solution loads from cache. saving private data would increase size of cache state and leads regressions.

@drewnoakes
Copy link
Member

Thanks @lifengl, I didn't know they weren't cached, though it makes sense. I've added a unit test to catch this in future: #9745

@nkolev92 we should work out how to progress here so that we can remove the various workarounds we have put in place for this.

@nkolev92
Copy link
Contributor Author

nkolev92 commented Sep 2, 2025

I can change it to avoid using an _. NuGet/Home#14511

I'll fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants