-
Notifications
You must be signed in to change notification settings - Fork 469
dune ocaml top-module crashes when file doesn't have .ml extension or is directory #8004
Copy link
Copy link
Closed
ocaml/opam-repository
#24013Description
Expected Behavior
When passing invalid output to top-module I expect error message that explains the problem
Actual Behavior
rafal@machine ocaml-lsp % dune ocaml top-module dune
Error: exception Invalid_argument("Filename.chop_extension")
Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
Called from Main__top.Module.module_directives in file "bin/ocaml/top.ml",
line 106, characters 17-70
Called from Main__top.Module.term.(fun) in file "bin/ocaml/top.ml", line 229,
characters 14-48
Called from Fiber__scheduler.exec in file "otherlibs/fiber/src/scheduler.ml",
line 73, characters 8-11
I must not crash. Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration. I will fully express my cases.
Execution will pass over me and through me. And when it has gone past, I
will unwind the stack along its path. Where the cases are handled there will
be nothing. Only I will remain.
Reproduction
Pass to dune ocaml top-module directory or file without .ml extension
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels