Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to Find Custom Root #1423

Closed
czhang03 opened this issue Mar 21, 2024 · 0 comments
Closed

Unable to Find Custom Root #1423

czhang03 opened this issue Mar 21, 2024 · 0 comments

Comments

@czhang03
Copy link

Hi, I am using vscodium within flatpak, with the ocaml sdk extension, which recommends a custom root for opam.

I have the following setting in for my project:

    "ocaml.sandbox": {
        "root": "${env:XDG_DATA_HOME}/ocaml",
        "kind": "opam",
        "switch": ".",
    },

and ocaml cannot seem to set the root correctly:

$ ocamlc --version
5.0.0

$ ocamllsp --version

$ /usr/lib/sdk/ocaml/bin/opam --version
$ /usr/lib/sdk/ocaml/bin/opam --version
2.1.5

$ /usr/lib/sdk/ocaml/bin/opam var --global root
2.1.5

$ /usr/lib/sdk/ocaml/bin/opam var --global root
[ERROR] Opam has not been initialised, please run `opam init'

[ERROR] Opam has not been initialised, please run `opam init'

However, using the following command:

eval $(opam env --root=$XDG_DATA_HOME/ocaml --switch=. --set-root --set-switch)

can set the root and switch correctly in the vscode terminal. Is there any way to make custom root work? Thanks!

@ocamllabs ocamllabs locked and limited conversation to collaborators May 26, 2024
@smorimoto smorimoto converted this issue into discussion #1486 May 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant