Show error message when dune-workspace disables package management - #38
Conversation
dune-workspace disables package management
50dabb1 to
4bbb425
Compare
There was a problem hiding this comment.
I didn’t understand by reading your commit messages and your PR message why you get rid of dune_aux? (It is not relevant to show traces when dune pkg enabled exits on failure, as it’s an intended behaviour, I admit. If that’s indeed what you had in mind (and that I didn’t miss something else), I’ll propose an update to your PR for that)
|
The issue I had was that In the end I just skipped |
Replace an early `exit` with a `return` and actually `exit` in `w` on error
Add a simple wrapper to call Dune in the correct directory with the correct `workspace` setting, with the option to make that call with `set -x` enabled Rename `dune_aux` into `dune_trace` to emphasise what that wrapper provides Signed-off-by: Samuel Hym <samuel@tarides.com>
Also switch to `dune_` instead of `dune_trace` for the test whether package management is enabled Co-authored-by: Samuel Hym <samuel@tarides.com> Signed-off-by: Marek Kubica <marek@tarides.com>
03d7ff3 to
0a501ad
Compare
|
Thanks for your explanations, I’ve updated the PR to fix the issues you encountered and rebase your change on top. |
|
Yes, I think this is a nicer solution. It also resolves the issue with the tests in my previous version. |
Currently you can have no global dune config file but your workspace has
(pkg disabled). In this case the code currently assumes that writing(pkg enabled)is enough to enable package management but when actually trying to build package management is disabled and there is noocamlcso the build will fail.This PR adds an error message (unfortunately folded by default) in the case where the workspace disables package management, so we don't attempt to build with disabled package management.