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
Fixes #10739: anomaly with Extraction within a module #17344
Fixes #10739: anomaly with Extraction within a module #17344
Conversation
anomaly with Require Extraction.
Module Type T.
Definition foo := 0.
Extraction foo. |
a43702d
to
475d248
Compare
@SkySkimmer: well spotted, thanks, fixed. |
What does it do on #17395 ? |
The "needs: rebase" label was set more than 30 days ago. If the PR is not rebased in 30 days, it will be automatically closed. |
475d248
to
c3233a6
Compare
As far as I remember, this was ready. Maybe @ppedrot would have some time to look at it. Basically, when inside a module, module type or functor, the PR extracts as if we had first closed the module, and the code for warning when extracting from an open module or functor, or failing when extracting from an open module type are removed. @coqbot: run full CI |
test-suite/bugs/bug_10739.v
Outdated
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.
Maybe we should make this an output test to make sure it doesn't produce garbage?
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.
Yes, that's worth. Done.
🔴 CI failure at commit c3233a6 without any failure in the test-suite ✔️ Corresponding job for the base commit 6f1588d succeeded ❔ Ask me to try to extract a minimal test case that can be added to the test-suite 🏃
|
c3233a6
to
6899560
Compare
@coqbot: run full CI |
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
Looks ready. |
@SkySkimmer would you mind reviewing and eventually merging this one? It seems ready for 8.18 |
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.
Seems to work
@coqbot merge now |
@@ -4,6 +4,6 @@ Module Example. | |||
|
|||
Definition a : nat := 0. | |||
|
|||
Fail Separate Extraction a. | |||
Separate Extraction a. |
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.
This is generating files like test-suite/datatypes.ml
Should we gitignore them or is there something better we can do?
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.
(cherry picked from commit 6899560)
When inside a module, module type or functor, we do as if we had first closed the module, module type or functor before asking to extract.
This implies a small change of behavior of
Recursive Extraction
in a module when none of the extracted term was referring to the outside of the module: the result is now encapsulated in the given module (this changes e.g. the test for #14100). On the other side, the new behavior makesRecursive Extraction
also working in the presence of references outside the module.Fixes #10739
Incidentally, it now also supports the example in #10796.