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

Preparations for the BuckleScript v7 transition #3914

Closed
22 of 26 tasks
ryyppy opened this issue Oct 30, 2019 · 19 comments
Closed
22 of 26 tasks

Preparations for the BuckleScript v7 transition #3914

ryyppy opened this issue Oct 30, 2019 · 19 comments

Comments

@ryyppy
Copy link
Member

ryyppy commented Oct 30, 2019

This issue is used to keep track of important tasks to make BuckleScript v7 (OCaml 4.06 based version) the default package on npm.

Transition Philosophy

As soon as BS@6 is live, every user should be able to just use our migration guides to upgrade their existing BS@5 based projects to the newest versions. For the most important tools, there should be an equivalent release for handling 4.06 based compile artifacts.

Those tools are mostly PPXes which are based on the 4.02 Parsetree. Our recommendation for PPX maintainers:

  • Increase the major version
  • Upgrade to the 4.06 Parsetree
  • Release the new package to npm, add notes on which major release is intended for which BS version and how to install it for each platform
  • Drop support for 4.02, since BS@5 (don't offer adding features for this version)

As a proper example, check out genType. GenType introduced a detached 4_02 branch so it can still provide crucial bug fixes for 4.02 based versions, but it will not provide any new features to make sure users upgrade soon and we can deprecate 4.02 once in for all. It uses the v2.* versions for BS@5 releases, and v3.* for BS@6.

Update: Gentype already dropped the workflow for a 4_02 hotfix-branch completely, since it is too much effort rebasing the diffs

PPX Upgrade tasks

This is a non-exhaustive list of tools which need to be handled, otherwise a lot of people will be stuck (please let me know if you know of any other tools):

A ticked box means that:

  • The project supports 4.06
  • The package is released on npm
  • Has proper instructions on how to install it for BS6
  • Has clear communicated maintainers (hint: @reasonml-community / @reasonml-labs org)
  • Has been tested with existing projects

Editor Plugin Tasks

BuckleScript v7 Migration Guide

For the official transition, we should prepare a migration guide which communicates:

  • All the benefits we get from 4.06 (e.g. language features such as "inline records in variants")
  • Explanations on why it is important to deprecate 4.02
  • Notes on current refmt version
  • Notes that the new version was tested properly and will not cause any troubles with existing Reason source code or Editor plugins
  • A section for ppx maintainers (as listed above, but more thorough)
  • A section for users on BS@5 (including a list of npm install commands for important dependencies)
  • The migration guides should be part of the docs section for easy discovery.
  • Migration Guide PR

Since v7 comes with the new records-as-objects feature, we will need to update the Object related docs section as well. (See PR).

Revamp the BuckleScript Object documentation

Pending PR: https://github.com/BuckleScript/bucklescript.github.io/pull/184

  • Add docs for record-as-objects
  • Refactor Object / Object 2 docs to something more meaningful and communicate

Making it public

We should make sure to communicate the switch on every channel:

  • reasonml Twitter
  • reasonassoc Twitter
  • Discord: (maybe with a newly created announcement channel?)
  • reasonml.chat

\cc @anmonteiro @baransu

@swuecho
Copy link

swuecho commented Oct 31, 2019

PPX Upgrade tasks

@cristianoc
Copy link
Collaborator

Thanks @swuecho. Added above.

@gaku-sei
Copy link

gaku-sei commented Nov 6, 2019

@ryb73 has updated their ppx to support (only) BuckleScript 6.x: rescript-labs/decco@2d68883

Also graphql_ppx being (unofficially) deprecated, we can probably list only graphql_ppx_re (which already supports BuckleScript 5.x and 6.x).

@cristianoc
Copy link
Collaborator

@gaku-sei I have update the description on top.

@alex35mil
Copy link
Contributor

alex35mil commented Nov 8, 2019

@cristianoc
Copy link
Collaborator

Thanks @alexfedoseev , added.

@Coobaha
Copy link
Contributor

Coobaha commented Nov 12, 2019

@cristianoc
Copy link
Collaborator

@Coobaha thank -- added above.
Btw would you know how extensive the plugin is? Asking as it might be more complex than a little PPX.

@Coobaha
Copy link
Contributor

Coobaha commented Nov 12, 2019

@Coobaha thank -- added above.
Btw would you know how extensive the plugin is? Asking as it might be more complex than a little PPX.

Cc @giraud

I guess it should just work, but thought that it is worth to add it to the list. Will also be happy to test things out

@giraud
Copy link

giraud commented Nov 13, 2019

@cristianoc plugin is ready since v0.76 (although I found there is a small update to release to adapt it to bs-6.2.1)

@cristianoc
Copy link
Collaborator

cristianoc commented Nov 13, 2019

@giraud great thanks. Once a version compatible with bs 6.2.1 is released, I'll update the description on top.

@ozanmakes
Copy link

ozanmakes commented Nov 14, 2019

PPX Upgrade tasks

bs-deriving works with BuckleScript v6 (tested with version "44.1.0")

Side note: Same version of reason-macros works with both v5 and v6. I'm curious how this works? Until now I was never able to use the same ppx binary on different AST versions

@cristianoc
Copy link
Collaborator

@osener thanks for the uppdate.

For reason-macros see ocaml-migrate-parsetree in https://github.com/jaredly/reason-macros/blob/master/src/dune#L5.

@ozanmakes
Copy link

Ah thanks. I had forward-compatibility in mind when I wrote that, but of course OCaml 4.06 AST is nothing new.

@ryyppy ryyppy changed the title Preparations for the BuckleScript v6 transition Preparations for the BuckleScript v6 / v7 transition Nov 21, 2019
@ryyppy
Copy link
Member Author

ryyppy commented Nov 21, 2019

let_anything is now bs-let and is advertised as an experimental ppx. Thanks to @mrmurphy for relocating the repo to a shared organisation! Thanks to @anmonteiro for making it BS6 ready!

@ryyppy
Copy link
Member Author

ryyppy commented Nov 22, 2019

decco has been moved to @reasonml-labs to share responsibility: https://github.com/reasonml-labs/decco

@ryyppy ryyppy changed the title Preparations for the BuckleScript v6 / v7 transition Preparations for the BuckleScript v7 transition Dec 6, 2019
@alex35mil
Copy link
Contributor

shakacode/rescript-logger#12

bs-log is updated and published as bs-log@next. The only thing that stops me from publishing it as latest is that I can't test installation on Windows machine. I'd really appreciate if anyone could help me with it.

@RasmusKlett
Copy link

RasmusKlett commented Dec 16, 2019

lenses-ppx might be worth mentioning in the upgrade guide, as it is used in the beautiful ReForm library. According to their Readme, I think they support v7.

@studious
Copy link

studious commented Mar 3, 2020

There is also ppx6 for https://github.com/jsiebern/bs-material-ui/tree/master/public/bs-material-ui-ppx

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

No branches or pull requests

10 participants