Commit 4799827
committed
Fix review feedback: Wasm capitalization, version-aware node flags, refactor into ScalaJsOptions
- Replace "WASM" with "Wasm" per WebAssembly spec: contraction, not acronym
- Fix nodeNeedsWasmFlag to be version-aware: only pass --experimental-wasm-exnref
for Node < 25 (V8 12.x); Node 25+ has it enabled by default, Node 26+ may remove it
- Remove Node/Bun pre-flight version checks; let runtime fail naturally on old versions
- Remove else-if-emitWasm branch (not needed)
- Refactor WasmOptions into ScalaJsOptions: jsEmitWasm and wasmRuntime are now fields
of ScalaJsOptions at both build and CLI layers; CLI flags are now --js-emit-wasm and
--js-wasm-runtime under the Wasm help group; WasmOptions classes removed
- linkerConfig() now forces ESModule when jsEmitWasm=true
- Update all integration test CLI flags to --js-emit-wasm / --js-wasm-runtime1 parent 565048e commit 4799827
21 files changed
Lines changed: 131 additions & 256 deletions
File tree
- modules
- build/src/main/scala/scala/build/internal
- cli/src/main/scala/scala/cli/commands
- run
- core/src/main/scala/scala/build/errors
- directives/src/main/scala/scala/build/preprocessing/directives
- integration/src/test/scala/scala/cli/integration
- options/src/main/scala/scala/build/options
- website/docs/reference
- scala-command
Lines changed: 6 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 223 | | |
242 | 224 | | |
243 | 225 | | |
| |||
300 | 282 | | |
301 | 283 | | |
302 | 284 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | 285 | | |
308 | 286 | | |
309 | 287 | | |
| |||
322 | 300 | | |
323 | 301 | | |
324 | 302 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | 303 | | |
339 | 304 | | |
340 | 305 | | |
| |||
455 | 420 | | |
456 | 421 | | |
457 | 422 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | 423 | | |
463 | 424 | | |
464 | 425 | | |
| |||
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
478 | 478 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
| 491 | + | |
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
496 | 495 | | |
497 | 496 | | |
498 | 497 | | |
499 | 498 | | |
500 | | - | |
501 | | - | |
| 499 | + | |
| 500 | + | |
502 | 501 | | |
503 | 502 | | |
504 | 503 | | |
| |||
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
532 | | - | |
| 531 | + | |
533 | 532 | | |
534 | 533 | | |
535 | 534 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
Lines changed: 38 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
252 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
272 | 284 | | |
273 | 285 | | |
274 | 286 | | |
| |||
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 328 | | |
337 | 329 | | |
338 | 330 | | |
| |||
357 | 349 | | |
358 | 350 | | |
359 | 351 | | |
360 | | - | |
361 | | - | |
| 352 | + | |
| 353 | + | |
362 | 354 | | |
363 | 355 | | |
364 | 356 | | |
| |||
372 | 364 | | |
373 | 365 | | |
374 | 366 | | |
375 | | - | |
| 367 | + | |
376 | 368 | | |
377 | 369 | | |
378 | | - | |
| 370 | + | |
379 | 371 | | |
380 | 372 | | |
381 | 373 | | |
| |||
462 | 454 | | |
463 | 455 | | |
464 | 456 | | |
465 | | - | |
| 457 | + | |
466 | 458 | | |
467 | | - | |
468 | 459 | | |
469 | 460 | | |
470 | 461 | | |
| |||
Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
0 commit comments