Skip to content

Commit 446b0ad

Browse files
authored
Fix some typos of release 8.4 (#236)
1 parent 3b0c56e commit 446b0ad

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

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

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
---
22
author: hongbo
3-
date: "2020-12-07"
3+
date: "2020-12-07"
44
previewImg:
55
category: compiler
6+
badge: release
67
title: ReScript 8.4
78
description: |
9+
bsb improvements
810
---
911

1012
## Introduction
1113

12-
ReScript is a soundly typed language with an optimizing compiler focused on the JS platform.
14+
ReScript is a soundly typed language with an optimizing compiler focused on the JS platform.
1315
It's focused on type safety, performance and JS interop. It used to be called BuckleScript.
1416

1517
[[email protected]](https://www.npmjs.com/package/bs-platform/v/8.4.2) is now available for testing, you can try it via
@@ -18,50 +20,50 @@ It's focused on type safety, performance and JS interop. It used to be called Bu
1820
1921
```
2022

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

2325
We will go through some highlighted changes.
2426

2527
### The integrity of `bsb -make-world`
2628

27-
When we introduced `bsb` as a build system around four years ago, we made the assumption that dependencies are immutable,
28-
so that once it's built for the first time, we don't need to rebuild it any more. The integrity of `bsb -make-world` will be broken
29+
When we introduced `bsb` as a build system around four years ago, we made the assumption that dependencies are immutable,
30+
so that once it's built for the first time, we don't need to rebuild it any more. The integrity of `bsb -make-world` will be broken
2931
when the assumption does not hold.
3032

31-
In this release, we fix the integrity of `bsb -make-world` which allows user to change the dependencies.
32-
The fix is well implementend that people who don't do such modifications will not pay for it.
33+
In this release, we fix the integrity of `bsb -make-world` which allows user to change the dependencies.
34+
The fix is well implemented that people who don't do such modifications will not pay for it.
3335

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

38-
In ReScript compilation scheme, dependencies as packages are treated as a blackbox,
40+
In ReScript compilation scheme, dependencies as packages are treated as a black box,
3941
changes of dependencies should be *transitive*. The is due to that we have cross module
40-
optimizations and the binary interface itself is a hash of its dependencies.
41-
So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt.
42-
Because the intermediate output of B may still change due to the change of A.
43-
To make things worse, each package comes with an installation process which is a shell script, so re-installation will make the
42+
optimizations and the binary interface itself is a hash of its dependencies.
43+
So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt.
44+
Because the intermediate output of B may still change due to the change of A.
45+
To make things worse, each package comes with an installation process which is a shell script, so re-installation will make the
4446
package look like freshly built.
4547

46-
In this release, we track the installation in the build graph as well, and we calculate the hash of the installation of dependencies and put it in the
47-
dependent's command line flags for building binary artifacts. Such strategy benefits in such aspects:
48+
In this release, we track the installation in the build graph as well, and we calculate the hash of the installation of dependencies and put it in the
49+
dependent's command line flags for building binary artifacts. Such strategy benefits in such aspects:
4850

4951
- The calculation of the hash of installation is almost free since it is just one stat, we don't need track all dependencies' artifacts.
50-
- The introducion of such hashing does not appear in parsing, so that the changes of dependencies will never trigger re-parsing.
51-
- Once the package installation is a nop, the transitive rebuild graph will be cut off so that we can save some unneeded rebuild.
52-
- When people make changes to the depdendencies, if such changes don't change the package interface, it will not trigger the build of its dependents.
52+
- The introduction of such hashing does not appear in parsing, so that the changes of dependencies will never trigger re-parsing.
53+
- Once the package installation is a no-op, the transitive rebuild graph will be cut off so that we can save some unneeded rebuild.
54+
- When people make changes to the dependencies, if such changes don't change the package interface, it will not trigger the build of its dependents.
5355

5456
### Introducing `pinned-dependencies`
5557

56-
To make `bsb -make-world` more pratical, we also introduce a new concept called: `pinned-dependencies`.
58+
To make `bsb -make-world` more practical, we also introduce a new concept called: `pinned-dependencies`.
5759
In general, packages are classified as three categories:
5860

5961
- toplevel
6062
- warnings reported
6163
- warn-error respected
6264
- build dev dependency
6365
- run custom rules
64-
- package-specs like es6/commonjs overrides all its dependencies
66+
- package-specs like ES6/CommonJS overrides all its dependencies
6567
- pinned dependencies
6668
- warnings reported
6769
- warn-error respected
@@ -72,21 +74,20 @@ In general, packages are classified as three categories:
7274
- ignore dev directories
7375
- ignore custom generator rules
7476

75-
Previously, we only had `toplevel` and `normal dependencies`, by introducing `pinned-dependencies`,
76-
such package will be built mostly like `toplevel` packages.
77+
Previously, we only had `toplevel` and `normal dependencies`, by introducing `pinned-dependencies`,
78+
such package will be built mostly like `toplevel` packages.
7779

78-
The usage is quite simple, add `pinned-dependencies` in the toplevel package's `bsconfig.json`.
80+
The usage is quite simple, add `pinned-dependencies` in the toplevel package's `bsconfig.json`.
7981
Note such field only make sense in toplevel's configuration.
8082

81-
8283
### More robust handling of removal of staled output
8384

84-
When people delete or rename rescript files, it will introduce dangling staled output, for example, renaming `src/A.res`
85-
into `src/B.res` will bring `src/A.cmi` (and more intemediate outputs) stale. This is worse than it sounds like, suppose you have a
85+
When people delete or rename ReScript files, it will introduce dangling staled output, for example, renaming `src/A.res`
86+
into `src/B.res` will bring `src/A.cmi` (and more intermediate outputs) stale. This is worse than it sounds like, suppose you have a
8687
local `src/List.res` which shadows the stdlib's List. Now we remove it, it will introduce stale `List.cmi` file, without the proper removal
8788
of such stale outptu, such stale `List.cmi` file will break the integrity of the build.
8889

89-
In this release, we introduced a more robust algorithm that will always remove stale output before the build so
90+
In this release, we introduced a more robust algorithm that will always remove stale output before the build so
9091
that such integrity is not broken.
9192

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

0 commit comments

Comments
 (0)