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
Add support for CoqMakefile.local-late #12411
Conversation
Nope, sorry. |
Test suite change is incorrect according to CI |
Can't you just move down the inclusion of |
Oh, yeah, if there was no reason to have it be so early in the first place (e.g., overriding variables before the rest of the file processes them), then, yeah, let's just move it to the bottom of the file |
Sorry for the late reply, I'm looking into this again now. Note that moving it downwards breaks the use-case of overriding |
As per coq#12411 (comment), instead of using a local-late file, we just move the local file down. This means that we need to replace all the relevant := assignments with = so that users can still override variables, and this mandates that we split up CAMLFLAGS.
ce75697
to
0b4735e
Compare
Okay, I've changed the |
@gares It seems that just moving the local file to the bottom breaks many of the variable overriding features, e.g., how Mtac2 overrides |
As per coq#12411 (comment), instead of using a local-late file, we just move the local file down. This means that we need to replace all the relevant := assignments with = so that users can still override variables, and this mandates that we split up CAMLFLAGS.
This reverts commit 8715429. It actually breaks uses of variable overriding in the wild, as per coq#12411 (comment)
0b4735e
to
6e75aee
Compare
As per coq#12411 (comment), instead of using a local-late file, we just move the local file down. This means that we need to replace all the relevant := assignments with = so that users can still override variables, and this mandates that we split up CAMLFLAGS.
This reverts commit 8715429. It actually breaks uses of variable overriding in the wild, as per coq#12411 (comment)
6e75aee
to
0e8b591
Compare
The variables one can override are documented. I don't recall that one to be documented as overrideable, and should not become so since it reflects Coq sources layout. Mtac2 should be fixed, IMO we should report a bug. Did you investigate the other failures? |
CC @Janno @beta-ziliani : do you recall why you had to override that makefile variable? |
It was introduced when porting to 8.8 in 677df93. We previously had Then for a short while we didn't have COQ_SRC_SUBDIRS (Mtac2/Mtac2#127) but that broke Coq's windows builds so now we have it again. |
I did not, let me push another build so I can see the failures |
It seems that Mtac2 is the only failure. Regarding the Mtac2 failure, I found:
Originally posted by @ejgallego in unicoq/unicoq#17 (comment) So indeed the issue here seems to be that
What should be done? |
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.
The doc looks good. Nonetheless, a few more suggestions--I leave it up to you whether to include them.
The optional file ``CoqMakefile.local-late`` is included at the end of the generated | ||
file ``CoqMakefile``. The following is a partial list of accessible variables: | ||
|
||
:COQ_VERSION: |
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 variable is also available in the non -late
file (I'm using it already). Please move it upward.
Ditto for COQMAKEFILE_VERSION, COQC and COQFLAGS and COQLIBS.
I did not check the others.
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.
All variables are available for use in recipes of rules in the non-late file, as well as in the definitions of variables assigned using =
. They are also available in the prerequisites of rules only if you double the $
and enable secondary expansion. However, these variables are not available when naming the outputs of rules, nor in top-level ifeq
/ifneq
statements, nor in variables assigned with :=
. (I presume your use-cases involve the former kind and not the latter kind?) Do you have suggestions for making this distinction more clear in the documentation?
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.
Indeed. I think it is fine, your explanation could also go in the doc, since the external pointer is a bit boring to follow.
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.
I've added some explanation in the doc, please take a look
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.
please move the non -late
specific variable doc to the previous section
d1de27a
to
d04da97
Compare
2d55ea7
to
aae16b9
Compare
Rebased. Is this ready for merge? |
The test suite is broken |
aae16b9
to
dbe94db
Compare
No idea why the behavior changed, but I've updated the expected output. |
As requested in PR comments Change passive voice to active voice and fix a grammar error As per coq#12411 (comment) Add more documentation about Makefile var use Also apply suggestions from code review Co-authored-by: Jim Fehrle <jim.fehrle@gmail.com>
dbe94db
to
c6992cc
Compare
As requested in PR comments Change passive voice to active voice and fix a grammar error As per coq#12411 (comment) Add more documentation about Makefile var use Also apply suggestions from code review Co-authored-by: Jim Fehrle <jim.fehrle@gmail.com>
c6992cc
to
03c5055
Compare
This allows users to write rules that depend on variables such as VOFILES and VDFILE, which is essential in some of my use-cases (for example, to properly handle seamless version switching, I need to make all of the .vo files depend on a file where I record the version of Coq being used). Fixes coq#10912
No idea why the make output is different on MacOS and nix (see https://dev.azure.com/coq/coq/_build/results?buildId=10659&view=logs&jobId=a5e52b91-c83f-5429-4a68-c246fc63a4f7&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=bde16fc7-7659-5b1c-12aa-0110866d993c or see https://github.com/coq/coq/pull/12411/checks?check_run_id=808290881) but this should fix the discrepency.
As requested in PR comments Change passive voice to active voice and fix a grammar error As per coq#12411 (comment) Add more documentation about Makefile var use Also apply suggestions from code review Co-authored-by: Jim Fehrle <jim.fehrle@gmail.com>
03c5055
to
04c4af2
Compare
CI Green, @gares I think this is finally ready for merge |
@coqbot merge now |
This allows users to write rules that depend on variables such as
VOFILES and VDFILE, which is essential in some of my use-cases (for
example, to properly handle seamless version switching, I need to make
all of the .vo files depend on a file where I record the version of Coq
being used).
Fixes #10912
Kind: feature / infrastructure.
Does this qualify for 8.12 / 8.12+beta1?