Skip to content

Adjust _RocqProject parsing to rocq makefile changes - #880

Merged
cpitclaudel merged 3 commits into
masterfrom
cpc/fix-coqproject-args
Aug 25, 2026
Merged

Adjust _RocqProject parsing to rocq makefile changes#880
cpitclaudel merged 3 commits into
masterfrom
cpc/fix-coqproject-args

Conversation

@cpitclaudel

Copy link
Copy Markdown
Member

This is an attempt to follow lib/coqProject_file.ml instead of doing our own parsing:

  • # starts a comment line;
  • Single quotes toggle quoting and get stripped;
  • \ isn't an escape character, so -arg "-w \"a b\"" (which we used to accept) now needs to be written -arg "-w 'a b'".

Fixes #113, #392, #522, #589. Closes #879.

@RalfJung

RalfJung commented Jul 31, 2026

Copy link
Copy Markdown

\ isn't an escape character

Is this based on experimenting with rocq makefile / reading its code? I don't actually know and never tried what \ does.

@RalfJung

Copy link
Copy Markdown

This seems to work fine with the _RocqProject I was trying to use earlier. :)
Thanks a lot!

@cpitclaudel

Copy link
Copy Markdown
Member Author

Is this based on experimenting with rocq makefile / reading its code? I don't actually know and never tried what \ does.

Reading the code. It used to just dump whatever you added into Makefile, and that's how I wrote the original code. Then that changed, and my -arg code broke. So I rewrote the -arg code to track the new rocq makefile closely.

@Matafou

Matafou commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Thanks @cpitclaudel ! LGTM. The errors in the CI seem unrelated (problem with the generation of to files with same date stamp).

@cpitclaudel

Copy link
Copy Markdown
Member Author

Thanks! I'll have a quick look at fixing the tests and then I'll merge

These tests were broken by fine grained timestamps on CI.
This is an attempt to follow `lib/coqProject_file.ml` instead of doing our own
parsing:

- `#` starts a comment line;
- Single quotes toggle quoting and get stripped;
- `\` isn't an escape character, so `-arg "-w \"a b\""` (which we used to
  accept) now needs to be written `-arg "-w 'a b'"`.

Fixes #113, #392, #522, #589.  Closes #879.
@cpitclaudel
cpitclaudel force-pushed the cpc/fix-coqproject-args branch from 475d4e6 to 73d461f Compare August 1, 2026 15:32
@cpitclaudel

cpitclaudel commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

@Matafou I fixed the par tests; can you have a look? I did my best at reconstructing what the tests meant ^^

@RalfJung

Copy link
Copy Markdown

FWIW I updated and clarified the docs for this on the Rocq side in rocq-prover/rocq#22322 and rocq-prover/rocq#22369, and also fixed the odd behavior Rocq had when there were unpaired ' (they emit an error now). Currently it doesn't look like any kind of escaping is possible.

Comment thread ci/simple-tests/coq-test-coqproject-args.el Outdated
@cpitclaudel

Copy link
Copy Markdown
Member Author

nice, thanks. Pushed a new version

@cpitclaudel
cpitclaudel merged commit 9799d01 into master Aug 25, 2026
280 checks passed
@cpitclaudel
cpitclaudel deleted the cpc/fix-coqproject-args branch August 25, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PG is unusable when -w is passed to Coq via _CoqProject

3 participants