-
Notifications
You must be signed in to change notification settings - Fork 427
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
Having several Coq extraction stanzas leads to multiple rule error from Dune 3.7 #8042
Comments
As mentioned on zulip, the solution is to choose a better dummy theory name than DuneExtraction and use something from the name of the prelude probably. |
Code is here: dune/src/dune_rules/coq/coq_rules.ml Lines 869 to 872 in 2a3ca31
So indeed, as @Alizter said, this should be pretty easy to fix, by generating a name that is more likely not to collide, or by letting the user specify it. |
I think it would make the most sense to just add the contents of let wrapper_name = "DunExtraction" ^ prelude in Personally, I don't really see a reason to be able to control this manually (maybe add that later if someone asks for it). And if I understand correctly, there is no point in having several |
Sounds good to me, we'll prepare a fix ASAP. |
Expected Behavior
When I declare several
coq.extraction
stanzas in a singledune
file producing different OCaml modules in Dune 3.7 and later, I expectdune build
to work, as it did in (at least) Dune 3.5 and 3.6.Actual Behavior
After running
dune build
I get a "multiple rule" error, like the following:Error: Multiple rules generated for _build/default/DuneExtraction.theory.d: - dune:1 - dune:5
Reproduction
Consider a minimal Coq extraction project which produces two modules, with the following
dune-project
file:And the following
dune
file:And the Coq file
Extr1.v
:And the Coq file
Extr2.v
:Up to and including Dune 3.6, this works fine with
dune build
. However, for Dune 3.7 and forward, including Dune 3.8.2, I get the following error:$ dune build Error: Multiple rules generated for _build/default/DuneExtraction.theory.d: - dune:1 - dune:5
Specifications
dune
(output ofdune --version
): 3.7.1ocaml
(output ofocamlc --version
): 4.11.2Additional information
dune
file is a very convenient feature and if not supported, necessitates reorganizing some projects in an inconvenient way (lots of subdirectories).This issue was invited for submission by @Alizter.
The text was updated successfully, but these errors were encountered: