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

Integrate with tool version managers like Aqua and mise #5123

Open
2 tasks done
o-l-a-v opened this issue Jan 10, 2025 · 1 comment
Open
2 tasks done

Integrate with tool version managers like Aqua and mise #5123

o-l-a-v opened this issue Jan 10, 2025 · 1 comment
Labels
Issue-Enhancement A feature request (enhancement). Needs: Triage Maintainer attention needed!

Comments

@o-l-a-v
Copy link
Contributor

o-l-a-v commented Jan 10, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

There are now multiple multiplatform tools that can manage PowerShell versions as any other dev tool, like:

It'd be cool of vscode-powershell somehow could integrate with external tools for easily setting what PowerShell version to run for a session. It doesn't have to be tool specific, but maybe instead of hardcoding a path to pwsh.exe one could do trigger a command:

  • mise use pwsh@<version_supplied_by_vscode_powershell>; mise where pwsh@<version_supplied_by_vscode_powershell>

Which then tells what path to pwsh.exe vscode-powershell should use.

Proposed Design

No response

@o-l-a-v o-l-a-v added Issue-Enhancement A feature request (enhancement). Needs: Triage Maintainer attention needed! labels Jan 10, 2025
@andyleejordan
Copy link
Member

andyleejordan commented Jan 10, 2025

I think this is two asks both of which are feasible:

  1. Teach VS Code to search for PowerShell installations in the directories that mise, Aqua, etc. install them. An example would be

    private findPSCoreDaily(): IPossiblePowerShellExe | undefined {
    and the most annoying part frankly would be adding the appropriate test coverage. I'm happy to accept a PR for this as long as it comes with citation of documentation as to why it's now looking where. When done correctly, it should make those installed versions available in the PowerShell session menu, and should name them accurately. No defaults should change. This would essentially allow the user to skip manually adding these installations to powershell.powerShellAdditionalExePaths. They could access these PowerShells just by running "Show Session Menu" (or clicking the PowerShell langauage status icon) and could set it as a default by its name.

  2. Teach mise, Aqua, etc. to edit the current workspace's powershell.powerShellDefaultVersion setting to the name of the desired PowerShell as it shows in the additional PowerShells after (1) is completed when running e.g. mise use. This is out of scope of this project and would be something to work on with those developers.

Note that I'm saying this with no familiarity with these exact tools, and am assuming they operate somewhat like the Python and Ruby environment managers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement). Needs: Triage Maintainer attention needed!
Projects
None yet
Development

No branches or pull requests

2 participants