Skip to content

findPath API Finds Extension Managed Runtimes #2293

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 3 commits into from
May 29, 2025

Conversation

nagilson
Copy link
Member

@nagilson nagilson commented May 27, 2025

Our API was designed to find existing installs on the PATH, DOTNET_ROOT, VS Code settings, and or other places like in the registry / host install location.

However, it did not find the private runtimes that we had installed. This causes some extra work to be done when we could have re-use the existing installation according to what the API consumer wants, (they should specify a later version if using the findPath API.) Now consumers won't have to recall our acquire API for it to recognize it already installed something.

nagilson added 2 commits May 27, 2025 16:42
It assumed that latestPatch and latestFeature could not be fulfilled if there was no patch requested by the user. But we should instead accept it. This would make '7.0.20' get rejected over '7.0' with 'latestPatch' which doesnt make sense because it should accept any later patch over the specified patch. In this case it was not specified so it should be accepted.

Logic extracted out into another function was not changed.
@nagilson nagilson marked this pull request as ready for review May 28, 2025 17:13
@@ -560,6 +560,21 @@ export function activate(vsCodeContext: vscode.ExtensionContext, extensionContex
}
}

if (commandContext.acquireContext.mode === 'runtime' || commandContext.acquireContext.mode === 'aspnetcore')
Copy link
Member Author

Choose a reason for hiding this comment

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

Our SDKs are global, so they will be picked up by the existing logic.

@nagilson nagilson requested a review from a team May 28, 2025 17:18
Comment on lines +250 to +252
:
(() =>
{
Copy link
Member

Choose a reason for hiding this comment

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

nit: Is this style intended?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is auto-formatted within the style guidelines set by the project, so in a way, yes..
even though I agree it looks ugly.

@nagilson nagilson merged commit 9259f3b into dotnet:main May 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants