Skip to content
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

Handle semicolons in packageReferences #10909

Merged
merged 16 commits into from
Nov 18, 2024

Conversation

sebasgomez238
Copy link
Contributor

@sebasgomez238 sebasgomez238 commented Nov 7, 2024

Addresses #10766 but only in the pure C# updater.

This PR splits semi-colons in packageReferences and handles them as two separate dependencies. The resulting PR content does not separate the packages it only updates the version.

Semicolons will still cause the ruby side of things to fail.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Nov 7, 2024
@sebasgomez238 sebasgomez238 force-pushed the users/segomez/semicolons-in-package-reference branch from c54ae04 to 9c015aa Compare November 14, 2024 18:20
@@ -229,7 +229,7 @@ async Task TrackOriginalContentsAsync(string directory, string fileName, string?
// TODO: need to report if anything was actually updated
if (updateResult.ErrorType is null || updateResult.ErrorType == ErrorType.None)
{
if (dependencyLocation != dependencyFilePath)
if (dependencyLocation != dependencyFilePath.EnsurePrefix("/"))
{
updatedDependency.Requirements.All(r => r.File == dependencyFilePath);
Copy link
Contributor

Choose a reason for hiding this comment

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

Note for future me: what's the purpose of this? It's computing a bool and immediately discarding it.

@sebasgomez238 sebasgomez238 marked this pull request as ready for review November 18, 2024 18:10
@sebasgomez238 sebasgomez238 requested a review from a team as a code owner November 18, 2024 18:10
@kbukum1 kbukum1 merged commit 4159f9d into main Nov 18, 2024
94 checks passed
@kbukum1 kbukum1 deleted the users/segomez/semicolons-in-package-reference branch November 18, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants