You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want opam to configure bash?
1. Yes, update ~/.profile
2. Yes, but don't setup any hooks. You'll have to run eval $(opam env) whenever you change your current 'opam switch'
3. Select a different shell
4. Specify another config file to update instead
> 5. No, I'll remember to run eval $(opam env) when I need opam
[1/2/3/4/5] 5
The real problem is that anyone new to Opam:
will not know what eval $(opam env) does
will not recognize how often they will need to type eval $(opam env)
will not be able to mentally connect a command not found from the Bash/Zsh shell with eval $(opam env)
In fact, this isn't even an Opam thing. I suspect less than 25% of *nix devs understand what the POSIX shell form eval $(...) actually does.
From what I've observed, newcomers just pick the default because they do not understand the magic syntax, and also because they have prior expectations that "default" will be right for a newcomer.
Can we switch the default to 1. Yes, update ~/.profile?
The text was updated successfully, but these errors were encountered:
I agree with this. The "fear" in the past has been breaking things and then being "yelled" at by power users grumbling that opam changed global things without being explicitly told to - I think that's fair, @AltGr? 🙂
Especially now that it's down to just one question with the menu, I think it's safe for the default to be the least surprising for new users - a "power" user who sits on enter without reading the prompt possibly deserves what's coming to them?! 🙈
A couple of other suggestions from today to make this even clearer:
The comments added to .profile (or whatever gets updated) could be made even more explicit about what can be deleted (e.g. putting a lowerline comment) and also make it clear that they can be safely deleted at anytime and give the command to re-add them.
opam init after updating the file could be even more explicit about exactly where the file was updated - e.g. "added three lines after L56 in ~/.profile", etc.
This is an issue filed in response to:
As rightly pointed out in https://discuss.ocaml.org/t/what-are-the-biggest-reasons-newcomers-give-up-on-ocaml/10958/23?u=jbeckford, users are given the option to not do
eval $(opam env)
:The real problem is that anyone new to Opam:
eval $(opam env)
doeseval $(opam env)
command not found
from the Bash/Zsh shell witheval $(opam env)
In fact, this isn't even an Opam thing. I suspect less than 25% of *nix devs understand what the POSIX shell form
eval $(...)
actually does.From what I've observed, newcomers just pick the default because they do not understand the magic syntax, and also because they have prior expectations that "default" will be right for a newcomer.
Can we switch the default to
1. Yes, update ~/.profile
?The text was updated successfully, but these errors were encountered: