Skip to content

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Jul 15, 2025

Previously, --force would re-run already run cram tests. However this is no longer the case.

Here is the test with 3.19 before #11994:

 |side-effect should only contain a single "run":
 |
 |  $ cat side-effect
 |  run
+|  run
 |
 |However, if passing --force, we should still be able to re-run cram tests:
 |
 |  $ dune runtest foo.t --force
 |
 |There should be two "run"s here, however there is only one:
 |  $ cat side-effect
 |  run
+|  run
+|  run

@Alizter Alizter force-pushed the test-cram-double-run-force branch from 2747e23 to d1336e4 Compare July 15, 2025 13:55
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

Thanks for catching this. For now, let's just note this in the changes. Using --force is only useful for broken cram tests anyway, and the issue is easily worked around by inserting a dummy edit into the test.

@Alizter
Copy link
Collaborator Author

Alizter commented Jul 16, 2025

For now, I've been doing dune clean and dune build --cache disabled when I need to rerun cram tests. Typically its due to missing dependencies that I get a cache hit on a test that no longer runs correctly.

Previously, --force would re-run already run cram tests. However this is
no longer the case.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter Alizter force-pushed the test-cram-double-run-force branch from d1336e4 to 6df5238 Compare July 23, 2025 02:18
@Alizter
Copy link
Collaborator Author

Alizter commented Jul 23, 2025

If --force is only useful for cram tests and it no longer works there, shouldn't we remove it, or at least throw a warning when people use it?

@rgrinberg
Copy link
Member

We removed it internally because it was of little use. Not sure what we're going to do about it, but I wouldn't worry about it's fate very much.

@rgrinberg rgrinberg merged commit b26723d into ocaml:main Jul 28, 2025
25 checks passed
@Alizter Alizter deleted the test-cram-double-run-force branch July 28, 2025 19:40
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.

2 participants