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

New release? #100

Open
nirvdrum opened this issue Oct 4, 2019 · 5 comments
Open

New release? #100

nirvdrum opened this issue Oct 4, 2019 · 5 comments

Comments

@nirvdrum
Copy link

nirvdrum commented Oct 4, 2019

The current release of reason-cli is 3.3.3, which as far as I can tell, was released in Aug. 2018 (hard to say because the release isn't tagged). For those getting started with Reason, the docs suggest using bs-platform to pull in your version of Reason. As far as I can tell, the latest 5.x release of BuckleScript ships with refmt 3.4.2. Consequently, there's a disparity between what would be installed globally via reason-cli and what a project would get by invoking yarn bsrefmt. I think pushing out a newer update of reason-cli could cut down on the confusion.

@jordwalke
Copy link
Member

Correct! Yeah, reason-cli is mostly not necessary because projects should be declaring tooling as part of their devDependencies to ensure that things "just work" when contributors develop.
However, the one exception to this might be rtop - which I think is really useful as a global package. We were just talking about releasing that as one prebuilt global package. Thoughts?

@nirvdrum
Copy link
Author

nirvdrum commented Oct 4, 2019

It's a bit hard for me to say. I don't recall what prompted me to install reason-cli, but I've only been working with Reason for about a month, so it was something fairly recent. I strongly suspect I either read it in a tutorial or as a setup stage for an IDE plugin. If tooling best practices have been changing, I don't know if the word has really gotten out and consequently you have people like me getting old versions and invoking the tools improperly. Maybe a new release that removes refmt would force a resolution to the issue.

I think this may be a proxy issue for a larger problem though, and this may not be the best place to raise it. But, in an effort to help justify what prompted this, I'll lay it out and we can decide where to move the discussion from there. Basically, I had no idea which version of Reason I was running. I saw that 3.5.1 was "released" from the Discord GitHub hook. But, I couldn't tell how to get it: no tagged release, no tarballs, no corresponding packages on NPM that I could find. Moreover, I couldn't tell which version of Reason I was actually running to tell if I should be upgrading.

Someone on Discord suggested to run refmt -v to get the version, which is where I saw the 3.3.3 and I eventually traced my refmt installation back to reason-cli. I was a bit surprised to see I would be running a release of Reason that was essentially 6 releases back and a year old, since I've set this all up in the past month. Then I noticed in my project's package.json, that I really use bsrefmt. Running that, it looks like I'm running Reason 3.4.2. But, it's still all rather confusing. bs-platform doesn't indicate anywhere what version of Reason it's using; it makes no mention of Reason in its devDependencies and it has no runtime dependencies. I suppose the only case left is it's rebundling Reason somehow, which is fine, but doesn't align with your suggestion of projects using devDependencies.

Adding to the confusion, both of my IDE plugins (IntelliJ and VS Code) have refmt support, but I don't really know what versions they're using either (I hope they're just using bsrefmt through my project). Looking briefly, VS Code has an option to specify a path to refmt, but
I think that's another setting that could lead a user into trouble if refmt shouldn't be installed globally.

I appreciate the tight coupling with BuckleScript for basically any React projects, so ensuring compatibility with BuckleScript should be of the utmost importance. On the other hand, I think a more conventional distribution of the toolchain would cut down on confusion. Of course, I may just be the odd case out, in which case feel free to tell me so.

@jordwalke
Copy link
Member

Great feedback. yeah bs bundles reason but it does so very opaquely without any obvious way of knowing which version it uses. I would prefer moving to a model where each project can specify the version in the package.json as long as it never causes breakages with bs.

Bs's vendoring of Reason tends to lag behind the actual releases, which remain available for native Reason/OCaml, and compiling to js via jsoo. The reason-cli essentially lags way behind by nature of being deprecated. I do think we should have a global installation toolchain but you can see how much more complicated it makes it when people are already confused how the other tools work and which versions they pull from. It would be asking for even more confusion. But right now, we're looking for immediate ways to reduce the confusion.

@tlvenn
Copy link

tlvenn commented Nov 15, 2019

For reference this book is recommending to install reason-cli: http://reasonmlhub.com/exploring-reasonml/ch_getting-started.html @nirvdrum could it be where you saw it ?

@tlvenn
Copy link

tlvenn commented Nov 15, 2019

And yes I believe releasing rtop as a prebuilt global package alone would be great imho.

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

3 participants