-
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
fix(coq): fix crash when COQ_NATIVE_COMPILER_DEFAULT missing #7847
fix(coq): fix crash when COQ_NATIVE_COMPILER_DEFAULT missing #7847
Conversation
50deed8
to
50a0492
Compare
50a0492
to
eac2e77
Compare
Thanks @Alizter, but I'm not sure the fix is optimal. Namely, The only change is that starting from Coq ≥ 8.13, is that the For more context, see: |
To sum up, the expected behavior (already applied by
Cc @proux01 @ejgallego FYI |
This won't mean that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
This patch works for me. Thanks @Alizter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Alizter !
I think we may have a problem in the API tho, it seems to me that for variables that may not be present, we should have the config record reflect this using option
, and the rules can actually try to figure out what the right action to perform is based on the coq lang
version and on the rules at play. I find this a bit more robust.
So if you want to tweak that, that's fine, not a big deal otherwise.
@ejgallego good point, I'll move the selection to the rules to separate concerns. |
eac2e77
to
81a91c3
Compare
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
81a91c3
to
35a75bd
Compare
I've tweaked the API a bit so that the decision on what to do with missing values lies on the user. |
* fix(coq): better config var not found message Signed-off-by: Ali Caglayan <[email protected]> * fix(coq): fix crash when COQ_NATIVE_COMPILER_DEFAULT missing Signed-off-by: Ali Caglayan <[email protected]> * doc(coq): update documentation about native compilation wrt old coq ver Signed-off-by: Ali Caglayan <[email protected]> * coq: encapsulate value type in coq_config Signed-off-by: Ali Caglayan <[email protected]> --------- Signed-off-by: Ali Caglayan <[email protected]> Co-authored-by: Ali Caglayan <[email protected]>
CHANGES: - Fix a crash when using a version of Coq < 8.13 due to the native compiler config variable being missing. We now explicitly default to `(mode vo)` for these older versions of Coq. (ocaml/dune#7847, fixes ocaml/dune#7846, @Alizter) - Duplicate installed Coq theories are now allowed with the first appearing in COQPATH being preferred. This is inline with Coq's loadpath semantics. This fixes an issue with install layouts based on COQPATH such as those found in nixpkgs. (ocaml/dune#7790, @Alizter) - Revert ocaml/dune#7415 and ocaml/dune#7450 (Resolve `ppx_runtime_libraries` in the target context when cross compiling) (ocaml/dune#7887, fixes ocaml/dune#7875, @emillon)
Coq versions < 8.13 do not have COQ_NATIVE_COMPILER_DEFAULT and were causing dune to crash when searching for this var. We make it so that if dune does not find it, it defaults to "no". The docs should also be updated accordingly.
fix #7846