Skip to content

Fix cross product no-op#7250

Merged
nkolev92 merged 2 commits intodevfrom
dev-nkolev92-fixCrossProductNoOp
Apr 2, 2026
Merged

Fix cross product no-op#7250
nkolev92 merged 2 commits intodevfrom
dev-nkolev92-fixCrossProductNoOp

Conversation

@nkolev92
Copy link
Copy Markdown
Member

@nkolev92 nkolev92 commented Apr 2, 2026

Bug

Fixes: NuGet/Home#14840

Description

In #7246, I realized Test-NetCoreVSandMSBuildNoOp, which is the main way we check for no-op equivalency in VS vs CLI is not running.

It was disabled in because of NuGet/Home#13003 in #5469 but we never enabled it back.

That was Nov 10, 2023.

Unfortunately there's been many changes in this space, including a new algorithm that have basically broken this test.

This has a massive impact, since a huge number of projects have CPM enabled and everyone .NET and above has pruning data.

Some of the changes that may have regressed it:

Related: NuGet/Home#11231

This has a perf cost, but no-op is cheaper than the actual cost of doing a real restore.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@nkolev92 nkolev92 marked this pull request as ready for review April 2, 2026 20:28
@nkolev92 nkolev92 requested a review from a team as a code owner April 2, 2026 20:28
@nkolev92
Copy link
Copy Markdown
Member Author

nkolev92 commented Apr 2, 2026

I'll get some benchmark numbers in a bit.

@nkolev92
Copy link
Copy Markdown
Member Author

nkolev92 commented Apr 2, 2026

Running it against client dgspecs, it's honestly not even noticeable.

Method Mean Error StdDev Allocated
Sha512HashFunction 0.6211 ns 0.0175 ns 0.0164 ns -
FnvHash64Function 0.5977 ns 0.0131 ns 0.0122 ns -
Sha512HashFunction_NoSorting 0.5877 ns 0.0028 ns 0.0026 ns -
FnvHash64Function_NoSorting 0.5957 ns 0.0041 ns 0.0036 ns -

@nkolev92 nkolev92 merged commit 779eff1 into dev Apr 2, 2026
17 of 18 checks passed
@nkolev92 nkolev92 deleted the dev-nkolev92-fixCrossProductNoOp branch April 2, 2026 23:27
kartheekp-ms pushed a commit that referenced this pull request Apr 3, 2026
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.

CLI vs VS no-op does not work with pruning & central package management in all cases

3 participants