leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
4.46k stars 388 forks source link

Wrong "unexpected end of input" #1329

Open PatrickMassot opened 2 years ago

PatrickMassot commented 2 years ago

Prerequisites

Description

I get an unexpected error "unexpected end of input" when creating a comment at the end of a file. It goes away only if Lean is forced to recompile the file.

Steps to Reproduce

  1. In VSCode (not sure if emacs would do the same), create a file containing #check Nat
  2. Create a comment at the end of the file by typing /- comment -/

Expected behavior: [What you expect to happen] Getting a comment.

Actual behavior: [What actually happens] Get an error "unexpected end of input"

Reproduces how often: [What percentage of the time does it reproduce?] Always

Versions

You can get this information from copy and pasting the output of lean --version, please include the OS and what version of the OS you're running.

Lean (version 4.0.0-nightly-2022-07-18, commit 5083d47e4d3c, Release)

on Linux

Julian commented 11 months ago

At least here, whatever is involved here seems to depend both on the sequence of characters you type as well as how fast you type them.

Recording:

https://github.com/leanprover/lean4/assets/329822/00a18ce3-0c7c-4388-b5e8-dd9124147793