-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builds fail with (lang dune 3.17)
#115
Comments
This is a weird one. The command that fails with that error is `dune subst`, which is called because dune automatically adds it to the generated `repro.opam` with `dev` condition. `opam-nix` sets `dev = true` because the package comes from a source repository and not from `opam-repository`.
The reason for the failure is that when `dune_version` is `3.17`, it tries to call `git describe` to get the package version, even though there is no templates to substitute; this fails because there's no `git` in the environment, and even if there was there's no `.git` subdir for it to work.
This is in contrast with the behaviour when `dune_version` is `3.16`, in which case it is lazy and doesn't call `git` since there's nothing to substitute.
I'm not yet sure the reason for this change or what the proper fix would be. For now, you can add `(subst false)` stanza to your `dune-project` to prevent it from generating the `dune subst` command in `repro.opam`; this at least circumvents the issue.
|
There's a couple of similar issues in dune's bug tracker: ocaml/dune#11200 ocaml/dune#11290 |
Aha, there's actually this exact issue already reported as well: ocaml/dune#11045 I think it makes sense to close this issue in favor of that one, do you agree? |
Thanks for looking into this, much appreciated. Indeed this works around the problem for now: echo "(subst disabled)" >> dune-project
dune build repro.opam
nix build # succeeds I agree with your assertion that this is seems to be an upstream issue. At the same time, anyone starting a fresh project bringing in So it may make sense to leave this open for visibility, so that other users can find out what is happening when they hit it. |
Describe the bug
When
dune-project
contains(lang dune 3.17)
, builds fail with:To Reproduce
Expected behavior
Build succeeds.
Environment
The text was updated successfully, but these errors were encountered: