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 suppport for customize dune path #1039

Open
bn-d opened this issue Nov 2, 2022 · 4 comments
Open

Add suppport for customize dune path #1039

bn-d opened this issue Nov 2, 2022 · 4 comments
Labels
type: feature New feature or request

Comments

@bn-d
Copy link

bn-d commented Nov 2, 2022

We have support for ocaml.repl.path. Can we add similar support for the dune binary? Thanks

{
  "ocaml.dune.path": "/my/path/my_dune_exe"
}
@ulugbekna
Copy link
Collaborator

Hi,

  1. Why would you like that? Specifying the use case will present a more convincing argument in favor of the feature.
  2. Isn't this possible either using global or custom sandbox? You can read more about those from the README page of this repo.

@bn-d
Copy link
Author

bn-d commented Nov 2, 2022

I have multiple versions of dune co-exist (some with some env specific setups), and I need to select the correct version to build. The customized binary could have a name other than dune, i.e. mydune.

So I am not sure how global/custom sandbox would help. Even with the correct path setup, the extension will still run dune build instead of mydune build.

If having the path in top-level might conflict with other sandboxes, I am also ok with

{
  "ocaml.sandbox": {
    "kind": "global",
    "dunePath": "/my/path/my_dune_exe"
  }
}

@smorimoto smorimoto added the type: feature New feature or request label Jul 8, 2023
@code-ghalib
Copy link

This is not exactly the same request, but it would be nice if it were possible to point the extension to a /non/opam/path/bin to look for all the binaries it needs (ocaml-lsp-server, dune, ocamlformat, etc.).

I think you could do some pointing to individual executables with this extension.

My use-case is that on some environments I don't use opam and have pre-built binaries installed at some path using the system's package manager.

@bn-d
Copy link
Author

bn-d commented Jan 16, 2024

Was able to find a workaround using custom kind. Just need to provide a custom switch as template, ie if [ $prog = dune ]; then /my/path/my_dune_exe $args; else $prog $args; fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants