dannymcgee / vscode-wgsl

Rich language support for WebGPU Shading Language
Apache License 2.0
14 stars 2 forks source link

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18 #45

Open mighdoll opened 4 months ago

mighdoll commented 4 months ago

I tried opening a single wgsl file in stoneberry, after building vscode-wgsl version 16de6a0 and manually installing the vsix file.

Looking at the log below, I guess vscode-wgsl eagerly tries to parse all of the .wgsl files and fails on TextureToHistograms.wgsl. Does that sound right? If so, I can try to isolate it further. Is there a debug mode to enable more details of parsing progress?

2024-06-25 04:55:25.377 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.377  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:25.378 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:25.378  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] $/setTrace
2024-06-25 04:55:25.379 ERROR server::ipc: Notification method not handled: $/setTrace
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] $/setTrace
2024-06-25 04:55:25.379 ERROR server::ipc: Notification method not handled: $/setTrace
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] $/setTrace
2024-06-25 04:55:25.379 ERROR server::ipc: Notification method not handled: $/setTrace
2024-06-25 04:55:25.379 TRACE server::ipc::request: [Request] textDocument/documentSymbol [1] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:25.379  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:25.379  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:25.379  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:25.379 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:25.379  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:25.380 TRACE server::ipc::request: [Request] textDocument/codeLens [2] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.380 TRACE server::ipc::request: [Request] textDocument/semanticTokens/full [3] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
[Error - 9:55:25 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:25.380 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:25.380  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:25.389 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:25.389  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
[Error - 9:55:25 PM] Request textDocument/semanticTokens/full failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:25.389 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:25.389  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:25.389 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:25.389  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:25.389 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:25.389  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:25.390 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:25.390 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:25.390 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:25.390 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:25.390 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:25.390  INFO server::documents:   Handling configuration change
2024-06-25 04:55:25.390  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
[Error - 9:55:25 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:25.393  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `server::documents::process_pending_documents`!
2024-06-25 04:55:25.393  WARN bevy_ecs::system::commands::command_queue: CommandQueue has un-applied commands being dropped.
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
[Info  - 9:55:25 PM] Connection to server got closed. Server will restart.
true
[Error - 9:55:25 PM] Server process exited with code 101.
2024-06-25 04:55:25.894 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.894  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:25.894 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:25.894  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:25.894 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:25.894  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:26.146 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:26.146  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:26.146 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:26.146  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:26.224 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:26.224  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:26.224 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:26.224  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:26.224 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:26.224  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:26.224 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:26.224  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:26.250 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:26.250  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:26.250 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:26.250  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:26.261 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:26.261  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:26.261 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:26.261  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:26.262 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:26.262  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:26.262 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:26.262  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:26.264 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:26.264  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:26.264 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:26.264  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:26.264 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:26.264  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:26.477 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:26.477  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:26.477 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:26.477  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:26.477 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:26.477  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:26.494 TRACE server::ipc::request: [Request] textDocument/documentSymbol [1] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:26.494 TRACE server::ipc::request: [Request] textDocument/codeLens [2] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:26.494 TRACE server::ipc::request: [Request] textDocument/semanticTokens/full [3] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:26.495 TRACE server::ipc::notify: [Notification] $/cancelRequest
2024-06-25 04:55:26.496 TRACE server::ipc::notify: [Notification] $/setTrace
2024-06-25 04:55:26.496 ERROR server::ipc: Notification method not handled: $/setTrace
2024-06-25 04:55:26.496 TRACE server::ipc::request: [Request] textDocument/codeLens [4] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
[Error - 9:55:26 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:26.499  INFO server::documents:   Handling configuration change
2024-06-25 04:55:26.499  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
[Error - 9:55:26 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
[Error - 9:55:26 PM] Request textDocument/semanticTokens/full failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
[Error - 9:55:26 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:26.501  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:26.501  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:26.501  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:26.502  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `server::documents::process_pending_documents`!
2024-06-25 04:55:26.502  WARN bevy_ecs::system::commands::command_queue: CommandQueue has un-applied commands being dropped.
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
[Error - 9:55:26 PM] Server process exited with code 101.
[Info  - 9:55:26 PM] Connection to server got closed. Server will restart.
true
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:27.654 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:27.654  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:27.655  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::request: [Request] textDocument/documentSymbol [1] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:27.655 TRACE server::ipc::request: [Request] textDocument/codeLens [2] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
[Error - 9:55:27 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:27.655 TRACE server::ipc::request: [Request] textDocument/documentSymbol [3] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:27.656  INFO server::documents:   Handling configuration change
2024-06-25 04:55:27.656  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
[Error - 9:55:27 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
[Error - 9:55:27 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:27.658  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:27.659  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:27.659  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:27.659  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `server::documents::process_pending_documents`!
2024-06-25 04:55:27.659  WARN bevy_ecs::system::commands::command_queue: CommandQueue has un-applied commands being dropped.
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
[Info  - 9:55:27 PM] Connection to server got closed. Server will restart.
true
[Error - 9:55:27 PM] Server process exited with code 101.
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:28.143 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.143  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.144  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::request: [Request] textDocument/documentSymbol [1] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::request: [Request] textDocument/codeLens [2] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.144 TRACE server::ipc::request: [Request] textDocument/documentSymbol [3] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
[Error - 9:55:28 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:28.144  INFO server::documents:   Handling configuration change
2024-06-25 04:55:28.144  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
[Error - 9:55:28 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
[Error - 9:55:28 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:28.147  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:28.148  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.148  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.148  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `server::documents::process_pending_documents`!
2024-06-25 04:55:28.149  WARN bevy_ecs::system::commands::command_queue: CommandQueue has un-applied commands being dropped.
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
[Error - 9:55:28 PM] Server process exited with code 101.
[Info  - 9:55:28 PM] Connection to server got closed. Server will restart.
true
2024-06-25 04:55:28.617 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.617  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.617 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:28.617  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/PrefixScan.wgsl"
2024-06-25 04:55:28.617 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.617  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/prefix-scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.617 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.617  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/util2.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/main.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/ApplyScanBlocks.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumU32.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/ReduceBuffer.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpSumF32.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-buffer/reduceWorkgroup.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/HistogramOps.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMinMaxF32.wgsl"
2024-06-25 04:55:28.618 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:28.618  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/histogram-texture/TextureToHistograms.wgsl"
2024-06-25 04:55:28.619 TRACE server::ipc::notify: [Notification] textDocument/didOpen : "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.619  INFO server::documents:   reading document "file:///Users/lee/stoneberry/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl"
2024-06-25 04:55:28.619 TRACE server::ipc::request: [Request] textDocument/documentSymbol [1] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.619 TRACE server::ipc::request: [Request] textDocument/codeLens [2] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
[Error - 9:55:28 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:28.619 TRACE server::ipc::request: [Request] textDocument/documentSymbol [3] : "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.619  INFO server::documents:   Handling configuration change
2024-06-25 04:55:28.619  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_2/main2.wgsl"
[Error - 9:55:28 PM] Request textDocument/codeLens failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
[Error - 9:55:28 PM] Request textDocument/documentSymbol failed.
  Message: Failed to parse document: file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl
  Code: -32603 
2024-06-25 04:55:28.622  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/binop/BinOpMaxF32.wgsl"
2024-06-25 04:55:28.622  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/histogram/Histogram.wgsl"
2024-06-25 04:55:28.622  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/thimbleberry%400.2.9/node_modules/thimbleberry/src/convert-texture/ConvertTexture.wgsl"
2024-06-25 04:55:28.622  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/node_modules/.pnpm/wgsl-linker%400.4.0/node_modules/wgsl-linker/src/test/wgsl_1/util.wgsl"
2024-06-25 04:55:28.622  INFO server::documents:   Processing document "file:///Users/lee/stoneberry/packages/stoneberry/src/scan/WorkgroupScan.wgsl"

thread 'main' panicked at packages/parser/src/scopes/builder.rs:93:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `server::documents::process_pending_documents`!
2024-06-25 04:55:28.623  WARN bevy_ecs::system::commands::command_queue: CommandQueue has un-applied commands being dropped.
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
[Error - 9:55:28 PM] Server process exited with code 101.
[Error - 9:55:28 PM] The WGSL Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
rubyquaildesign commented 2 months ago

From what I can tell, it seems to panic when encountering certain syntax (unsure why), for example if I have a file in the open project with an override declaration this error happens

dannymcgee commented 2 months ago

Ack, sorry to keep you waiting, I completely missed the first notification for this!

It looks like the panic is because the scope-builder encounters a variable declaration that was declared with a keyword other than const, let or var (in hindsight, panicking is probably not the most future-proof way to deal with unrecognized syntax, lol). I think Ruby's probably correct that the override is the culprit — I added support for overrides in #42 and must have forgotten to update the scope builder.

It should be a pretty straightforward fix:

https://github.com/dannymcgee/vscode-wgsl/blob/16de6a09257f901bf8158b296280eaf90244c963/packages/parser/src/scopes/builder.rs#L89-L97

 fn visit_var_decl(&mut self, decl: &VarDecl) -> FlowControl { 
    match decl.storage.lexeme().as_str() { 
-       "const" | "let" => simple_decl!(self, Const(decl)), 
+       "const" | "let" | "override" => simple_decl!(self, Const(decl)), 
        "var" => simple_decl!(self, Var(decl)), 
        _ => unreachable!(), 
    } 

    FlowControl::Break 
 } 

But it's possible something else will fail after that hurdle is cleared. I'm kind of slammed at the moment, but if anyone has time to work on a PR I'd be happy to answer any questions you might have or point you in the right direction if you get stuck!