-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Change from "sln" to "solution" as primary, and add "sln" as alias #43607
Change from "sln" to "solution" as primary, and add "sln" as alias #43607
Conversation
…" to a shorthand alias. Additional changes have been made to tests that relied on certain outputs using "sln" and hard-baked calls to "sln" from internal code.
@dotnet-policy-service agree |
…ngs downstream expecting SLN such as aspire, etc? Will need someone with more knowledge to check if this could affect things downstream.
…l command options
is it compatible with .sln vs. .slnx future plan #18739? |
There's no changes in it to parsing of .sln/.slnx files, only for "dotnet sln {args}" to also allow "dotnet solution {args}". Specifically, "dotnet solution {args}" being the default, and "dotnet sln {args}" now being an alias. So this shouldn't conflict with #18739 from what I understand. 😊 |
i can't wait to switch to slnx. keeping a close eye on #40817 progress 🔭 |
|
||
for (int i = 0; i < CommandAliases.Length; i++) | ||
{ | ||
command.Aliases.Add(CommandAliases[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since there's only one alias, probably could just make the Alias a string and call add to clean this up
Triage: This change is actually a prereq we had in mind for doing the new slnx support. Were you going to publish this PR and add tests as well? We'll want to add a doc bug once this merges and we'll probably want this to target 9.0.2xx (not sure when slnx is coming but hopefully before 10). |
Hi there! Yep! I plan on incorporating that change you mentioned and writing up some new tests this weekend so I can swap to Ready for Review. :) Cheers! |
Wonderful news @SourceCodeWhen - let us know if you need any help/guidance getting this ready. |
@@ -205,7 +205,7 @@ public IEnumerable<string> GetCustomDefaultConfigurationValueIfSpecified() | |||
/// <summary> | |||
/// Returns an arbitrary project for the solution. Relies on the .NET SDK PrepareForPublish or _VerifyPackReleaseConfigurations MSBuild targets to catch conflicting values of a given property, like PublishRelease or PackRelease. | |||
/// </summary> | |||
/// <param name="sln">The solution to get an arbitrary project from.</param> | |||
/// <param name="solution">The solution to get an arbitrary project from.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't change if the sln parameter on this function is not changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution to .NET 😊 Your changes look great to me. I do have one nit pick comment. The tests are failing but it looks like only due to an issue on the repo and not your fault. Hopefully that issue will get cleaned up soon and we can merge!
Thanks! I develop on Linux so ive been trying to work out what was happening for a while now, haha. I thought it could have potentially been due to the test run effectively going twice for the same folder destination, one with "sln" and one with "solution", and the call on windows throwing an error compared to other platforms. If it's a bug on the repo however then that makes life easier, haha. Cheers! |
@SourceCodeWhen This PR is almost there now! :) There are 3 remaining test failures mostly related to dotnet solution add. Example
optedOut is passed as a 2nd parameter to copy test asset to prevent test folders from having a clobbering race condition |
Aha! That makes a ton of sense! :) I've gone ahead and added the solution command to the identifier parameter of Thanks a lot for the point in the right direction. :) |
Thanks, it looks good now but there's a new repo issue 😅 Waiting for it to be fixed. |
/backport to release/9.0.2xx |
Started backporting to release/9.0.2xx: https://github.com/dotnet/sdk/actions/runs/11354060685 |
So that last repo issue was fixed but theres a new one in the same spot so I still dont think it's going to be mergeable but we'll pay attention! |
All good, haha. Looks like it's just about done on this one! 🤞 |
This is in respect to issue #40817
Changes have been made to tests that relied on certain outputs using "sln" and hard-baked calls to "sln" from internal code/inlined test params.
I also pulled out the command name to a const string and the aliases to a readonly array to make it more in-line with other command implementations.
There's a surprising amount of things that relied somewhat on the "sln" keyword being returned for parts of testing, etc. So if preferred I can strip back the PR to leave "sln" as the primary and add "solution" as an alias, reverting the changes to the tests that needed changing.
Cheers!