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

better semantic for 'opam switch' #106

Closed
samoht opened this issue Sep 5, 2012 · 5 comments
Closed

better semantic for 'opam switch' #106

samoht opened this issue Sep 5, 2012 · 5 comments

Comments

@samoht
Copy link
Member

samoht commented Sep 5, 2012

The current semantics of opam switch is not very clear.

A possible improvement could be:

$ opam switch -add jane-elisp -alias-of 4.00.0
$ opam switch -add 4.00.0 # here -alias-of 4.00.0 is implicit as alias and compiler have the same name)
$ opam switch jane-elisp
$ opam switch -rm jane-elisp
@samoht
Copy link
Member Author

samoht commented Sep 5, 2012

Incidentally, there is currently no way to remove an alias, so this new design fix that.

@cagdasbozman
Copy link
Contributor

Another possible improvement:

$ opam switch -install {compiler}           //to install
$ opam switch [-clone] -install {compiler}  //to install [and try to keep installed packages] 
$ opam switch -remove {compiler}            //to remove a compiler
$ opam switch -reinstall {compiler}         //to reinstall a compiler
$ opam switch {compiler}                    //to switch
$ opam switch -list                         //to list all available compilers 

@tuong
Copy link

tuong commented Sep 6, 2012

Notes :

  • we can rename opam switch to opam ocaml or opam compiler...
  • for @lefessan : If we want to work with two different OCaml at the same time in two terminal, we could propose :
    opam --ocaml alias1 <subcommand>,
    opam --ocaml alias2 <subcommand>.
    The locking will then move under .opam/alias instead of the current .opam.

@samoht
Copy link
Member Author

samoht commented Sep 6, 2012

I quite like @Cago proposition (and I would prefer keeping opam switch). @tuong, good idea, opam --alias <foo> <subcommand> could also help fixing #66.

@samoht
Copy link
Member Author

samoht commented Sep 6, 2012

Moving to 0.6 as the feature is already working fine in 0.5 - just need some more though to find the proper design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants