Manifezt: handle static ~uses
What
This MR extends Manifezt to support ~uses
annotations on static files and directories. Until now, ~uses
was only used for executables; for instance, "this test depends on octez-node
". With this MR, it is now possible to say that a test depends on, say, the michelson_test_scripts
folder. Then, if, say, michelson_test_scripts/opcodes/xor.tz
is modified, Manifezt can add the corresponding tag.
Why
Generalizing dependencies to ones which are not OCaml executables will in particular be useful for rollup kernels. Those are Rust files, so they are not known by the Manifest, which focuses on OCaml. But if they are modified, tests that run kernels need to be run.
How
This MR simply extends the existing function add_tag_for_path
to consider parent directories recursively. This function is already used for OCaml executables. After this extension, one can declare a dependency on, say, _build/install
to depend on all public executables. This is a side-effect of this MR that is not strictly necessary for the stated goal but which does not hurt.
Then, we call this function on all files that changed, to support files other than executables.
Manually testing the MR
Edit file tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out
to add a line like:
hello: michelson_test_scripts
Then check that tag hello
is added when you modify anything from michelson_test_scripts
:
make -C manifest manifest
manifest/manifest --manifezt michelson_test_scripts/opcodes/xor.tz
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR