Skip to content

Conversation

@nomeata
Copy link

@nomeata nomeata commented Nov 13, 2025

This refines upon #194, which was quickly getting boring. This refines the setup so that the dune file does not need to know the names and order of passes.

Unfortunately, dune does not support comparing directories (ocaml/dune#3567), so this uses a self-updating dune include to work-around that, as suggested in
https://dune.readthedocs.io/en/stable/reference/dune/include.html

@nomeata
Copy link
Author

nomeata commented Nov 13, 2025

(Not sure if the complexity of a dune include is justified here.)

This refines upon #194, which was quickly getting boring. This refines
the setup so that the `dune` file does not need to know the names and
order of passes.

Unfortunately, `dune` does not support comparing directories
(ocaml/dune#3567),
so this uses a self-updating dune include to work-around that, as
suggested in
https://dune.readthedocs.io/en/stable/reference/dune/include.html
@nomeata nomeata force-pushed the joachim-rynpyqqltlrs branch from 9ab1fd9 to 5100f1a Compare November 14, 2025 09:25
@nomeata nomeata marked this pull request as ready for review November 14, 2025 09:25
@nomeata
Copy link
Author

nomeata commented Nov 14, 2025

This may be not be the final solution (ocaml/dune#3567 would help), but it’s certainly an improvement that one doesn’t have to manually edit dune files, and that

dune runtest test-middlend --auto-promote --diff-command "diff -Nur"

can fix things up.

@nomeata nomeata changed the title middlend-test: do not require copying pass names in dune files test-middlend: do not require copying pass names in dune files Nov 14, 2025
@nomeata
Copy link
Author

nomeata commented Dec 3, 2025

@DCupello1 should we merge this before merging all the new passes? It does help resolving the merge conflicts if one doesn't have to manually edit the dune file (but merge conflicts still have to be resolved locally)

Copy link

@DCupello1 DCupello1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to merge this in as well.

(looks like this is just making it so you don't have to copy i.e. "06-sub.il" many times around which obviously makes it easier for both of us)

@nomeata
Copy link
Author

nomeata commented Dec 3, 2025

Yes, and after a merge one can run

dune runtest test-middlend --auto-promote

to update that file. Still not as convenient as it should be, but an improvement.

@nomeata
Copy link
Author

nomeata commented Dec 3, 2025

Actually, let me add a .gitattribute to mark the generated file as binary, this way we never get conflict markers therein, which would confuse dune.

@nomeata nomeata merged commit b3bff17 into main Dec 3, 2025
7 checks passed
@nomeata nomeata deleted the joachim-rynpyqqltlrs branch December 3, 2025 13:53
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.

3 participants