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
I get occasional crashes since Nickel 1.9 when using the LSP. I can't pinpoint the exact minimal conditions, but I have a reproduction below.
To Reproduce
For this to work (well, work meaning "crash NLS" here) you need to open a fresh file and type it. For some reason even copy/pasting the MRE in a new file doesn't trigger the bug, with or without the last .b.
let Schema = {
field | String,
}
in
let value | Schema = {
field = "bar",
}
in
value.b
The trailing .b will trigger completion and crash NLS. The log shows the following:
[2024-12-18T09:33:05Z DEBUG nls::server] handle completion
thread 'main' panicked at core/src/files.rs:238:12:
index out of bounds: the len is 10 but the index is 10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
I expect this to not crash NLS.
Environment
OS name + version:
Version of the code: nickel-lang-lsp nls 1.9.0 (rev c58265a9-modified)
This is the version of the 1.9 release, just as installed by the release script (hence why the modified and the specific rev).
Additional context
As we shipped the new file implementation in 1.9, something must have gone wrong here. cc @jneem
The text was updated successfully, but these errors were encountered:
Might be, I'll try out with latest master. If it is, I would be for a patch release if the fix can be extracted - I hit this several times since 1.9 release (it's surprising that this hasn't been noticed before, maybe because I open a lot of scratch files for test and repros, more than a standard user?)
Describe the bug
I get occasional crashes since Nickel 1.9 when using the LSP. I can't pinpoint the exact minimal conditions, but I have a reproduction below.
To Reproduce
For this to work (well, work meaning "crash NLS" here) you need to open a fresh file and type it. For some reason even copy/pasting the MRE in a new file doesn't trigger the bug, with or without the last
.b
.The trailing
.b
will trigger completion and crash NLS. The log shows the following:Expected behavior
I expect this to not crash NLS.
Environment
This is the version of the 1.9 release, just as installed by the release script (hence why the modified and the specific rev).
Additional context
As we shipped the new file implementation in 1.9, something must have gone wrong here. cc @jneem
The text was updated successfully, but these errors were encountered: