-
Notifications
You must be signed in to change notification settings - Fork 415
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
coq.extraction does not support package
field
#8099
Comments
Hi @vzaliva , I'm not sure I fully understand your scenario, IIANM extraction targets will only be built when depended on, either by a Can you provide some detail on your build setup and the case where extraction is run when it shouldn't? |
I've created sample project demonstrating what I am trying to do: https://github.com/vzaliva/coq-dune-examlpe Trying to build OCaml-only part fails when Coq is not installed:
|
@vzaliva But the OCaml only part of your project depends on .ml files created from extraction thus causing extraction to be done. If you don't want your extracted library to be built when building |
|
OCaml-only part is |
In coq/dune you have |
@Alizter this is understood. Yet, I have no solution for how to build |
If you want to build the package There is no way to build a package "minus" a library in Dune at the moment. I don't imagine such a feature would be very useful either. |
Indeed @vzaliva as of today it is not possible to build a package that contains two libraries without building the two libraries. IIUC your example-coq package contains two libraries So in your case you either need to introduce a new package. There could be some other ways to achieve this:
I didn't try any of the two options. Thanks for the example by the way, it is very helpful for us to have real use cases at hand. |
It would be nice to make the extraction stanza have a promote mode. I am not a fan of optional. |
@ejgallego I think you may misunderstand my problem. I am not trying to build
|
Hmm I see what you mean now. I think you are correct in that when resolving the example-ocaml package, the source files are demanded hence the extraction step. What does |
Adding this flag ( Another observation is that if Coq is installed, it did not actually perform extraction and compiles |
Very strange! Thanks for the report and sorry about not understand the initial issue. |
Indeed, I think I misread it too. So after a bit of debug this seems to be due to computation of .install files again, via So even if |
A workaround is to add |
cc: #7908 Another workaround is to use |
Thanks. I will consider |
Why would it affect performance @vzaliva ? If you need native you can use |
Currently, dune extraction is always performed. The user should be able to limit its scope with the
package
field (like incoq.theory
)One use-case is when the project contains several packages, some of which do not require Coq. Building non-coq packages with
dune build -p pkg
should be possible.The text was updated successfully, but these errors were encountered: