Update for publishing and package source mappings #19343
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: dotnet/source-build#4287
Fixes: dotnet/source-build#4204
Fixes: dotnet/source-build#4205
Description of findings
Source-build has always had multiple versions of packages produced by
roslyn-analyzers
andsymreader
- stable and unstable package versions, i.e.These packages would end up in PSB artifacts archive.
PVP flow would use the first encountered package version, so any consumers of
Microsoft.CodeAnalysis.NetAnalyzers
would get version9.0.0
.We wanted to fix NuGet non-determinism by carefully populating package source mappings for
previously-source-built
feed. However, we did allow package mapping for a package ID that has any version not present in current (live) package sources. Therefore, there would be a mapping in PSB feed forMicrosoft.CodeAnalysis.NetAnalyzers
. And there would be two identically-version packages (9.0.0), with different content - one in current sources, and one in PSB.roslyn
repo did not have a dependency onroslyn-analyzers
repo, so it did not have access to those packages in current feeds. The only available package was in PSB, and this was causing a poison leak.Changes
roslyn-analyzers
andsymreader
dependencies toroslyn
as there are packages consumed from both.roslyn-analyzers
- prevents publishing of stable-versioned packagessymreader
- prevents publishing of stable-versioned packages