diff options
| author | Michael Soegtrop | 2020-06-23 15:28:15 +0200 |
|---|---|---|
| committer | Michael Soegtrop | 2020-06-23 15:28:15 +0200 |
| commit | 25ece321f2297bd28971be3df2616626a7de9516 (patch) | |
| tree | 9654ba3e3ec56a9b51fa78b720ec801808c98b51 | |
| parent | 5d65a6617333aea66be3c819f3fe53dd30e95f77 (diff) | |
| parent | 518d92d33bcd94cb1b448ab60de146b1814b76fb (diff) | |
Merge PR #12562: CoqIDE: accept to open files with invalid names
Reviewed-by: MSoegtropIMC
Ack-by: SkySkimmer
| -rw-r--r-- | doc/changelog/09-coqide/12562-coqide-lax-filename.rst | 4 | ||||
| -rw-r--r-- | ide/coqide/coqide.ml | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/doc/changelog/09-coqide/12562-coqide-lax-filename.rst b/doc/changelog/09-coqide/12562-coqide-lax-filename.rst new file mode 100644 index 0000000000..ef3160dd99 --- /dev/null +++ b/doc/changelog/09-coqide/12562-coqide-lax-filename.rst @@ -0,0 +1,4 @@ +- **Fixed:** CoqIDE no longer exits when trying to open a file whose name is not a valid identifier + (`#12562 <https://github.com/coq/coq/pull/12562>`_, + fixes `#10988 <https://github.com/coq/coq/issues/10988>`_, + by Vincent Laporte). diff --git a/ide/coqide/coqide.ml b/ide/coqide/coqide.ml index ab2a17798e..b66da11e7b 100644 --- a/ide/coqide/coqide.ml +++ b/ide/coqide/coqide.ml @@ -114,8 +114,10 @@ let make_coqtop_args fname = (* We basically copy the code of Names.check_valid since it is not exported *) (* to coqide. This is to prevent a possible failure of parsing "-topfile" *) (* at initialization of coqtop (see #10286) *) + (* If the file name is a valid identifier, use it as toplevel name; *) + (* otherwise the default “Top” will be used. *) match Unicode.ident_refutation (Filename.chop_extension (Filename.basename fname)) with - | Some (_,x) -> output_string stderr (x^"\n"); exit 1 + | Some _ -> args | None -> "-topfile"::fname::args in proj, args |
