Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

uninstall Reason without uninstalling opam #64

Open
mars0i opened this issue Dec 29, 2017 · 4 comments
Open

uninstall Reason without uninstalling opam #64

mars0i opened this issue Dec 29, 2017 · 4 comments

Comments

@mars0i
Copy link

mars0i commented Dec 29, 2017

I installed a new OCaml switch, 4.06.0, using opam. When I ran utop, I found that when I typed

#require "

as soon as I typed the quotation mark, I suddenly got a screenful of warnings about /usr/local/lib/node_modules/reason-cli/r/3____________________________________________/i/...<lib name> not found. I don't know why I would get these errors--very mysterious. I'd never seen them before, and I was not doing anything to my knowlege to reference these directories. Each subsequent character after the quotation mark seemed to cause another screen of the warnings.

I didn't remember installing ReasonML, but I guess I did at some point. So I ran
npm uninstall -g reason-cli, suggested in the README file, to get rid of Reason. I don't need it at the moment. This uninstalled opam. I don't want to install Reason right now, though (I need to get 4.06.0 working on its own, and I am not experimenting with Reason right now), so I had to reinstall opam (which turned out to be a pain in my case).

Automatically uninstalling opam as part of uninstalling Reason seems like a bad idea, since many people will want to use OCaml in general but try out Reason. How about suggesting an alternate procedure for uninstalling Reason while keeping the rest of the normal OCaml toolchain instact, with a note about different ways to uninstall?

(Looks like it may have uninstalled opam, too. Or is that something that happened when I was trying to fix the situation?)

Thanks-

@jordwalke
Copy link
Member

Automatically uninstalling opam as part of uninstalling Reason seems like a bad idea,

We would never do anything like that intentionally (and I seriously hope we would never do anything like that even on accident).

@jordwalke
Copy link
Member

How about suggesting an alternate procedure for uninstalling Reason while keeping the rest of the normal OCaml toolchain instact, with a note about different ways to uninstall?

You can use reason via opam! You can install it on any switch up to version 4.6. The reason-cli is just for people who don't want to learn opam but try it out in their editors etc. We discourage ever mixing the two. reason-cli isolates its environment (even though npm is no help), but I don't think opam isolates its environment from npm.

@jordwalke
Copy link
Member

Let me know if there's anything else I can do to help you figure out what went on.

@mars0i
Copy link
Author

mars0i commented Dec 29, 2017

Thanks @jordwalke.
I would normally use opam. I'm not sure why I had reason-cli installed at all. Does it get installed with the rest of Reason? Anyway, because I didn't know why it was there, I found the README here, and thought I'd try the uninstall routine I found.

Maybe someone could check that npm uninstall script to see if it does something that would have the effect of uninstalling opam, though? Not urgent, I guess.

I'm pretty ignorant about npm, and have other priorities at the moment, so I wouldn't want to investigate further myself.

Although I don't use Reason, I'm happy that the project exists and that it seems quite popular. (I'm waiting for the first introductory ReasonML textbook, whether online or in print, so that I can recommend it to people who would be put off by OCaml syntax but would like ultra-convenient static typing and could be persuaded to take the FP leap. That's at least a few years off.)

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

No branches or pull requests

2 participants