-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Suggestion] Have sandboxed terminals alias opam to opam --switch=$SWITCH #655
Comments
I think what you're looking for is the command "OCaml: Create terminal
(current sandbox)". IIRC, it opens the terminal in the sandbox that you
picked for the extension.
Tbh, I think that we should set the opam switch to the current sandbox on
any terminal opening rather than only with a command "create terminal". I
often find myself creating many throwaway terminals and sometimes end up
using an incorrect switch (this is fixable on my end I guess, but I think
many people share this inconvenience to add this feature).
…On Mon, 5 Jul 2021 at 13:33, yannl35133 ***@***.***> wrote:
I find myself quite often using opam from within the sandboxed terminal,
forgetting that I am modifying the wrong switch.
Is it feasible to have sandboxed terminals alias opam to opam
--switch=$SWITCH ?
This may need to be opt-in, considering that changing the switch from
within wouldn't remove the option.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#655>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4YR64QNN5SLW7CDLXEHADTWFU4TANCNFSM472H6HKQ>
.
|
|
This is what happens when you call "create terminal (current sandbox)"
```
external command {
"bin": "/usr/local/bin/opam",
"args": [
"exec",
"--switch=4.12.0",
"--root",
"/Users/ulugbekna/.opam",
"--",
"zsh",
"-l"
]
}
```
Isn't that what you want?
…On Mon, 5 Jul 2021 at 14:46, yannl35133 ***@***.***> wrote:
OCaml: Create terminal (current sandbox) only sets the correct
environment (as in eval $(opam env) I think)
It definitely doesn't change the switch affected by commands like opam
install
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#655 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4YR63XM6KQ5LK5VTIJUFLTWF5O7ANCNFSM472H6HKQ>
.
|
$ opam install dedukti
[NOTE] Package dedukti is already installed (current version is 2.6.0).
$ opam install dedukti --switch=logipedia
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[dedukti.devel] synchronised (no changes)
[NOTE] Package dedukti is already installed (current version is devel).
$ opam exec --switch=logipedia -- opam install dedukti
[NOTE] Package dedukti is already installed (current version is 2.6.0). This may be a bug in opam directly (I'm on ~rc2) |
I think we have a bug in the extension: we should also be setting the
|
Yes, this looks like the correct solution. The flag is available in opam 2.0.7 on Windows too, so it should be fine to just modify the command. |
I'd like to work on this issue. |
Modified the command to set the `--set-switch` flag. Fixes (ocamllabs#655)
Modified the command to set the `--set-switch` flag. Fixes (ocamllabs#655)
Fixed in #744 |
I find myself quite often using opam from within the sandboxed terminal, forgetting that I am modifying the wrong switch.
Is it feasible to have sandboxed terminals alias opam to
opam --switch=$SWITCH
?This may need to be opt-in, considering that changing the switch from within wouldn't remove the option.
The text was updated successfully, but these errors were encountered: