You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message does not allow the user to know under which context the error is happening. This can be quite confusing when using more than one context at scale.
I wonder if Dune could include the context name for "alt contexts" (non-default), similarly to what is done currently for display=short, e.g.:
$ dune build
[melange]
File "foo.ml", line 1, characters 8-18:
1 | let t = Str.regexp
^^^^^^^^^^
Error: Unbound module Str
[1]
@emillon I don't think so, or at least I can't find it 🤔
I took a look at the way user errors are handled, printed some stack trace in Report_error.gen_report to identify the modules involved:
Raised by primitive operation at Dune_util__Report_error.gen_report in file "src/dune_util/report_error.ml", line 161, characters 19-43
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_engine__Build_system.run.f in file "src/dune_engine/build_system.ml", line 1148, characters 6-28
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml", line 76, characters 8-11
I am not sure yet how this can be implemented, but it seems that at least we should add the context where the error is happening to Exn_with_backtrace? That'll lead to cycles as that module is in stdune, which Context.t (dune_rules) uses. So maybe it can be just a string? So many questions 😄
no, you're right, I think I'm mixing up things. that must be because the full path to failing tests is sometimes printed, and the context name is part of these.
Consider this example (it uses Melange but that's only for demo purposes, could happen in any multi-context setup):
The error message does not allow the user to know under which context the error is happening. This can be quite confusing when using more than one context at scale.
I wonder if Dune could include the context name for "alt contexts" (non-default), similarly to what is done currently for
display=short
, e.g.:cc @davesnx
The text was updated successfully, but these errors were encountered: