feat!: add experimental RFC opt-ins#2737
Conversation
vize
@vizejs/fresco
@vizejs/musea-mcp-server
oxlint-plugin-vize
@vizejs/rspack-plugin
@vizejs/unplugin
@vizejs/vite-plugin
@vizejs/vite-plugin-musea
@vizejs/musea-nuxt
@vizejs/nuxt
commit: |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (79)
📝 WalkthroughWalkthroughThis PR adds three experimental compiler flags—in-tag ChangesExperimental Compiler Feature Plumbing
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as Vize CLI
participant Config as Config Loader
participant Compiler as Atelier Compiler
participant Tokenizer
participant Transform as Patterned Template Transform
CLI->>Config: load_build_config / load_compiler_vapor
Config-->>CLI: ConfigFeatureFlags (experimental_*)
CLI->>Compiler: CompileFileSettings with experimental flags
Compiler->>Tokenizer: ParserOptions.experimental_in_tag_comments
Tokenizer->>Tokenizer: detect // and emit on_in_tag_comment
Compiler->>Transform: TransformOptions.experimental_patterned_template
Transform->>Transform: desugar_patterned_templates(v-match/v-case)
Transform-->>Compiler: rewritten if/else-if/else AST
Compiler-->>CLI: compiled output
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR BenchmarkBase:
Raw run timesCompile SFC
Lint
Format
Type check (1T)
Type check (max)
|
f01fe16 to
c37e417
Compare
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8639 across 1215 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
c37e417 to
f64ece2
Compare
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8639 across 1215 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
PR BenchmarkBase:
Raw run timesCompile SFC
Lint
Format
Type check (1T)
Type check (max)
|
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8639 across 1215 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
Tool BenchmarkMeasured: 2026-07-08T20:08:25.149Z
Fairness notes:
Commands: gh workflow run tool-benchmark.yml --ref <branch> -f file_count=3000 -f check_file_count=500 -f vite_file_count=1000 -f nuxt_file_count=250 -f large_blocks=300 -f runs=3 -f warmups=1 -f commit_results=true
node bench/generate.mjs 3000
node bench/compare-tools.mjs --input bench/__in__ --vize-bin target/release/vize --runs 3 --warmups 1 --check-file-count 500 --vite-file-count 1000 --nuxt-file-count 250 --large-blocks 300 --runner-label "blacksmith-32vcpu-ubuntu-2404" --out tool-benchmark-summary.md --json tool-benchmark-results.json --doc performance-blacksmith.mdVariant details and raw run timesSFC compile
Large SFC compile
Large SFC type check
Lint
Format
Type check
Vite build (end-to-end)
Nuxt SPA build (end-to-end)
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/vize_atelier_ssr/src/options.rs (1)
90-100: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest doesn't cover new default flags.
test_default_optionswas not updated to assertexperimental_in_tag_commentsandexperimental_patterned_templatedefault tofalse. Given these gate experimental behavior, a regression here (e.g. flipped default) would silently enable experimental parsing for all consumers.✅ Proposed test addition
fn test_default_options() { let opts = SsrCompilerOptions::default(); assert!(opts.scope_id.is_none()); assert!(!opts.comments); + assert!(!opts.experimental_in_tag_comments); + assert!(!opts.experimental_patterned_template); assert!(opts.component_name.is_none());🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/vize_atelier_ssr/src/options.rs` around lines 90 - 100, Update the SsrCompilerOptions::default test to cover the new experimental flags so regressions in their defaults are caught. In test_default_options, add assertions that experimental_in_tag_comments and experimental_patterned_template are both false alongside the existing default checks, keeping the test aligned with SsrCompilerOptions::default and its new fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/vize_atelier_core/src/transform/patterned_template.rs`:
- Around line 27-114: The `rewrite_match_element`/`rewrite_case_element` flow
currently treats a leading `v-case.default` as `v-if="true"`, which makes later
branches unreachable. Update `desugar_patterned_templates` to validate or
reorder cases so `.default` is always handled last, regardless of source order:
either do a two-pass rewrite over `find_case_directive` results or emit a
`CompilerError` when `rewrite_case_element` sees a default case before other
branches. Use the existing `has_previous_branch`, `find_match_expression`, and
`rewrite_case_directive` symbols to keep the chain semantics correct.
In `@crates/vize_carton/src/config/loader.rs`:
- Around line 169-178: The Vapor fallback logic is duplicated between
load_compiler_vapor and the equivalent path in lint_features.rs, so refactor it
into a shared helper on RawVizeConfig (for example, a vapor_enabled method
returning Option<bool>). Update load_compiler_vapor to call that helper so both
call sites use the same compiler.vapor vs experimentals.vapor_enabled()
precedence and cannot drift.
In `@crates/vize_carton/src/config/model.rs`:
- Around line 187-198: The `RawExperimentalsConfig` field name typo is making
`pattenedTemplate` the canonical JSON key instead of `patternedTemplate`; rename
the struct field in `model.rs` so `rename_all = "camelCase"` produces the
correct primary key, and keep `pattenedTemplate` only as an alias if needed.
Then update the related accessor and any schema/docs generation points that
reference `pattenedTemplate` so `patternedTemplate` is the public canonical
spelling.
---
Outside diff comments:
In `@crates/vize_atelier_ssr/src/options.rs`:
- Around line 90-100: Update the SsrCompilerOptions::default test to cover the
new experimental flags so regressions in their defaults are caught. In
test_default_options, add assertions that experimental_in_tag_comments and
experimental_patterned_template are both false alongside the existing default
checks, keeping the test aligned with SsrCompilerOptions::default and its new
fields.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f8e5d115-cff6-4d94-a92d-ce8fe9ac5b13
⛔ Files ignored due to path filters (3)
npm/cli/pkl/VizeConfig.pklis excluded by!**/*.pklnpm/cli/pkl/jsonschema/generate.pklis excluded by!**/*.pklnpm/cli/pkl/vize.pklis excluded by!**/*.pkl
📒 Files selected for processing (69)
crates/vize/src/commands/build/runner.rscrates/vize/src/commands/build/runner/compile.rscrates/vize/src/commands/build/runner/compile_stats.rscrates/vize/src/commands/build/runner/settings.rscrates/vize/src/commands/check/runner.rscrates/vize_armature/src/parser.rscrates/vize_armature/src/parser/callbacks.rscrates/vize_armature/src/parser/element/comment.rscrates/vize_armature/src/parser/tests.rscrates/vize_armature/src/tokenizer.rscrates/vize_armature/src/tokenizer/states.rscrates/vize_armature/src/tokenizer/types.rscrates/vize_atelier_core/src/lane.rscrates/vize_atelier_core/src/transform/patterned_template.rscrates/vize_atelier_dom/src/compile.rscrates/vize_atelier_dom/src/options.rscrates/vize_atelier_dom/src/tests.rscrates/vize_atelier_sfc/src/compile.rscrates/vize_atelier_sfc/src/compile_template.rscrates/vize_atelier_sfc/src/compile_template/vapor.rscrates/vize_atelier_sfc/src/types.rscrates/vize_atelier_ssr/src/lib.rscrates/vize_atelier_ssr/src/options.rscrates/vize_atelier_vapor/src/compile.rscrates/vize_canon/src/batch/type_checker.rscrates/vize_canon/src/batch/virtual_project.rscrates/vize_canon/src/batch/virtual_project/art_usage.rscrates/vize_canon/src/batch/virtual_project/build.rscrates/vize_canon/src/batch/virtual_project/document.rscrates/vize_canon/src/batch/virtual_project/project.rscrates/vize_canon/src/batch/virtual_project/vue_codegen.rscrates/vize_carton/src/config.rscrates/vize_carton/src/config/loader.rscrates/vize_carton/src/config/loader/lint_features.rscrates/vize_carton/src/config/loader/tests.rscrates/vize_carton/src/config/model.rscrates/vize_carton/tests/linter_features.rscrates/vize_relief/src/options.rscrates/vize_relief/src/relief/elements.rscrates/vize_relief/src/relief/nodes.rscrates/vize_vitrine/src/napi/sfc/batch.rscrates/vize_vitrine/src/napi/sfc/batch_results.rscrates/vize_vitrine/src/napi/sfc/compile.rscrates/vize_vitrine/src/napi/sfc/types.rscrates/vize_vitrine/src/napi/template.rscrates/vize_vitrine/src/types.rscrates/vize_vitrine/src/wasm/compiler.rscrates/vize_vitrine/src/wasm/options.rseditors/vscode/syntaxes/vue.tmLanguage.jsonnpm/builder/rspack/src/shared/compiler.tsnpm/builder/rspack/src/types/index.tsnpm/builder/unplugin/src/compiler.tsnpm/builder/unplugin/src/normalize-options.test.tsnpm/builder/unplugin/src/types.tsnpm/builder/unplugin/src/unplugin.tsnpm/builder/vite/src/compile-options.test.tsnpm/builder/vite/src/compile-options.tsnpm/builder/vite/src/plugin/index.tsnpm/builder/vite/src/plugin/state.test.tsnpm/builder/vite/src/plugin/state.tsnpm/builder/vite/src/test.tsnpm/builder/vite/src/types.tsnpm/cli/README.mdnpm/cli/schemas/vize.config.schema.jsonnpm/cli/src/types/generated.tsnpm/native/index.d.tsnpm/native/types/compiler.d.tsnpm/native/types/sfc.d.tstests/tooling/vscode-vize-template-grammar.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: tool-benchmark
- GitHub Check: criterion-ab
⚠️ CI failures not shown inline (33)
GitHub Actions: Check / playground-test: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_fresco): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_atelier_ssr): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_atelier_core): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_carton): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_atelier_vapor): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_relief): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_armature): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_atelier_dom): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / test-scripts: feat!: add experimental RFC opt-ins
Conclusion: failure
Post job cleanup.
Post job cleanup.
Found device /dev/vdd for mount point /home/runner/_work/vize/vize/target
Filesystem usage: 4207226880 bytes (3.92 GiB)
Successfully unmounted /home/runner/_work/vize/vize/target
guest flush duration: 8ms, device: /dev/vdd, before_stats: 255825 0 2684938 621356 240453 0 3338272 21958 0 16712 643639 0 0 0 0 52 323, after_stats: 255825 0 2684938 621356 240453 0 3338272 21958 0 16712 643639 0 0 0 0 52 323
Checking for previous step failures before committing sticky disk
##[warning]Found 2 failed/cancelled steps in previous workflow steps
##[warning] - Step: unknown (failed)
##[warning]Skipping sticky disk commit due to previous step failures
Cleaning up sticky disk ubugeeei-prod/vize-test-scripts-target-Linux-X64-***REDACTED*** with expose ID 01KX1NDWRNHCN6BAFP8YAR0BH5
Creating sticky disk client with port 1026
Post job cleanup.
Found device /dev/vdc for mount point /home/runner/.cargo/git
Filesystem usage: 233160704 bytes (0.22 GiB)
Successfully unmounted /home/runner/.cargo/git
guest flush duration: 7ms, device: /dev/vdc, before_stats: 4243 0 36170 3860 101 0 720 26 0 564 3893 0 0 0 0 21 6, after_stats: 4243 0 36170 3860 101 0 720 26 0 564 3893 0 0 0 0 21 6
Checking for previous step failures before committing sticky disk
##[warning]Found 2 failed/cancelled steps in previous workflow steps
##[warning] - Step: unknown (failed)
##[warning]Skipping sticky disk commit due to previous step failures
Cleaning up sticky disk ubugeeei-prod/vize-test-scripts-cargo-git-Linux-X64-***REDACTED*** with expose ID 01KX1NDVPZBZXA7GT40A86TAPN
Creating sticky disk client with port 1026
Post job...
GitHub Actions: Check / cargo-semver-checks (vize_croquis): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_musea): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / cargo-semver-checks (vize_atelier_sfc): feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / security-audit: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 22_security-audit.txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / test-js-packages: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run vp run --workspace-root test:js
�[36;1mvp run --workspace-root test:js�[0m
shell: /usr/bin/bash -e {0}
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NODE_OPTIONS: --disable-warning=DEP0040 --disable-warning=DEP0169
BLACKSMITH_RUNNER_MESSAGE_WAIT_MS: 304
BLACKSMITH_RUNNER_ACQUIRE_JOB_MS: 1066
GITHUB_REPO_NAME: ubugeeei-prod/vize
MOON_HOME: /home/runner/_work/_temp/moonbit
MOON_BIN: /home/runner/_work/_temp/moonbit-shims/moon
CARGO_HOME: /home/runner/.cargo
CARGO_INCREMENTAL: 0
##[endgroup]
$ sh -c 'cd ./npm/native && pnpm run build:debug' ⊘ cache disabled
> `@vizejs/native`@0.286.0 build:debug /home/runner/_work/vize/vize/npm/native
> node ./scripts/build-local.mjs
�[1m�[92m Compiling�[0m vize_carton v0.286.0 (/home/runner/_work/vize/vize/crates/vize_carton)
�[1m�[92m Compiling�[0m vize_vitrine v0.286.0 (/home/runner/_work/vize/vize/crates/vize_vitrine)
�[1m�[92m Compiling�[0m vize_relief v0.286.0 (/home/runner/_work/vize/vize/crates/vize_relief)
�[1m�[92m Compiling�[0m vize_croquis v0.286.0 (/home/runner/_work/vize/vize/crates/vize_croquis)
�[1m�[92m Compiling�[0m vize_armature v0.286.0 (/home/runner/_work/vize/vize/crates/vize_armature)
�[1m�[92m Compiling�[0m vize_atelier_core v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelier_core)
�[1m�[92m Compiling�[0m vize_croquis_cf v0.286.0 (/home/runner/_work/vize/vize/crates/vize_croquis_cf)
�[1m�[92m Compiling�[0m vize_atelier_dom v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelier_dom)
�[1m�[92m Compiling�[0m vize_atelier_ssr v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelier_ssr)
�[1m�[92m Compiling�[0m vize_atelier_vapor v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelier_vapor)
�[1m�[92m Compiling�[0m vize_atelier_sfc v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelier_sfc)
�[1m�[92m Compiling�[0m vize_atelier_jsx v0.286.0 (/home/runner/_work/vize/vize/crates/vize_atelie...
GitHub Actions: Check / 2_playground-test.txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 5_cargo-semver-checks (vize_atelier_vapor).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 3_cargo-semver-checks (vize_atelier_ssr).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 4_cargo-semver-checks (vize_fresco).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 6_cargo-semver-checks (vize_atelier_core).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 9_cargo-semver-checks (vize_atelier_dom).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 8_cargo-semver-checks (vize_carton).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 7_cargo-semver-checks (vize_armature).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 15_cargo-semver-checks (vize_croquis).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 16_cargo-semver-checks (vize_atelier_sfc).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 14_cargo-semver-checks (vize_musea).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / 11_cargo-semver-checks (vize_relief).txt: feat!: add experimental RFC opt-ins
Conclusion: failure
##[group]Run bail() {
�[36;1mbail() {�[0m
�[36;1m printf '::error::install-action: %s\n' "$*"�[0m
GitHub Actions: Check / test-scripts: feat!: add experimental RFC opt-ins
Conclusion: failure
ure matrix 677 (0.012574ms)
✔ vscode lsp initialization feature matrix 678 (0.012283ms)
✔ vscode lsp initialization feature matrix 679 (0.012243ms)
✔ vscode lsp initialization feature matrix 67a (0.013396ms)
✔ vscode lsp initialization feature matrix 67b (0.013115ms)
✔ vscode lsp initialization feature matrix 67c (0.012764ms)
✔ vscode lsp initialization feature matrix 67d (0.012434ms)
✔ vscode lsp initialization feature matrix 67e (0.012023ms)
✔ vscode lsp initialization feature matrix 67f (0.012263ms)
✔ vscode lsp initialization feature matrix 680 (0.013896ms)
✔ vscode lsp initialization feature matrix 681 (0.013515ms)
✔ vscode lsp initialization feature matrix 682 (0.012433ms)
✔ vscode lsp initialization feature matrix 683 (0.012554ms)
✔ vscode lsp initialization feature matrix 684 (0.012543ms)
✔ vscode lsp initialization feature matrix 685 (0.014046ms)
✔ vscode lsp initialization feature matrix 686 (0.02114ms)
✔ vscode lsp initialization feature matrix 687 (0.013515ms)
✔ vscode lsp initialization feature matrix 688 (0.012994ms)
✔ vscode lsp initialization feature matrix 689 (0.012073ms)
✔ vscode lsp initialization feature matrix 68a (0.012463ms)
✔ vscode lsp initialization feature matrix 68b (0.013275ms)
✔ vscode lsp initialization feature matrix 68c (0.012544ms)
✔ vscode lsp initialization feature matrix 68d (0.012534ms)
✔ vscode lsp initialization feature matrix 68e (0.012483ms)
✔ vscode lsp initialization feature matrix 68f (0.013465ms)
✔ vscode lsp initialization feature matrix 690 (0.012874ms)
✔ vscode lsp initialization feature matrix 691 (0.012774ms)
✔ vscode lsp initialization feature matrix 692 (0.012263ms)
✔ vscode lsp initialization feature matrix 693 (0.012704ms)
✔ vscode lsp initialization feature matrix 694 (0.012503ms)
✔ vscode lsp initialization feature matrix 695 (0.012644ms)
✔ vscode lsp initialization feature matrix 696 (0.013565ms)
✔ vscode lsp initialization feature matrix 697 (0.012543ms)
✔ vscode lsp init...
GitHub Actions: Check / 23_test-js-packages.txt: feat!: add experimental RFC opt-ins
Conclusion: failure
THUB_REPO_NAME: ubugeeei-prod/vize
MOON_HOME: /home/runner/_work/_temp/moonbit
MOON_BIN: /home/runner/_work/_temp/moonbit-shims/moon
CARGO_HOME: /home/runner/.cargo
CARGO_INCREMENTAL: 0
##[endgroup]
##[group]Run rustc +stable --version --verbose
�[36;1mrustc +stable --version --verbose�[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NODE_OPTIONS: --disable-warning=DEP0040 --disable-warning=DEP0169
BLACKSMITH_RUNNER_MESSAGE_WAIT_MS: 304
BLACKSMITH_RUNNER_ACQUIRE_JOB_MS: 1066
GITHUB_REPO_NAME: ubugeeei-prod/vize
MOON_HOME: /home/runner/_work/_temp/moonbit
MOON_BIN: /home/runner/_work/_temp/moonbit-shims/moon
CARGO_HOME: /home/runner/.cargo
CARGO_INCREMENTAL: 0
##[endgroup]
rustc 1.96.1 (31fca3adb 2026-06-26)
binary: rustc
commit-hash: 31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd
commit-date: 2026-06-26
host: x86_64-unknown-linux-gnu
release: 1.96.1
LLVM version: 22.1.2
##[group]Run wild-linker/action@0bbbfa5df4380cab8e63cb8505a1ce65e1d10203
with:
wild-version: 0.9.0
download-retries: 5
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NODE_OPTIONS: --disable-warning=DEP0040 --disable-warning=DEP0169
BLACKSMITH_RUNNER_MESSAGE_WAIT_MS: 304
BLACKSMITH_RUNNER_ACQUIRE_JOB_MS: 1066
GITHUB_REPO_NAME: ubugeeei-prod/vize
MOON_HOME: /home/runner/_work/_temp/moonbit
MOON_BIN: /home/runner/_work/_temp/moonbit-shims/moon
CARGO_HOME: /home/runner/.cargo
CARGO_INCREMENTAL: 0
##[endgroup]
##[group]Run case "$RUNNER_ARCH" in
�[36;1mcase "$RUNNER_ARCH" in�[0m
�[36;1m X64) target_arch="x86_64" ;;�[0m
�[36;1m ARM64) target_arch="aarch64" ;;�[0m
�[36;1m *) echo "Unsupported architecture: $RUNNER_ARCH" >&2; exit 1 ;;�[0m
�[36;1mesac�[0m
�[36;1m�[0m
�[36;1mmkdir "${RUNNER_TEMP}/wild-install"�[0m
�[36;1m�[0m
�[36;1murl="https://github.com/wild-linker/wild/releases/download/0.9.0/...
GitHub Actions: Check / 10_test-scripts.txt: feat!: add experimental RFC opt-ins
Conclusion: failure
ure matrix 677 (0.012574ms)
✔ vscode lsp initialization feature matrix 678 (0.012283ms)
✔ vscode lsp initialization feature matrix 679 (0.012243ms)
✔ vscode lsp initialization feature matrix 67a (0.013396ms)
✔ vscode lsp initialization feature matrix 67b (0.013115ms)
✔ vscode lsp initialization feature matrix 67c (0.012764ms)
✔ vscode lsp initialization feature matrix 67d (0.012434ms)
✔ vscode lsp initialization feature matrix 67e (0.012023ms)
✔ vscode lsp initialization feature matrix 67f (0.012263ms)
✔ vscode lsp initialization feature matrix 680 (0.013896ms)
✔ vscode lsp initialization feature matrix 681 (0.013515ms)
✔ vscode lsp initialization feature matrix 682 (0.012433ms)
✔ vscode lsp initialization feature matrix 683 (0.012554ms)
✔ vscode lsp initialization feature matrix 684 (0.012543ms)
✔ vscode lsp initialization feature matrix 685 (0.014046ms)
✔ vscode lsp initialization feature matrix 686 (0.02114ms)
✔ vscode lsp initialization feature matrix 687 (0.013515ms)
✔ vscode lsp initialization feature matrix 688 (0.012994ms)
✔ vscode lsp initialization feature matrix 689 (0.012073ms)
✔ vscode lsp initialization feature matrix 68a (0.012463ms)
✔ vscode lsp initialization feature matrix 68b (0.013275ms)
✔ vscode lsp initialization feature matrix 68c (0.012544ms)
✔ vscode lsp initialization feature matrix 68d (0.012534ms)
✔ vscode lsp initialization feature matrix 68e (0.012483ms)
✔ vscode lsp initialization feature matrix 68f (0.013465ms)
✔ vscode lsp initialization feature matrix 690 (0.012874ms)
✔ vscode lsp initialization feature matrix 691 (0.012774ms)
✔ vscode lsp initialization feature matrix 692 (0.012263ms)
✔ vscode lsp initialization feature matrix 693 (0.012704ms)
✔ vscode lsp initialization feature matrix 694 (0.012503ms)
✔ vscode lsp initialization feature matrix 695 (0.012644ms)
✔ vscode lsp initialization feature matrix 696 (0.013565ms)
✔ vscode lsp initialization feature matrix 697 (0.012543ms)
✔ vscode lsp init...
GitHub Actions: Check / clippy-and-test: feat!: add experimental RFC opt-ins
Conclusion: failure
tests/build_cli.rs (target/debug/deps/build_cli-519e4126118fec28)
running 4 tests
test build_rejects_legacy_vue_without_host_compiler ... ok
test build_resolves_imported_base_interface_props_in_normal_script ... ok
test build_resolves_props_from_mixed_reexported_vue_interface ... ok
test build_respects_configured_template_syntax_quirks ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
�[1m�[92m Running�[0m tests/build_profile_cli.rs (target/debug/deps/build_profile_cli-4e51ad3135e0eda4)
running 1 test
test build_stats_profile_reports_source_plate_facts ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
�[1m�[92m Running�[0m tests/check_absolute_paths_cli.rs (target/debug/deps/check_absolute_paths_cli-726cdbf64bee5186)
running 1 test
test check_rejects_absolute_input_outside_project_root_with_tsconfig ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
�[1m�[92m Running�[0m tests/check_allowjs_imports_cli.rs (target/debug/deps/check_allowjs_imports_cli-292b37ac65216a78)
running 1 test
test check_allowjs_resolves_project_local_js_imports ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
�[1m�[92m Running�[0m tests/check_ambient_export_assignment_cli.rs (target/debug/deps/check_ambient_export_assignment_cli-a0c981b2ff7db711)
running 1 test
test check_allows_export_assignment_inside_ambient_module_declaration ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
�[1m�[92m Running�[0m tests/check_canon_boolean_tsx_regressions_cli.rs (target/debug/deps/check_canon_boolean_tsx_regressions_cli-4d2114d42c8be0e8)
running 2 tests
test check_type_based_boolean_props_are_normalized_in_setup ... ok
�[1m�[92m Running�[0m tests/check_canon_component_derived_props_cli.rs (target/debug/d...
GitHub Actions: Check / 18_clippy-and-test.txt: feat!: add experimental RFC opt-ins
Conclusion: failure
tests/build_cli.rs (target/debug/deps/build_cli-519e4126118fec28)
running 4 tests
test build_rejects_legacy_vue_without_host_compiler ... ok
test build_resolves_imported_base_interface_props_in_normal_script ... ok
test build_resolves_props_from_mixed_reexported_vue_interface ... ok
test build_respects_configured_template_syntax_quirks ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
�[1m�[92m Running�[0m tests/build_profile_cli.rs (target/debug/deps/build_profile_cli-4e51ad3135e0eda4)
running 1 test
test build_stats_profile_reports_source_plate_facts ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
�[1m�[92m Running�[0m tests/check_absolute_paths_cli.rs (target/debug/deps/check_absolute_paths_cli-726cdbf64bee5186)
running 1 test
test check_rejects_absolute_input_outside_project_root_with_tsconfig ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
�[1m�[92m Running�[0m tests/check_allowjs_imports_cli.rs (target/debug/deps/check_allowjs_imports_cli-292b37ac65216a78)
running 1 test
test check_allowjs_resolves_project_local_js_imports ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
�[1m�[92m Running�[0m tests/check_ambient_export_assignment_cli.rs (target/debug/deps/check_ambient_export_assignment_cli-a0c981b2ff7db711)
running 1 test
test check_allows_export_assignment_inside_ambient_module_declaration ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
�[1m�[92m Running�[0m tests/check_canon_boolean_tsx_regressions_cli.rs (target/debug/deps/check_canon_boolean_tsx_regressions_cli-4d2114d42c8be0e8)
running 2 tests
test check_type_based_boolean_props_are_normalized_in_setup ... ok
�[1m�[92m Running�[0m tests/check_canon_component_derived_props_cli.rs (target/debug/d...
🧰 Additional context used
📓 Path-based instructions (3)
npm/**
⚙️ CodeRabbit configuration file
npm/**: Check package boundaries, peer/optional dependency behavior, ESM/CJS compatibility, and whether published files stay usable from a consumer project rather than only inside the monorepo.
Files:
npm/builder/vite/src/test.tsnpm/builder/vite/src/compile-options.test.tsnpm/native/types/compiler.d.tsnpm/builder/unplugin/src/normalize-options.test.tsnpm/builder/unplugin/src/unplugin.tsnpm/builder/unplugin/src/compiler.tsnpm/cli/README.mdnpm/builder/rspack/src/shared/compiler.tsnpm/cli/src/types/generated.tsnpm/builder/vite/src/plugin/index.tsnpm/native/types/sfc.d.tsnpm/builder/rspack/src/types/index.tsnpm/builder/vite/src/plugin/state.tsnpm/cli/schemas/vize.config.schema.jsonnpm/builder/vite/src/plugin/state.test.tsnpm/builder/unplugin/src/types.tsnpm/builder/vite/src/types.tsnpm/builder/vite/src/compile-options.tsnpm/native/index.d.ts
crates/**
⚙️ CodeRabbit configuration file
crates/**: Focus on parser/compiler correctness, source locations, UTF-8/UTF-16 offset handling, and panic-free LSP behavior. Flag changes that only work for small fixtures but break real Vue/Nuxt projects.
Files:
crates/vize/src/commands/build/runner/compile.rscrates/vize_carton/src/config/loader/lint_features.rscrates/vize_canon/src/batch/virtual_project/document.rscrates/vize_vitrine/src/napi/sfc/batch_results.rscrates/vize_carton/tests/linter_features.rscrates/vize_canon/src/batch/type_checker.rscrates/vize_armature/src/parser/callbacks.rscrates/vize_armature/src/parser/element/comment.rscrates/vize/src/commands/check/runner.rscrates/vize_atelier_core/src/lane.rscrates/vize_vitrine/src/napi/sfc/compile.rscrates/vize_atelier_sfc/src/compile_template/vapor.rscrates/vize_armature/src/tokenizer/types.rscrates/vize_atelier_dom/src/compile.rscrates/vize_canon/src/batch/virtual_project.rscrates/vize/src/commands/build/runner/settings.rscrates/vize_carton/src/config/loader.rscrates/vize/src/commands/build/runner/compile_stats.rscrates/vize_atelier_vapor/src/compile.rscrates/vize/src/commands/build/runner.rscrates/vize_vitrine/src/wasm/options.rscrates/vize_vitrine/src/types.rscrates/vize_relief/src/relief/nodes.rscrates/vize_atelier_dom/src/options.rscrates/vize_armature/src/parser.rscrates/vize_canon/src/batch/virtual_project/build.rscrates/vize_atelier_dom/src/tests.rscrates/vize_atelier_core/src/transform/patterned_template.rscrates/vize_atelier_sfc/src/compile.rscrates/vize_carton/src/config.rscrates/vize_armature/src/tokenizer.rscrates/vize_relief/src/options.rscrates/vize_atelier_ssr/src/lib.rscrates/vize_vitrine/src/wasm/compiler.rscrates/vize_vitrine/src/napi/sfc/batch.rscrates/vize_canon/src/batch/virtual_project/art_usage.rscrates/vize_atelier_sfc/src/compile_template.rscrates/vize_atelier_ssr/src/options.rscrates/vize_atelier_sfc/src/types.rscrates/vize_vitrine/src/napi/sfc/types.rscrates/vize_relief/src/relief/elements.rscrates/vize_canon/src/batch/virtual_project/vue_codegen.rscrates/vize_carton/src/config/loader/tests.rscrates/vize_carton/src/config/model.rscrates/vize_armature/src/tokenizer/states.rscrates/vize_canon/src/batch/virtual_project/project.rscrates/vize_vitrine/src/napi/template.rscrates/vize_armature/src/parser/tests.rs
tests/tooling/**
⚙️ CodeRabbit configuration file
tests/tooling/**: Ensure workflow and release tests assert observable behavior rather than incidental formatting. Prefer focused assertions that keep PRs small and failures easy to diagnose.
Files:
tests/tooling/vscode-vize-template-grammar.test.ts
🔇 Additional comments (84)
crates/vize_armature/src/tokenizer/types.rs (1)
28-28: LGTM!Also applies to: 109-109
crates/vize_armature/src/tokenizer.rs (1)
83-86: LGTM!Also applies to: 122-122, 140-144, 204-204
crates/vize_armature/src/tokenizer/states.rs (3)
9-11: LGTM!Also applies to: 50-50, 104-108
416-423: 🎯 Functional CorrectnessClarify tag-comment termination
state_in_tag_commentappears to rely only on line breaks; check whether a//comment on the same line as>or/>can swallow the tag close and misparse following markup.
387-394: 🎯 Functional CorrectnessCheck
InTagCommentspan boundaries. Confirm whetheron_in_tag_commentexpects the leading//to be included or excluded; the tokenizer currently startssection_startat the first/.crates/vize_canon/src/batch/virtual_project/vue_codegen.rs (1)
52-52: LGTM!Also applies to: 123-126, 195-199
crates/vize/src/commands/check/runner.rs (1)
314-314: LGTM!editors/vscode/syntaxes/vue.tmLanguage.json (1)
73-73: LGTM!Also applies to: 745-756, 771-771
tests/tooling/vscode-vize-template-grammar.test.ts (1)
162-164: LGTM!Also applies to: 179-203
crates/vize_armature/src/parser.rs (1)
243-243: LGTM!Also applies to: 253-253
crates/vize_armature/src/parser/callbacks.rs (1)
108-111: LGTM!crates/vize_armature/src/parser/element/comment.rs (1)
31-42: LGTM!crates/vize_armature/src/parser/tests.rs (1)
10-10: LGTM!Also applies to: 629-714
crates/vize_canon/src/batch/virtual_project/project.rs (1)
53-53: LGTM!Also applies to: 114-117, 150-150, 198-198, 233-233
crates/vize_relief/src/relief/elements.rs (1)
150-163: 🗄️ Data Integrity & IntegrationHandle
CommentKindin the downstream JSON serializer. The new comments array needs a consistent mapping for N-API/WASM consumers.crates/vize_canon/src/batch/virtual_project/document.rs (1)
93-102: 🗄️ Data Integrity & IntegrationDocument mode may be dropping
experimental_in_tag_comments. This path hardcodesfalse; if document-mode virtual TS should respect the project toggle, thread the flag through here as well.crates/vize_relief/src/options.rs (1)
85-86: LGTM!Also applies to: 111-111, 154-155, 180-180
crates/vize_canon/src/batch/type_checker.rs (1)
197-201: LGTM!crates/vize_canon/src/batch/virtual_project/art_usage.rs (1)
7-27: LGTM!Also applies to: 29-68, 74-95
crates/vize_canon/src/batch/virtual_project/build.rs (1)
43-58: LGTM!Also applies to: 101-144
crates/vize_canon/src/batch/virtual_project.rs (1)
125-127: 🗄️ Data Integrity & IntegrationConfirm
experimental_in_tag_commentsis wired through all construction paths. Ensure everyVirtualProjectinitializer sets the new field and that the value reachesVirtualBuildContext; otherwiseset_experimental_in_tag_commentshas no effect.crates/vize_relief/src/relief/nodes.rs (1)
18-24: 🚀 Performance & ScalabilityInspect
CommentNodestorage strategy.RootNodemixes arena-backed fields withcomments: Vec<'a, CommentNode>; ifCommentNodeownsStrings, each comment adds heap allocations on a hot parse path.crates/vize_carton/src/config/loader/lint_features.rs (1)
12-16: 📐 Maintainability & Code Quality | ⚡ Quick winDuplicate of
load_compiler_vaporfallback logic.See comment on
crates/vize_carton/src/config/loader.rsload_compiler_vapor— this is the same fallback expressed differently and should share a single implementation.npm/cli/README.md (1)
84-90: 📐 Maintainability & Code Quality | ⚡ Quick winDocs reflect the
pattenedTemplatetypo as canonical.Both the config example and the options table document
experimentals.pattenedTemplateas the primary key name. This should be updated together with the Rust field rename suggested incrates/vize_carton/src/config/model.rsso the correctly-spelledpatternedTemplatebecomes canonical in user-facing docs.Also applies to: 171-175
npm/cli/schemas/vize.config.schema.json (2)
91-105: 📐 Maintainability & Code Quality | ⚡ Quick winSchema also encodes
pattenedTemplateas the primary property.Consistent with the model.rs typo — should be swapped once the Rust field is corrected so
patternedTemplateis primary. Additionally,ExperimentalSwitch'soneOf(boolean/object/null, Lines 87-90) is narrower than the runtime'sOption<serde_json::Value>, which will silently accept other JSON types (e.g. strings/numbers) that this schema would flag as invalid in editor tooling — minor inconsistency, likely acceptable given the permissive intent of the switch pattern.
763-765: LGTM!Also applies to: 846-848
crates/vize_carton/src/config/model.rs (1)
222-226: LGTM!crates/vize_carton/src/config.rs (1)
10-11: LGTM!crates/vize_carton/src/config/loader/tests.rs (1)
208-261: LGTM! Good coverage of alias handling, false/null disabling, and jsx_mode derivation.crates/vize_carton/tests/linter_features.rs (1)
32-43: LGTM!crates/vize_atelier_dom/src/compile.rs (1)
169-169: LGTM!Also applies to: 214-214
crates/vize_atelier_dom/src/options.rs (1)
45-52: LGTM!Also applies to: 99-100, 124-125
crates/vize_atelier_ssr/src/options.rs (1)
21-28: LGTM!Also applies to: 70-71
crates/vize_atelier_vapor/src/compile.rs (1)
29-32: LGTM!Also applies to: 119-119, 149-149
crates/vize_atelier_ssr/src/lib.rs (1)
100-100: LGTM!Also applies to: 134-134
crates/vize/src/commands/build/runner.rs (2)
127-135: LGTM!
58-67: 🚀 Performance & ScalabilityConsider consolidating config loads. If these helpers all read the same config file independently, this path does repeated parsing on every build invocation.
crates/vize/src/commands/build/runner/compile.rs (1)
121-123: LGTM!crates/vize_atelier_sfc/src/compile_template/vapor.rs (1)
16-23: 🎯 Functional CorrectnessEnsure the
compile_template.rscaller matches the newcompile_template_block_vaporsignature. It now takes&TemplateCompileOptionsinstead ofbool.crates/vize_atelier_dom/src/tests.rs (1)
690-732: LGTM!crates/vize_atelier_sfc/src/types.rs (1)
524-531: LGTM!crates/vize/src/commands/build/runner/compile_stats.rs (1)
176-187: LGTM!npm/cli/src/types/generated.ts (3)
133-142: LGTM!
50-50: LGTM!Also applies to: 610-610
126-129: 🎯 Functional CorrectnessPossible duplicate
ExperimentalSwitchdeclaration.
The snippet showsexport type ExperimentalSwitch = boolean | { [k: string]: unknown } | null;twice in the same range. If that’s a real duplicate innpm/cli/src/types/generated.ts, it will trigger TS2300 and break consumers; otherwise it’s a diff artifact.crates/vize_atelier_sfc/src/compile.rs (1)
347-347: 🗄️ Data Integrity & IntegrationVerify
compile_template_block_vaportakes&TemplateCompileOptionsand reads the experimental template flags intoVaporCompilerOptions.crates/vize_atelier_sfc/src/compile_template.rs (1)
92-109: 🗄️ Data Integrity & IntegrationCheck
experimental_server_scriptwiring. IfSsrCompilerOptions/DomCompilerOptionsexpose this flag, forward it here alongside the other experimental options; otherwiseTemplateCompileOptions.experimental_server_scriptis unused.crates/vize/src/commands/build/runner/settings.rs (1)
32-45: 🗄️ Data Integrity & IntegrationConfirm
cache_bitsbit widths
template_syntax_bits(self.template_syntax) << 3anddialect_bits(self.dialect) << 6only leave 2 bits and 3 bits, respectively; if either helper can exceed that range, it will overlap the new experimental flags at bits 9–11 and corrupt the cache key.crates/vize_atelier_core/src/lane.rs (1)
9-10: LGTM!Also applies to: 277-280
crates/vize_vitrine/src/napi/sfc/types.rs (1)
74-76: LGTM!Also applies to: 109-111
npm/builder/vite/src/plugin/state.test.ts (1)
158-224: LGTM!npm/builder/vite/src/plugin/state.ts (1)
78-80: LGTM!Also applies to: 97-99, 263-265
npm/builder/vite/src/test.ts (1)
3-3: LGTM!npm/builder/vite/src/types.ts (3)
238-250: 🗄️ Data Integrity & IntegrationUnclear whether the new
experimentalsobject is actually wired to the internal flat flags used bystate.ts.
VizeOptions.experimentalsis documented as the primary opt-in surface, butgetCompileOptionsForRequest/compileAllinplugin/state.tsonly read the@internalflat fields (experimentalInTagComments, etc.) directly fromstate.mergedOptions, neverstate.mergedOptions.experimentals. The normalization step that would mapexperimentals→ these flat internal fields (likelyplugin/index.ts) isn't part of this review batch, so it can't be confirmed here that settingexperimentalsactually has any effect on compilation.
19-21: LGTM!Also applies to: 405-407
113-125: 🎯 Functional CorrectnessClarify these public option aliases: if
intagComment/pattenedTemplateand"server script"are intended aliases, the runtime normalizer should map them to the canonical keys; otherwise they should not be part of the published.d.tssurface.crates/vize_atelier_core/src/transform/patterned_template.rs (1)
122-141: 🎯 Functional CorrectnessSynthetic condition expressions reuse the original directive loc.
rewrite_case_directivebuilds a new expression string but keeps the oldv-caselocation, soloc.sourcecan diverge from the node’s content. If any downstream offset math assumes those stay aligned, synthesize a generated location for the rewritten expression instead.crates/vize_vitrine/src/napi/sfc/batch_results.rs (1)
41-43: 🎯 Functional CorrectnessSame SfcParseOptions/ScriptCompileOptions gap as
batch.rs.
experimental_in_tag_commentsisn't forwarded tosfc_parse'sSfcParseOptions(Line 69-75), andexperimental_server_scriptis only set onTemplateCompileOptions(Line 138-140), notScriptCompileOptions(Line 127-132). Same verification applies as flagged inbatch.rs.Also applies to: 69-75, 116-140
crates/vize_vitrine/src/wasm/compiler.rs (3)
147-156: 🎯 Functional CorrectnessSame SfcParseOptions gap as noted in
napi/sfc/batch.rs.
parse_opts(Line 147-150) passed toparse_sfcdoesn't forwardexperimental_in_tag_comments, whilesfc_opts.template/compiler_options(Line 229-242) do correctly forward it. Same verification request applies.Also applies to: 229-242
9-9: LGTM!Also applies to: 61-83
339-340: LGTM!Also applies to: 376-377, 424-425, 532-536
crates/vize_vitrine/src/napi/sfc/batch.rs (2)
62-69: LGTM!Also applies to: 99-117
223-246: 🎯 Functional CorrectnessDouble-check the experimental SFC flags are threaded through every parse/compile stage.
If
experimental_in_tag_comments,experimental_patterned_template, orexperimental_server_scriptaffect descriptor parsing or script-block handling, they need to reachSfcParseOptionsandScriptCompileOptions, not onlyTemplateCompileOptions.crates/vize_vitrine/src/napi/template.rs (3)
22-22: LGTM!Also applies to: 35-39, 56-64, 112-125
180-227: LGTM!
153-167: 🗄️ Data Integrity & IntegrationConfirm the published TS signature covers
parseTemplateoptions.parse_templatenow consumesoptions: Option<CompilerOptions>, so the public.d.tsshould expose the second parameter andexperimentalInTagCommentstyping to keep JS/TS consumers in sync.crates/vize_vitrine/src/types.rs (1)
54-62: LGTM!crates/vize_vitrine/src/wasm/options.rs (1)
50-52: LGTM!npm/native/index.d.ts (1)
69-71: LGTM!Also applies to: 239-244, 905-907
crates/vize_vitrine/src/napi/sfc/compile.rs (3)
58-62: LGTM!
78-84: LGTM!
91-106: 🗄️ Data Integrity & IntegrationVerify
experimental_server_scriptis only relevant to template compilation.
experimental_server_scriptis threaded intoTemplateCompileOptionsbut not intoScriptCompileOptions(lines 91-96), even though the "server-script" RFC surface conceptually relates to<script>block handling. If the server-script feature needs to influence script-block parsing/compilation (e.g., a new<script server>block type), this wiring is incomplete.npm/native/types/compiler.d.ts (1)
45-50: LGTM!npm/native/types/sfc.d.ts (1)
9-11: 📐 Maintainability & Code Quality | 💤 Low valueConsider adding doc comments for consistency.
compiler.d.tsdocuments the equivalentexperimentalInTagComments/experimentalPatternedTemplate/experimentalServerScriptflags inline, but these declarations here are undocumented. Consumers readingSfcCompileOptionsNapi/BatchCompileOptionsNapivia IntelliSense won't get the same context.As per path instructions,
npm/**changes should ensure "published files stay usable from a consumer project rather than only inside the monorepo."Also applies to: 112-114
Source: Path instructions
npm/builder/rspack/src/shared/compiler.ts (1)
147-157: LGTM!npm/builder/rspack/src/types/index.ts (1)
13-15: LGTM!npm/builder/unplugin/src/compiler.ts (1)
17-35: LGTM!Also applies to: 41-71
npm/builder/unplugin/src/normalize-options.test.ts (1)
9-11: LGTM!Also applies to: 126-138
npm/builder/unplugin/src/types.ts (1)
9-11: LGTM!Also applies to: 101-103, 191-193
npm/builder/unplugin/src/unplugin.ts (1)
73-75: LGTM!npm/builder/vite/src/compile-options.test.ts (1)
1-31: LGTM!npm/builder/vite/src/compile-options.ts (1)
11-13: LGTM!Also applies to: 25-27, 43-45, 64-66
npm/builder/vite/src/plugin/index.ts (2)
259-283: LGTM on the wiring ofexperimentalsintomergedOptions(vapor/jsxMode derivation and new experimental flags), aside from the typo-key concern noted above.
92-121: 📐 Maintainability & Code QualityClarify whether these config keys are intentional aliases.
resolveExperimentalOptionsaccepts both the camel-cased keys and typoed/space-separated variants. If those extra spellings are backward-compat aliases, they should be documented and reflected in the public types; otherwise remove them.
| fn rewrite_match_element<'a>(allocator: &'a Bump, el: &mut ElementNode<'a>) { | ||
| let Some((match_idx, match_expr)) = find_match_expression(el) else { | ||
| return; | ||
| }; | ||
|
|
||
| let mut has_case = false; | ||
| for child in el.children.iter_mut() { | ||
| let TemplateChildNode::Element(case_el) = child else { | ||
| continue; | ||
| }; | ||
| if rewrite_case_element(allocator, case_el, &match_expr, has_case) { | ||
| has_case = true; | ||
| } | ||
| } | ||
|
|
||
| if !has_case { | ||
| return; | ||
| } | ||
|
|
||
| el.props.remove(match_idx); | ||
| el.tag = String::from("template"); | ||
| el.tag_type = ElementType::Template; | ||
| el.is_self_closing = false; | ||
| } | ||
|
|
||
| fn find_match_expression(el: &ElementNode<'_>) -> Option<(usize, String)> { | ||
| for (idx, prop) in el.props.iter().enumerate() { | ||
| if let PropNode::Directive(dir) = prop | ||
| && dir.name == "match" | ||
| { | ||
| let exp = dir.exp.as_ref().map(expression_source)?; | ||
| return Some((idx, exp)); | ||
| } | ||
| } | ||
| None | ||
| } | ||
|
|
||
| fn rewrite_case_element<'a>( | ||
| allocator: &'a Bump, | ||
| el: &mut ElementNode<'a>, | ||
| match_expr: &str, | ||
| has_previous_branch: bool, | ||
| ) -> bool { | ||
| let Some(case_idx) = find_case_directive(el) else { | ||
| return false; | ||
| }; | ||
|
|
||
| let (is_default, case_expr) = match &el.props[case_idx] { | ||
| PropNode::Directive(dir) => ( | ||
| dir.modifiers.iter().any(|m| m.content == "default"), | ||
| dir.exp.as_ref().map(expression_source), | ||
| ), | ||
| PropNode::Attribute(_) => return false, | ||
| }; | ||
|
|
||
| if !is_default && case_expr.is_none() { | ||
| return false; | ||
| } | ||
|
|
||
| let mut case_dir = match el.props.remove(case_idx) { | ||
| PropNode::Directive(dir) => Box::into_inner(dir), | ||
| PropNode::Attribute(_) => return false, | ||
| }; | ||
|
|
||
| let directive_name = if is_default { | ||
| if has_previous_branch { "else" } else { "if" } | ||
| } else if has_previous_branch { | ||
| "else-if" | ||
| } else { | ||
| "if" | ||
| }; | ||
|
|
||
| let condition = if is_default { | ||
| if has_previous_branch { | ||
| None | ||
| } else { | ||
| Some(String::from("true")) | ||
| } | ||
| } else { | ||
| case_expr.map(|case_expr| build_case_condition(match_expr, &case_expr)) | ||
| }; | ||
|
|
||
| rewrite_case_directive(allocator, &mut case_dir, directive_name, condition); | ||
| el.props | ||
| .push(PropNode::Directive(Box::new_in(case_dir, allocator))); | ||
|
|
||
| true | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | 🏗️ Heavy lift
Default case position isn't validated — a leading v-case.default silently kills later branches.
rewrite_match_element processes case elements in source order. If a .default case appears before other v-case siblings (rather than last, as switch/default semantics imply), it's desugared to v-if="true" (since has_previous_branch is false for it), and every subsequent case becomes an unreachable v-else-if. Example:
<div v-match="x">
<span v-case.default>D</span>
<span v-case="'a'">A</span>
</div>desugars to:
<template>
<span v-if="true">D</span>
<span v-else-if="(x) === ('a')">A</span>
</template>A can never render. This will silently break real templates that don't happen to always list default last, with no diagnostic emitted.
Given desugar_patterned_templates currently returns nothing (no error channel back to transform_inner), a minimal fix requires either (a) two-pass processing — collect all non-default cases into the chain first, then append default as the final else regardless of source position, or (b) plumbing a CompilerError when a non-last .default is detected.
Proposed two-pass fix sketch
- let mut has_case = false;
- for child in el.children.iter_mut() {
- let TemplateChildNode::Element(case_el) = child else {
- continue;
- };
- if rewrite_case_element(allocator, case_el, &match_expr, has_case) {
- has_case = true;
- }
- }
+ // Process non-default cases in source order first, then apply `default`
+ // last regardless of where it appears in the source, matching switch semantics.
+ let mut has_case = false;
+ let mut default_el: Option<&mut ElementNode<'a>> = None;
+ for child in el.children.iter_mut() {
+ let TemplateChildNode::Element(case_el) = child else {
+ continue;
+ };
+ if is_default_case(case_el) {
+ default_el = Some(case_el);
+ continue;
+ }
+ if rewrite_case_element(allocator, case_el, &match_expr, has_case) {
+ has_case = true;
+ }
+ }
+ if let Some(case_el) = default_el {
+ if rewrite_case_element(allocator, case_el, &match_expr, has_case) {
+ has_case = true;
+ }
+ }As per path instructions for crates/**: "Flag changes that only work for small fixtures but break real Vue/Nuxt projects."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/vize_atelier_core/src/transform/patterned_template.rs` around lines 27
- 114, The `rewrite_match_element`/`rewrite_case_element` flow currently treats
a leading `v-case.default` as `v-if="true"`, which makes later branches
unreachable. Update `desugar_patterned_templates` to validate or reorder cases
so `.default` is always handled last, regardless of source order: either do a
two-pass rewrite over `find_case_directive` results or emit a `CompilerError`
when `rewrite_case_element` sees a default case before other branches. Use the
existing `has_previous_branch`, `find_match_expression`, and
`rewrite_case_directive` symbols to keep the chain semantics correct.
Source: Path instructions
| /// Load the configured SFC Vapor mode, including the experimental opt-in alias. | ||
| /// | ||
| /// Stable `compiler.vapor` wins when present. Otherwise | ||
| /// `experimentals.vapor: {}` / `true` enables Vapor for SFCs. | ||
| pub fn load_compiler_vapor(path: Option<&Path>) -> Option<bool> { | ||
| let loaded = load_raw_config_with_source(path); | ||
| let compiler_vapor = loaded.config.compiler.vapor; | ||
| let experimentals_vapor = loaded.config.experimentals.vapor_enabled().then_some(true); | ||
| compiler_vapor.or(experimentals_vapor) | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Duplicate compiler_vapor fallback logic with lint_features.rs.
The same "compiler.vapor OR experimentals.vapor_enabled()" fallback is reimplemented here and in crates/vize_carton/src/config/loader/lint_features.rs (Lines 12-16). Consider extracting a shared helper (e.g. RawVizeConfig::vapor_enabled(&self) -> Option<bool>) to avoid the two call sites drifting.
♻️ Proposed refactor
+impl RawVizeConfig {
+ pub(crate) fn vapor_enabled(&self) -> Option<bool> {
+ self.compiler.vapor.or_else(|| self.experimentals.vapor_enabled().then_some(true))
+ }
+}
+
pub fn load_compiler_vapor(path: Option<&Path>) -> Option<bool> {
let loaded = load_raw_config_with_source(path);
- let compiler_vapor = loaded.config.compiler.vapor;
- let experimentals_vapor = loaded.config.experimentals.vapor_enabled().then_some(true);
- compiler_vapor.or(experimentals_vapor)
+ loaded.config.vapor_enabled()
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /// Load the configured SFC Vapor mode, including the experimental opt-in alias. | |
| /// | |
| /// Stable `compiler.vapor` wins when present. Otherwise | |
| /// `experimentals.vapor: {}` / `true` enables Vapor for SFCs. | |
| pub fn load_compiler_vapor(path: Option<&Path>) -> Option<bool> { | |
| let loaded = load_raw_config_with_source(path); | |
| let compiler_vapor = loaded.config.compiler.vapor; | |
| let experimentals_vapor = loaded.config.experimentals.vapor_enabled().then_some(true); | |
| compiler_vapor.or(experimentals_vapor) | |
| } | |
| impl RawVizeConfig { | |
| pub(crate) fn vapor_enabled(&self) -> Option<bool> { | |
| self.compiler | |
| .vapor | |
| .or_else(|| self.experimentals.vapor_enabled().then_some(true)) | |
| } | |
| } | |
| /// Load the configured SFC Vapor mode, including the experimental opt-in alias. | |
| /// | |
| /// Stable `compiler.vapor` wins when present. Otherwise | |
| /// `experimentals.vapor: {}` / `true` enables Vapor for SFCs. | |
| pub fn load_compiler_vapor(path: Option<&Path>) -> Option<bool> { | |
| let loaded = load_raw_config_with_source(path); | |
| loaded.config.vapor_enabled() | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/vize_carton/src/config/loader.rs` around lines 169 - 178, The Vapor
fallback logic is duplicated between load_compiler_vapor and the equivalent path
in lint_features.rs, so refactor it into a shared helper on RawVizeConfig (for
example, a vapor_enabled method returning Option<bool>). Update
load_compiler_vapor to call that helper so both call sites use the same
compiler.vapor vs experimentals.vapor_enabled() precedence and cannot drift.
| #[derive(Debug, Clone, Default, Deserialize)] | ||
| #[serde(default, rename_all = "camelCase")] | ||
| pub(crate) struct RawExperimentalsConfig { | ||
| pub(crate) vapor: Option<Value>, | ||
| pub(crate) jsx_vapor: Option<Value>, | ||
| #[serde(alias = "inTagComment")] | ||
| pub(crate) intag_comment: Option<Value>, | ||
| #[serde(alias = "patternedTemplate")] | ||
| pub(crate) pattened_template: Option<Value>, | ||
| #[serde(alias = "server script", alias = "server_script")] | ||
| pub(crate) server_script: Option<Value>, | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Typo in field name produces misspelled canonical config key pattenedTemplate.
pattened_template (missing the second r) drives the rename_all = "camelCase" derivation to pattenedTemplate as the primary JSON key, with the correctly-spelled patternedTemplate demoted to an alias (Line 194-195). This typo is now propagated into the public schema (npm/cli/schemas/vize.config.schema.json) and README documentation as the canonical spelling. Since this PR explicitly ships a breaking public config surface, this is the right time to fix the field name so patternedTemplate is canonical and pattenedTemplate (if kept at all) is the alias — otherwise this misspelling becomes permanent public API baggage.
🐛 Proposed fix
- #[serde(alias = "patternedTemplate")]
- pub(crate) pattened_template: Option<Value>,
+ #[serde(alias = "pattenedTemplate")]
+ pub(crate) patterned_template: Option<Value>,And update the corresponding accessor:
pub(crate) fn patterned_template_enabled(&self) -> bool {
- experimental_switch_enabled(&self.pattened_template)
+ experimental_switch_enabled(&self.patterned_template)
}This also requires updating the schema (pattenedTemplate/patternedTemplate property order) and README table to make patternedTemplate canonical.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| #[derive(Debug, Clone, Default, Deserialize)] | |
| #[serde(default, rename_all = "camelCase")] | |
| pub(crate) struct RawExperimentalsConfig { | |
| pub(crate) vapor: Option<Value>, | |
| pub(crate) jsx_vapor: Option<Value>, | |
| #[serde(alias = "inTagComment")] | |
| pub(crate) intag_comment: Option<Value>, | |
| #[serde(alias = "patternedTemplate")] | |
| pub(crate) pattened_template: Option<Value>, | |
| #[serde(alias = "server script", alias = "server_script")] | |
| pub(crate) server_script: Option<Value>, | |
| } | |
| #[derive(Debug, Clone, Default, Deserialize)] | |
| #[serde(default, rename_all = "camelCase")] | |
| pub(crate) struct RawExperimentalsConfig { | |
| pub(crate) vapor: Option<Value>, | |
| pub(crate) jsx_vapor: Option<Value>, | |
| #[serde(alias = "inTagComment")] | |
| pub(crate) intag_comment: Option<Value>, | |
| #[serde(alias = "pattenedTemplate")] | |
| pub(crate) patterned_template: Option<Value>, | |
| #[serde(alias = "server script", alias = "server_script")] | |
| pub(crate) server_script: Option<Value>, | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/vize_carton/src/config/model.rs` around lines 187 - 198, The
`RawExperimentalsConfig` field name typo is making `pattenedTemplate` the
canonical JSON key instead of `patternedTemplate`; rename the struct field in
`model.rs` so `rename_all = "camelCase"` produces the correct primary key, and
keep `pattenedTemplate` only as an alias if needed. Then update the related
accessor and any schema/docs generation points that reference `pattenedTemplate`
so `patternedTemplate` is the public canonical spelling.
f64ece2 to
44091c0
Compare
PR BenchmarkBase:
Raw run timesCompile SFC
Lint
Format
Type check (1T)
Type check (max)
|
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8639 across 1218 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
Tool BenchmarkMeasured: 2026-07-08T20:50:21.821Z
Fairness notes:
Commands: gh workflow run tool-benchmark.yml --ref <branch> -f file_count=3000 -f check_file_count=500 -f vite_file_count=1000 -f nuxt_file_count=250 -f large_blocks=300 -f runs=3 -f warmups=1 -f commit_results=true
node bench/generate.mjs 3000
node bench/compare-tools.mjs --input bench/__in__ --vize-bin target/release/vize --runs 3 --warmups 1 --check-file-count 500 --vite-file-count 1000 --nuxt-file-count 250 --large-blocks 300 --runner-label "blacksmith-32vcpu-ubuntu-2404" --out tool-benchmark-summary.md --json tool-benchmark-results.json --doc performance-blacksmith.mdVariant details and raw run timesSFC compile
Large SFC compile
Large SFC type check
Lint
Format
Type check
Vite build (end-to-end)
Nuxt SPA build (end-to-end)
|
Summary
experimentalsconfig wiring for Vapor, JSX Vapor, in-tag comments, patterned templates, and server-script opt-ins across CLI, Vite, native, WASM, and builder surfaces.//comment parsing with root-level AST comments and VS Code syntax highlighting support.v-match/v-casepatterned template desugaring into the existingv-if/v-else-if/v-elsepipeline.Breaking Change
Validation
cargo fmt --checkcargo check --workspacecargo clippy --workspace -- -D warnings -D clippy::wildcard_importscargo test --workspacecorepack pnpm --dir npm/builder/vite testcorepack pnpm --dir npm/builder/vite checkcorepack pnpm --dir npm/builder/unplugin testcorepack pnpm --dir npm/builder/unplugin checkcorepack pnpm --dir npm/cli checkcorepack pnpm exec vp check npm/cli/README.md tests/tooling/vscode-vize-template-grammar.test.tsnode --test tests/tooling/vscode-vize-template-grammar.test.tsBREAKING CHANGE: Public Rust compiler/config option structs gain experimental opt-in fields and the tokenizer state enum gains an experimental parsing state.
Summary by CodeRabbit
New Features
//comments in templates.v-match/v-casesyntax to work as conditional branching.Bug Fixes