-
Notifications
You must be signed in to change notification settings - Fork 456
Closed
Labels
acceptedaccepted proposalsaccepted proposalscramRelated to the cram test execution in DuneRelated to the cram test execution in Dune
Milestone
Description
In cram tests, there are cases where dune blows up with a confusing error where it could have reported a better error.
Example 1 (sh syntax error):
Define a function with a dash in its name
$ foo-bar () {
> true
> }
There is no error message at all, even though sh reports an error correctly.
Dune:
sh (internal) (exit 2)
(cd _build/.sandbox/a76f004532a7d5adefdceb308f650161/default/test/blackbox-tests/test-cases/watching/test-1.t && /usr/bin/sh /tmp/dune.cram.bf2305run.t/main.sh)
Sh:
$ sh -c 'foo-bar () { true; }'
sh: `foo-bar': not a valid identifier
EXIT STATUS 2
Example 2 (script terminates early):
$ true
$ exit 0
Observed error:
Internal error, please report upstream including the contents of _build/log.
Description:
("command without metadata", {})
Raised at Stdune__Code_error.raise in file "src/stdune/code_error.ml", line
9, characters 30-62
Called from Dune_rules__Cram_exec.run in file "src/dune_rules/cram_exec.ml",
line 411, characters 12-48
... (many more useless stack frames) ...
Expected error: replacing all sections that weren't reached with a text explaining that this section was not reached.
Specifications
- Version of
dune: b9f0ad8 (2.7.1+)
Metadata
Metadata
Assignees
Labels
acceptedaccepted proposalsaccepted proposalscramRelated to the cram test execution in DuneRelated to the cram test execution in Dune