Skip to content

Commit 98b75ec

Browse files
authored
Merge branch 'rescript-lang:master' into functors
2 parents f61d5dd + 56b2426 commit 98b75ec

File tree

229 files changed

+6937
-3741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+6937
-3741
lines changed

.github/ISSUE_TEMPLATE/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: 🚀 rescript-compiler
4-
url: https://github.com/rescript-lang/rescript-compiler/issues
5-
about: Please report problems about the ReScript compiler and build system here.
4+
url: https://github.com/rescript-lang/rescript/issues
5+
about: Please report problems about the ReScript compiler, build system and tools here.
66
- name: 💻 rescript-vscode
77
url: https://github.com/rescript-lang/rescript-vscode/issues
8-
about: VSCode language support, LSP, tools
8+
about: VSCode language support, LSP
99
- name: 📦 create-rescript-app
1010
url: https://github.com/rescript-lang/create-rescript-app/issues
1111
about: ReScript's project generator
1212
- name: ⚛️ rescript-react
1313
url: https://github.com/rescript-lang/rescript-react/issues
1414
about: ReScript bindings to React.js
1515
- name: 🌐 rescript-core
16-
url: https://github.com/rescript-association/rescript-core/issues
16+
url: https://github.com/rescript-lang/rescript-core/issues
1717
about: New ReScript standard library
1818
- name: 💬 ReScript Forum
1919
url: https://forum.rescript-lang.org/

.github/workflows/pull-request.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ jobs:
44
build:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-node@v2
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-node@v4
99
with:
10-
node-version: 14.x
10+
node-version: 20
11+
cache: npm
1112
- run: npm ci
1213
- run: npx rescript
1314
- run: npm test

.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.11.0

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Please make sure to check out our [Code of Conduct](CODE_OF_CONDUCT.md) and make
66

77
## Ways to contribute
88

9-
- Writing docs for the manual (Check for issues that are marked with a [`manual`](https://github.com/rescript-association/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"manual") and [`help wanted`](https://github.com/rescript-association/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted") tag)
10-
- Joining in discussions on our [issue tracker](https://github.com/rescript-association/rescript-lang.org/issues)
9+
- Writing docs for the manual (Check for issues that are marked with a [`manual`](https://github.com/rescript-lang/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"manual") and [`help wanted`](https://github.com/rescript-lang/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted") tag)
10+
- Joining in discussions on our [issue tracker](https://github.com/rescript-lang/rescript-lang.org/issues)
1111
- Give feedback for improvements (incomplete / missing docs, bad wording,
1212
search user experience / design, etc.)
1313
- Advanced: Help building platform features (design system, automatic testing, markdown parsing, etc.)
@@ -16,15 +16,15 @@ Please make sure to check out our [Code of Conduct](CODE_OF_CONDUCT.md) and make
1616

1717
### Find an issue
1818

19-
Before you start any work or submit any PRs, make sure to check our [issue tracker](https://github.com/rescript-association/rescript-lang.org/issues) for any issues or discussions on the topic.
19+
Before you start any work or submit any PRs, make sure to check our [issue tracker](https://github.com/rescript-lang/rescript-lang.org/issues) for any issues or discussions on the topic.
2020

2121
If you can't find any relevant issues, feel free to create a new one to start a discussion. We usually assign issues to a responsible person to prevent confusion and duplicate work, so always double check if an issue is currently being worked on, or talk to the current assignee to take over the task.
2222

2323
**Always make sure to get feedback from the core maintainers before starting any work**
2424

2525
The project follows very specific goals and tries to deliver the highest value with the least amount of resources. Please help us focus on the tasks at hand and don't submit any code / bigger refactorings without any proper discussion on the issue tracker. Otherwise your PR might not be accepted!
2626

27-
If you need inspiration on what to work on, you can check out issues tagged with [`good first issue`](https://github.com/rescript-association/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"good+first+issue") or [`help wanted`](https://github.com/rescript-association/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted").
27+
If you need inspiration on what to work on, you can check out issues tagged with [`good first issue`](https://github.com/rescript-lang/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"good+first+issue") or [`help wanted`](https://github.com/rescript-lang/rescript-lang.org/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted").
2828

2929
### Discuss an issue
3030

@@ -44,7 +44,7 @@ We value your voluntary work, and of course it's fine to step back from a ticket
4444

4545
### Communication Channels
4646

47-
- [Issue Tracker](https://github.com/rescript-association/rescript-lang.org/issues)
47+
- [Issue Tracker](https://github.com/rescript-lang/rescript-lang.org/issues)
4848
- [ReScript Discourse (General / mostly unrelated discussions)](http://forum.rescript-lang.org)
4949

5050
## Working on the rescript-lang.org

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
This is the official documentation platform for the [ReScript](https://rescript-lang.org) programming language.
88

9-
**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript-compiler).**
9+
**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript).**
1010

1111
**In case you are missing some specific documentation:**
1212

@@ -16,8 +16,8 @@ This is the official documentation platform for the [ReScript](https://rescript-
1616

1717
## System Requirements
1818

19-
- `node@16.x` or higher (for ES6 module compat)
20-
- `npm@7` or higher (package-lock v2)
19+
- `node@20` or higher
20+
- `npm@10` or higher
2121

2222
## Setup
2323

@@ -28,10 +28,7 @@ npm i
2828
# Initial build
2929
npx rescript
3030

31-
# Only needed for initial clone (or content H2 changes)
32-
npm run update-index
33-
34-
# Build the index data
31+
# Build the index data. Only needed for initial clone (or content H2 changes)
3532
npm run update-index
3633

3734
# In a new tab

_blogposts/2020-09-25-release-8-3.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu
1717
1818
```
1919

20-
The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes.
20+
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes.
2121

2222

2323

@@ -122,7 +122,7 @@ Now user can pick up their js file extension support per module format:
122122

123123
## More flexible filename support
124124

125-
To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript-compiler/issues/4624),
125+
To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript/issues/4624),
126126
for example, Next.js/React Native, we allow file names like `404.res`,
127127
`Button.Android.res` so that it can just be picked up by those tools
128128

_blogposts/2020-11-17-editor-support-custom-operators-and-more.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |
88
Update on what we're doing around the end of 2020 and early next year.
99
---
1010

11-
import Video from "src/components/Video"
11+
import Video from "src/components/Video";
1212

1313
## Upcoming Improvements
1414

@@ -28,7 +28,7 @@ Hongbo continues to improve the compiler experience in monorepo-like setups. Exp
2828

2929
## Docs
3030

31-
Patrick is [rearranging the React documentation](https://github.com/rescript-association/rescript-lang.org/pull/96), and continues to improve the main documentation site with Cheng Lou.
31+
Patrick is [rearranging the React documentation](https://github.com/rescript-lang/rescript-lang.org/pull/96), and continues to improve the main documentation site with Cheng Lou.
3232

3333
## Syntax
3434

_blogposts/2020-12-07-release-8-4.mdx

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu
1919
2020
```
2121

22-
The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#841).
22+
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#841).
2323

2424
We will go through some highlighted changes.
2525

@@ -33,11 +33,10 @@ In this release, we fix the integrity of `bsb -make-world` which allows user to
3333
The fix is well implemented that people who don't do such modifications will not pay for it.
3434

3535
This is one of the highest desired feature request based on the
36-
[user feedback](https://github.com/rescript-lang/rescript-compiler/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky
37-
to implement it without compromising performance.
36+
[user feedback](https://github.com/rescript-lang/rescript/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky to implement it without compromising performance.
3837

3938
In ReScript compilation scheme, dependencies as packages are treated as a black box,
40-
changes of dependencies should be *transitive*. The is due to that we have cross module
39+
changes of dependencies should be _transitive_. The is due to that we have cross module
4140
optimizations and the binary interface itself is a hash of its dependencies.
4241
So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt.
4342
Because the intermediate output of B may still change due to the change of A.
@@ -68,6 +67,6 @@ of such stale outptu, such stale `List.cmi` file will break the integrity of the
6867
In this release, we introduced a more robust algorithm that will always remove stale output before the build so
6968
that such integrity is not broken.
7069

71-
Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript-compiler/pull/4858) : )
70+
Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript/pull/4858) : )
7271

7372
Happy Hacking! -- Hongbo Zhang

_blogposts/2021-02-09-release-9-0.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ npm install [email protected]
2222

2323
You can also try our new release in the [Online Playground](/try).
2424

25-
In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#90).
25+
In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#90).
2626

2727
## Compiler Improvements
2828

2929
### New External Stdlib Configuration
3030

31-
This is a long-awaited [feature request](https://github.com/rescript-lang/rescript-compiler/pull/2171).
31+
This is a long-awaited [feature request](https://github.com/rescript-lang/rescript/pull/2171).
3232

3333
Our compiler comes with a set of stdlib modules (such as `Belt`, `Pervasives`, etc.) for core functionality. Compiled ReScript code relies on the JS runtime version of these stdlib modules.
3434

@@ -47,7 +47,7 @@ We made a small [demo repo](https://github.com/bobzhang/zero-cost-rescript) and
4747

4848
### Improved Code Generation for Pattern Matching
4949

50-
We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript-compiler/issues/4924):
50+
We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript/issues/4924):
5151

5252
```res
5353
type test =
@@ -87,7 +87,7 @@ function test(x) {
8787

8888
As you can see, the 9.0 compiler removes all the unnecessary `typeof` checks!
8989

90-
This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript-compiler/pull/4927/files?file-filters%5B%5D=.js).
90+
This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript/pull/4927/files?file-filters%5B%5D=.js).
9191

9292
Another important improvement is that we fixed the pattern match offset issue, which lead to the consequence that magic numbers will not be generated for complex pattern matches anymore.
9393

_blogposts/2021-03-03-rescript-association-rebranding.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Founded in 2018, the ReScript Association provides a legal and financial foundat
2525
- [rescript-lang.org](https://rescript-lang.org).
2626
- [Community forum](https://forum.rescript-lang.org) & server.
2727
- ReScript related domains and [analytics data](https://simpleanalytics.com/rescript-lang.org).
28-
- [genType’s](https://github.com/rescript-association/genType) release automation.
28+
- [genType’s](https://github.com/rescript-lang/genType) release automation.
2929
- Help maintaining editor related tools such as [rescript-vscode](https://github.com/rescript-lang/rescript-vscode), [vim-rescript](https://github.com/rescript-lang/vim-rescript) and the underlying [editor-support](https://github.com/rescript-lang/rescript-editor-support).
3030
- Design & logo assets (together with our designer) for all of ReScript.
3131
- Helping out on upcoming [ocaml.org](https://ocaml.org) work.
@@ -48,6 +48,7 @@ High quality, long-term Open Source work doesn’t come from some good words and
4848
If your company relies on the ReScript platform for building commercial products, please consider supporting our efforts by [sending a donation](https://rescript-association.org/donate). It’s the best way to future proof your product’s foundation. Alternatively, you can sponsor individual members like [ryyppy](https://github.com/sponsors/ryyppy/) on GitHub Sponsors.
4949

5050
We want to take this opportunity to thank our previous and active sponsors:
51+
5152
- [Tezos Foundation](https://tezos.foundation) (2020-21)
5253
- [Ahrefs](https://ahrefs.com) (2019)
5354
- [OCaml Software Foundation](https://ocaml-sf.org) (2018-19)

_blogposts/2021-05-07-release-9-1.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |
1010

1111
## Exciting Improvements in ReScript 9.1
1212

13-
Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases.
13+
Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases.
1414

1515
### New NPM Package
1616

@@ -159,6 +159,6 @@ let helloUnicode = (x) =>{
159159

160160
## Conclusion
161161

162-
Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these.
162+
Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these.
163163

164164
See you next time!

_blogposts/2021-06-25-roadmap-2021-and-new-landing-page.mdx

+8-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It has almost been a year since we originally [launched our new ReScript brand](
2121
- Accessible object system (no need for `Js.t`)
2222
- The release of our new `rescript` npm package and cli to replace `bs-platform`
2323
- Making every part of ReScript fully community owned
24-
- etc.
24+
- etc.
2525

2626
Stay tuned, this is just the beginning!
2727

@@ -30,6 +30,7 @@ Stay tuned, this is just the beginning!
3030
We had some thorough discussions about the future of the project and outlined the most important milestones for the next upcoming releases.
3131

3232
**Here's the gist:**
33+
3334
- Two release channels: `stable` and `experimental`
3435
- More predictable release dates and better migration steps
3536
- Better communication and discussion for breaking changes
@@ -41,15 +42,18 @@ The detailed roadmap with all our planned changes (and definition of our release
4142

4243
After several iterations, we are happy to announce our new [landing page](/).
4344

44-
<Image src="/static/img/landing_page_figma.png" withShadow={true} caption="Figma design draft for the new landing page"/>
45+
<Image
46+
src="/static/img/landing_page_figma.png"
47+
withShadow={true}
48+
caption="Figma design draft for the new landing page"
49+
/>
4550

4651
This is an incredible milestone for the documentation, and will act as a foundation for some cool new future improvements, such as:
4752

4853
- Highlighted Case Studies from production users such as Beop or Rohea
4954
- An interactive playground widget for the headline code examples
5055
- New starter templates and guides
5156

52-
53-
Furthermore, in case you are a **production user of ReScript** and you want to see your company logo highlighted on the landing page, please [open an issue](https://github.com/rescript-association/rescript-lang.org/issues) and let us know!
57+
Furthermore, in case you are a **production user of ReScript** and you want to see your company logo highlighted on the landing page, please [open an issue](https://github.com/rescript-lang/rescript-lang.org/issues) and let us know!
5458

5559
Happy hacking.

_blogposts/2022-08-25-release-10-0-0.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ReScript version 10 is available! Version 10 is a culmination of over a year's w
1414
npm install rescript@10
1515
```
1616

17-
All changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about.
17+
All changes are listed [here](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about.
1818

1919
## Faster builds with native M1 support
2020
Users with M1 chips should see a notable speedup, as the new ReScript version has full native support for M1.
@@ -27,9 +27,9 @@ let str = "Σ"
2727

2828
You can also pattern match on Unicode characters:
2929
```res
30-
switch someCharacter {
31-
| 'Σ' => "what a fine Unicode char"
32-
| _ => "Unicode is fun"
30+
switch someCharacter {
31+
| 'Σ' => "what a fine Unicode char"
32+
| _ => "Unicode is fun"
3333
}
3434
```
3535

@@ -79,7 +79,7 @@ Version 10 brings the building blocks needed for a number of exciting new featur
7979

8080
## Upgrade guide
8181

82-
Please see the detailed [changelog](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md) for a list of breaking changes.
82+
Please see the detailed [changelog](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md) for a list of breaking changes.
8383
Each breaking change lists suggestions on how to upgrade your project.
8484
This can be out of your control in case of dependencies. In that case, please raise issues with the maintainers of those libraries.
8585

0 commit comments

Comments
 (0)