-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When setting compilerOptions.runes to false, the compiler thinks I'm attempting to use $props when I'm really trying to use $$props.someProp.
Current workaround is to remove the compiler option from svelte.config.js and just disable runes locally with <svelte:options runes={false} />.
Reproduction
https://github.com/AdrianGonz97/false-positive-props-rune-reproduction
Logs
CompileError: Cannot use $props rune in non-runes mode
at error (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/errors.js:569:8)
at VariableDeclarator (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/2-analyze/validation.js:458:3)
at go (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:49:5)
at visitor (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:64:4)
at go (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:49:5)
at visitor (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:64:4)
at Object.next (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/zimmerframe@1.1.0/node_modules/zimmerframe/src/walk.js:106:21)
at go (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:45:29)
at next (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/visitors.js:55:7)
at _ (file:///home/koala/Reproductions/false-positive-props-rune-repro/node_modules/.pnpm/svelte@5.0.0-next.10/node_modules/svelte/src/compiler/phases/scope.js:660:4)System Info
System:
OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
Memory: 24.29 GB / 31.30 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.9.0 - ~/.volta/tools/image/node/20.9.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.1.0 - ~/.volta/tools/image/node/20.9.0/bin/npm
pnpm: 8.10.5 - ~/.volta/bin/pnpm
bun: 1.0.2 - ~/.bun/bin/bun
npmPackages:
svelte: ^5.0.0-next.10 => 5.0.0-next.10Severity
annoyance
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working