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
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -144,13 +144,25 @@ _Things are added to this section on migration gradually._
144
144
145
145
Migrating to the new standard library should be easy to do gradually. In this section we'll gather information that's intended to help migrating as painlessly as possible.
146
146
147
+
In general, we suggest you take the following gradual approach:
148
+
149
+
1. Install the stdlib and open it in the global scope
150
+
2. Fix any inconsistencies that uncovers. That will be things like module name clashes (more details below), `someArr[0]` now returning an option, and so on.
151
+
3. Run the semi-automated migration below. This will uncover more things to fix.
152
+
4. Do a final search for `Js.` in your project, and replace any leftovers that the migration script did not catch.
153
+
154
+
Check out [this issue on the GitHub tracker](https://github.com/rescript-association/rescript-core/issues/20) if you get stuck. We'll do what we can to help out when migrating there.
155
+
147
156
### Semi-automated migration
148
157
149
158
We've prepared a script you can run with [comby.dev](https://comby.dev) that will do parts of the migration for you automatically. The migration script is located in [`migration.toml`](migration/migration.toml). Here's an example of how you can run it:
150
159
151
160
```bash
152
161
# Run in your project root. Assumes `migration.toml` has been copied in place to your project root.
The migration script is a set of instructions that Comby runs in sequence. You're encouraged to take `migration.toml` and tweak it so it fits your needs. [Comby](https://comby.dev) is powerful. It can do interactive rewriting and numerous other useful stuff. Check it out, but please note it's _not_ intended to cover all of the migration necessary. You'll still likely need to do a few manual fixes after running the migration scripts.
0 commit comments