NuGet.config isolated package sources comments being deleted when package sources are removed.
- [ ] This issue is blocking
- [ ] This issue is causing unreasonable pain
Maestro adds the following entries when adding isolated package sources:
+ <!-- Begin: Package sources from dotnet-windowsdesktop -->
+ <add key="darc-int-dotnet-windowsdesktop-3fef65d" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-windowsdesktop-3fef65d2/nuget/v3/index.json" />
+ <!-- End: Package sources from dotnet-windowsdesktop -->
These are properly alphabetized. The point of the comments is that over time, we will get fewer merge conflicts between internal and external, or between multiple PRs coming into various repos that edit the same section. Separate PRs will edit separate sections and will not conflict.
When a package source is removed today (e.g. after release day), Maestro is deleting the comment:
-- <!-- Begin: Package sources from dotnet-roslyn-analyzers -->
-- <add key="darc-pub-dotnet-roslyn-analyzers-77b2593" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-roslyn-analyzers-77b25935/nuget/v3/index.json" />
-- <!-- End: Package sources from dotnet-roslyn-analyzers -->
+ <!-- Begin: Package sources from dotnet-runtime -->
+ <add key="darc-int-dotnet-runtime-0260401" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-runtime-0260401c/nuget/v3/index.json" />
+ <!-- End: Package sources from dotnet-runtime -->
This is not desired. The goal here is that this section over time ends up stable (contains a comment block every repo that could possibly have a stable feed. And those stable feeds are either present or not. Removing the entries means that they will have to be re-introduced later, which will likely cause conflicts. Instead, When the roslyn-analyzers entry is no longer needed, Maestro should leave a blank space or remove the feed with a comment. For example it might.
!-- Begin: Package sources from dotnet-roslyn-analyzers -->
<!- None -->
<!-- End: Package sources from dotnet-roslyn-analyzers -->
The intention of the feature is that separate PRs should not generate merge conflicts in the nuget.config file
/cc @MattGal
@mmitche sorry I never noticed this :)