Skip to content

Commit 2dd9a4a

Browse files
authored
feat(schema-compiler): Boost models transpilation 10-13x times (using SWC instead of Babel) (#9225)
* Init proj structure * implement transpilers * add transpilers crate to backend native * prepare transpile_js native implementation * export transpileJs from backend native * removed workerpool & sync pkg versions * update transpileJsFile with native impl use * add new() to all transpilers * remove unused * fix tests * polish transpilers, add support for error reporter * setup CI for cubetranspilers testing * derive default for TransformMetaData * move deserializer into thread closure * Revert "remove unused" This reverts commit 4491f6b. * return back previous transpilationWorkerThreads flow * Update CI to run tests for all cases: old, threads, native * some improvements * move tests to a separate folder
1 parent d209e83 commit 2dd9a4a

File tree

32 files changed

+7053
-145
lines changed

32 files changed

+7053
-145
lines changed

.github/workflows/push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- 'rust/cubeorchestrator/**'
1414
- 'rust/cubeshared/**'
1515
- 'rust/cubesqlplanner/**'
16+
- 'rust/cubetranspilers/**'
1617
- '.eslintrc.js'
1718
- '.prettierrc'
1819
- 'package.json'
@@ -32,6 +33,7 @@ on:
3233
- 'rust/cubeorchestrator/**'
3334
- 'rust/cubeshared/**'
3435
- 'rust/cubesqlplanner/**'
36+
- 'rust/cubetranspilers/**'
3537
- '.eslintrc.js'
3638
- '.prettierrc'
3739
- 'package.json'
@@ -55,10 +57,15 @@ jobs:
5557
node-version: [20.x, 22.x]
5658
python-version: [3.11]
5759
transpile-worker-threads: [false, true]
60+
transpile-native: [false, true]
61+
exclude:
62+
- transpile-worker-threads: true
63+
transpile-native: true
5864
fail-fast: false
5965

6066
env:
6167
CUBEJS_TRANSPILATION_WORKER_THREADS: ${{ matrix.transpile-worker-threads }}
68+
CUBEJS_TRANSPILATION_NATIVE: ${{ matrix.transpile-native }}
6269
steps:
6370
- id: get-tag-out
6471
run: echo "$OUT"
@@ -133,6 +140,9 @@ jobs:
133140
- name: Cargo test cubeshared
134141
run: |
135142
cargo test --manifest-path rust/cubeshared/Cargo.toml -j 1
143+
- name: Cargo test cubetranspilers
144+
run: |
145+
cargo test --manifest-path rust/cubetranspilers/Cargo.toml -j 1
136146
# - name: Cargo test cubesql
137147
# run: |
138148
# cargo test --manifest-path rust/cubesql/Cargo.toml -j 1
@@ -196,6 +206,9 @@ jobs:
196206
- name: Cargo fmt cubeshared
197207
run: |
198208
cargo fmt --manifest-path rust/cubeshared/Cargo.toml -- --check
209+
- name: Cargo fmt cubetranspilers
210+
run: |
211+
cargo fmt --manifest-path rust/cubetranspilers/Cargo.toml -- --check
199212
# - name: Cargo fmt cubesql
200213
# run: |
201214
# cargo fmt --manifest-path rust/cubesql/Cargo.toml -- --check
@@ -263,6 +276,9 @@ jobs:
263276
- name: Cargo build cubeshared
264277
run: |
265278
cargo build --manifest-path rust/cubeshared/Cargo.toml -j 4
279+
- name: Cargo build cubetranspilers
280+
run: |
281+
cargo build --manifest-path rust/cubetranspilers/Cargo.toml -j 4
266282
# - name: Cargo build cubesql
267283
# run: |
268284
# cargo build --manifest-path rust/cubesql/Cargo.toml -j 4

0 commit comments

Comments
 (0)