-
Notifications
You must be signed in to change notification settings - Fork 367
Check Architecture on .NET FindPath API #1974
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We had a discussion about how Mac users tend to need the arm64 runtime and often have the x64 host installed on their PATH. This was a big concern. With global installs at least we can still rely on the output from `dotnet --info` for now, so we decided to add this back in.
…t quite use it to check properly
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
smitpatel
approved these changes
Oct 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's this?
When finding the dotnet on the PATH and whether we can use that as the runtime for an extension to run on, we now check whether it matches the architecture that's requested in a given API request.
Resolves #1984
Notes
Some of this code initially existed and I pulled it noting that the architecture check could sometimes have 'Other Architectures' that were not valid, that
dotnet --info
is subject to change and thus this is flaky, and that certain runtimes and hosts did not print the architecture when running info, such as the 3.1 host.We had a discussion about how Mac users tend to need the arm64 runtime for C# DevKit and C#, and often have the x64 host installed on their PATH. This was a big concern, and since the check works in the vast majority of scenarios, we decided to go with it anyway. Upon further consideration, most of the time we are only installing .NET 8 and beyond anyways, in which now these issues are fixed, so upon testing it appears we have achieved success here.
Evidence that it works
Will be relying on vendor testing to test in a variety of scenarios with architectures.
They did a pass with a giant testing matrix of every permutation of arch on non-native/native with all combinations to confirm it works for all of them.
Here's part of the matrix, with the Mac M1 showing that it works for all directions :)
Additional Changes
Adds the public connection strings like in #1968 to the other package.jsons because it can cause failures to load due to null referencing an invalid propery in package.json
More context: dotnet/runtime#108503