decouple test outptus from dune paths - #69
Closed
shonfeder wants to merge 1 commit into
Closed
Conversation
The `%{bin:...}` variable form is expanded to a path to the executable,
but the exact name of the executable file at that path is subject to
change as an implementation detail of dune's internals so relying on
this path for textual output in test fixtures is not stable. The
location of this path is changing in dune 3.34, which would cause these
tests to fail. Decoupling reference to the executable name from
specification of the dependency will ensure a stable result in the
tests.
This was referenced Jun 11, 2026
Member
|
Thanks for your proposal and sorry for the late response. I'm not sure if the |
avsm
pushed a commit
to ocaml/opam-repository
that referenced
this pull request
Jul 29, 2026
CHANGES: - Be able to split a document according to a block-size parameter and generate a full string (instead of a list of pieces) if `block_size=0` (@toots, @dinosaure, mirage/ocaml-crunch#70) - Fix our tests with `dune.3.34` (@shonfeder, @dinosaure, mirage/ocaml-crunch#69, mirage/ocaml-crunch#71)
Author
|
Sorry I missed your reply!
It will pick the binary from the path it constructs before running the action, and |
Author
|
IIUC, this was addressed by #71, so I can close here. LMK if you have any other questions! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dune expands the
%{bin:...}variable form to a path to the executable, but the exact name of the executable file at that path is subject to change as an implementation detail of dune's internals so relying on this path for textual output in test fixtures is not stable. The location of this path is changing in dune 3.34 (as a result of ocaml/dune#14432), and this will cause these tests to fail, as written. By decoupling reference to the executable name from specification of the dependency in the dune rule, we can ensure a stable result in the tests and set a better example for usage.This breaking change was discovered thru the opam-repo CI in the pre-release of dune 3.34 ocaml/opam-repository#29996 (comment)