Commit 4d1546c
committed
fix(xtask): stop the debug bootstrap clobbering the release bindgen
`transpile()` writes the componentized module to
`obj/<name>.component.wasm`, then, on a clean `obj/`, runs a debug
bootstrap (`transpile_components(BuildType::Debug)`) to build the
`wasm-tools` transpiler that `jco opt` needs. That bootstrap transpiles
*all* components, including the one currently being built, into the same
`obj/*.component.wasm` paths, overwriting the release component with the
132 MiB debug build. `jco opt` and the final transpile then run on the
debug component, so `build:release` emits the debug bindgen (wasm-opt'd
to ~8.9 MiB / 17,688 funcs) instead of the release one
(~3.1 MiB / 7,836 funcs).
Re-write the release component to `component_path` after the bootstrap so
`jco opt` operates on the release build. The bootstrap only runs when
`obj/wasm-tools.js` is absent (a clean checkout), which is exactly how the
release workflow builds, so every published js-component-bindgen bindgen
was the debug one.
Signed-off-by: Alexander Shishenko <alex@shishenko.com>1 parent 95228c7 commit 4d1546c
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| |||
0 commit comments