Zulip Chat Archive
Stream: lean4
Topic: LSP crash
James Sully (Jun 02 2023 at 03:19):
is the vscode extension repo the correct place to report a language server crash?
James Sully (Jun 02 2023 at 03:20):
I have
def northernTrees : Array String :=
#["sloe", "birch", "elm", "oak"]
#eval northernTrees[6]
Which works fine (reports a type error), but when I change the index to 5
, it crashes
Scott Morrison (Jun 02 2023 at 05:25):
Curiously either an index of 4 or 5 causes this behaviour. It's not the VSCode extension's fault, though. When you run this file on the command line is fails silently (i.e. doesn't print a PANIC or index out of bounds error).
Scott Morrison (Jun 02 2023 at 05:25):
Could you open an issue on the lean4 repository?
Damiano Testa (Jun 02 2023 at 07:39):
I think that what you observed is not expected. However, if you use !
, then you get what I would consider the expected behaviour:
#eval northernTrees[6]!
works, panicking starting from 4
.
James Sully (Jun 02 2023 at 09:19):
Curiously either an index of 4 or 5 causes this behaviour
Yeah, I noticed that. I was trying to play around with arrays of different lengths to figure out the rules, but I couldn't get it to happen consistently even with the same combinations of array length and index.
James Sully (Jun 02 2023 at 09:36):
Could you open an issue on the lean4 repository?
Last updated: Dec 20 2023 at 11:08 UTC