You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a Q# project that has an explicit files list in the qsharp.json, if you create a new .qs file in the src folder before adding it to the explicit files list the language service panics:
2025-01-06 12:34:24.024 [error] [wasm] Wasm panic occurred: panicked at language_service/src/compilation.rs:297:14:
source should exist in the user source map
Stack:
Error:
at imports.wbg.__wbg_new_0232637a3cb0b1a7 (file:///Users/swernli/.vscode/extensions/quantum.qsharp-lang-vscode-dev-1.12.2/out/extension.js#vscode-extension:32866:17)
at wasm://wasm/00e6c39a:wasm-function[3681]:0x312e28
at wasm://wasm/00e6c39a:wasm-function[2061]:0x2c84c4
at wasm://wasm/00e6c39a:wasm-function[2834]:0x2fe7b4
at wasm://wasm/00e6c39a:wasm-function[2726]:0x2faeb5
at wasm://wasm/00e6c39a:wasm-function[1851]:0x2a8fac
at LanguageService.get_code_lenses (file:///Users/swernli/.vscode/extensions/quantum.qsharp-lang-vscode-dev-1.12.2/out/extension.js#vscode-extension:32709:12)
at QSharpLanguageService.getCodeLenses (file:///Users/swernli/.vscode/extensions/quantum.qsharp-lang-vscode-dev-1.12.2/out/extension.js#vscode-extension:33815:33)
at QSharpCodeLensProvider.provideCodeLenses (file:///Users/swernli/.vscode/extensions/quantum.qsharp-lang-vscode-dev-1.12.2/out/extension.js#vscode-extension:39781:51)
at mf.provideCodeLenses (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:121:200273)
at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:121:229194
at Rt.s (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:121:228034)
at Rt.$provideCodeLenses (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:121:229182)
at N0.S (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:30:77539)
at N0.Q (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:30:77319)
at N0.M (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:30:76370)
at N0.L (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:30:75513)
at tu.value (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:30:74310)
at C.B (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:29:746)
at C.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:29:964)
at GN.e.port1.onmessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/worker/extensionHostWorkerMain.js:145:3409)
Somehow this case should fail gracefully, ideally with feedback to the user that the file is not part of the project and won't be included in any compilation. Stretch goal could be a quick fix to put it into the files list from within that new file, but could also be just a warning that the file is not included (similar to how rust-analyzer does it).
The text was updated successfully, but these errors were encountered:
…d of `qsharp.json` (#2109)
Fixes#2090
Notably, this also changes how we treat the `files` field in
`qsharp.json` for local projects their local dependencies.
Previously, if the `qsharp.json` explicitly listed any `files` , that
list would take priority and we would skip crawling the directory.
With this change: we always crawl the `src/` directory and include all
found `*.qs` files in the project. But we raise an explicit error to the
user if any of those files are missing from the `files` list.
When editing a Q# project that has an explicit files list in the qsharp.json, if you create a new .qs file in the src folder before adding it to the explicit files list the language service panics:
Somehow this case should fail gracefully, ideally with feedback to the user that the file is not part of the project and won't be included in any compilation. Stretch goal could be a quick fix to put it into the files list from within that new file, but could also be just a warning that the file is not included (similar to how rust-analyzer does it).
The text was updated successfully, but these errors were encountered: