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 |
|
This patch works for me. Thanks @Alizter. |
ejgallego
left a comment
There was a problem hiding this comment.
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 <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
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 <alizter@gmail.com> * fix(coq): fix crash when COQ_NATIVE_COMPILER_DEFAULT missing Signed-off-by: Ali Caglayan <alizter@gmail.com> * doc(coq): update documentation about native compilation wrt old coq ver Signed-off-by: Ali Caglayan <alizter@gmail.com> * coq: encapsulate value type in coq_config Signed-off-by: Ali Caglayan <alizter@gmail.com> --------- Signed-off-by: Ali Caglayan <alizter@gmail.com> Co-authored-by: Ali Caglayan <alizter@gmail.com>
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