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

Add support for asdf-vm installed via MacPorts #2949

Open
1 task done
DrTom opened this issue Dec 3, 2024 · 1 comment
Open
1 task done

Add support for asdf-vm installed via MacPorts #2949

DrTom opened this issue Dec 3, 2024 · 1 comment
Labels
enhancement New feature or request help-wanted Extra attention is needed

Comments

@DrTom
Copy link

DrTom commented Dec 3, 2024

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

Currently asdf-vm is supported for various install methods including HomeBrew but not via the MacPorts https://www.macports.org/ system.

Description

Ruby installs from asdf-vm should be detected if asdf-vm was installed via MacPorts.

Implementation

In src/ruby/asdf.ts various search paths are present, e.g. for Homebrew

vscode.Uri.joinPath(
vscode.Uri.file("/"),
"opt",
"homebrew",
"opt",
"asdf",
"libexec",
scriptName,
),
.

Support for MacPorts can be added by adding the additional default path for asdf-vm from MacPorts in the following way:

      vscode.Uri.joinPath(
        vscode.Uri.file("/"),
        "opt",
        "local",
        "share",
        "asdf",
        scriptName,
      ),
@DrTom DrTom added the enhancement New feature or request label Dec 3, 2024
@andyw8 andyw8 added the help-wanted Extra attention is needed label Dec 3, 2024
@andyw8
Copy link
Contributor

andyw8 commented Dec 3, 2024

Thank for you for the suggestion.

If we were to implemented this, then we'd probably want MacPorts supported for all version managers on Mac, to avoid inconsistency. It may be helpful to introduce some abstraction for Homebrew/MacPorts to reduce duplication.

In the meantime, you can set a custom path for MacPort's adsf installation:
https://shopify.github.io/ruby-lsp/version-managers.html#custom-activation

(If anyone is interested in implementing this, please reach out to discuss your approach first).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants