Skip to content

Fix multi-target revdep workflow invocation#14024

Merged
Leonidas-from-XIV merged 1 commit intoocaml:mainfrom
Leonidas-from-XIV:revdep-multi-pkg
Apr 6, 2026
Merged

Fix multi-target revdep workflow invocation#14024
Leonidas-from-XIV merged 1 commit intoocaml:mainfrom
Leonidas-from-XIV:revdep-multi-pkg

Conversation

@Leonidas-from-XIV
Copy link
Copy Markdown
Collaborator

Running it the revdep check using the bash syntax that is documented does not work as the {base,core} is not expanded for some reason.

The failure looks like this:

Run packages="{base,core}"
warning: not writing modified lock file of flake 'git+file:///home/runner/work/dune/dune?shallow=1':
• Updated input 'revdeps-dune':
    'github:ocaml/dune/898e0121ff1fb1b5499f9aa976ea5bfc4258cb29?narHash=sha256-1mstTMWySXgw6qwrB6Mhx3BiPSBI1wBfIvxNewnsGdA%3D' (2026-03-27)
  → 'path:/home/runner/work/dune/dune?lastModified=1775206722&narHash=sha256-DfDrJYjCed47uZ1SgXp0QVStg7ZSDkFFWz0P8We8NQY%3D' (2026-04-03)
copying path '/nix/store/0zjk4bg7bw2zsh3w0rnyn4b4hfiw0s9n-source' from 'https://cache.nixos.org'...
unpacking 'github:nix-ocaml/nix-overlays/3416a42c17fa31f6de8e40277f3b1c6e0b6f2fef?narHash=sha256-2bbvykJd8IwkmRPSfPRYLHpbAzLJTZY6SEWp%2B9me214%3D' into the Git cache...
unpacking 'github:melange-re/melange/0c7fbb6b6734d54e60b7e73d2d696ec31e90a0c8?narHash=sha256-/RWEvZeNeag3EKRFS9jIyaDLzl0kpmKEKq0htvDMg9g%3D' into the Git cache...
error: flake 'git+file:///home/runner/work/dune/dune?shallow=1' does not provide attribute 'packages.x86_64-linux.revdeps.x86_64-linux.{base,core}', 'legacyPackages.x86_64-linux.revdeps.x86_64-linux.{base,core}' or 'revdeps.x86_64-linux.{base,core}'

This PR changes the list of packages to be a space separated list (fairly common in shell and opam package names do not contain spaces) which gets explicitly expanded to the list of targets for nix build.

A run with "base core" set as packages succeeds just fine: https://github.com/Leonidas-from-XIV/dune/actions/runs/23940067487/job/69824268157

Running it the revdep check using the bash syntax that is documented
does not work as the `{base,core}` is not expanded for some reason.

The failure looks like this:

```
Run packages="{base,core}"
warning: not writing modified lock file of flake 'git+file:///home/runner/work/dune/dune?shallow=1':
• Updated input 'revdeps-dune':
    'github:ocaml/dune/898e0121ff1fb1b5499f9aa976ea5bfc4258cb29?narHash=sha256-1mstTMWySXgw6qwrB6Mhx3BiPSBI1wBfIvxNewnsGdA%3D' (2026-03-27)
  → 'path:/home/runner/work/dune/dune?lastModified=1775206722&narHash=sha256-DfDrJYjCed47uZ1SgXp0QVStg7ZSDkFFWz0P8We8NQY%3D' (2026-04-03)
copying path '/nix/store/0zjk4bg7bw2zsh3w0rnyn4b4hfiw0s9n-source' from 'https://cache.nixos.org'...
unpacking 'github:nix-ocaml/nix-overlays/3416a42c17fa31f6de8e40277f3b1c6e0b6f2fef?narHash=sha256-2bbvykJd8IwkmRPSfPRYLHpbAzLJTZY6SEWp%2B9me214%3D' into the Git cache...
unpacking 'github:melange-re/melange/0c7fbb6b6734d54e60b7e73d2d696ec31e90a0c8?narHash=sha256-/RWEvZeNeag3EKRFS9jIyaDLzl0kpmKEKq0htvDMg9g%3D' into the Git cache...
error: flake 'git+file:///home/runner/work/dune/dune?shallow=1' does not provide attribute 'packages.x86_64-linux.revdeps.x86_64-linux.{base,core}', 'legacyPackages.x86_64-linux.revdeps.x86_64-linux.{base,core}' or 'revdeps.x86_64-linux.{base,core}'
```

This PR changes the list of packages to be a space separated list
(fairly common in shell and opam package names do not contain spaces)
which gets explicitely expanded to the list of targets for `nix build`.

Signed-off-by: Marek Kubica <marek@tarides.com>
@Leonidas-from-XIV Leonidas-from-XIV changed the title Fix multi-target revdep invocation Fix multi-target revdep workflow invocation Apr 3, 2026
Copy link
Copy Markdown
Member

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

LGTM, assuming it has been tested!

@Leonidas-from-XIV
Copy link
Copy Markdown
Collaborator Author

Yes, you can see the test run where I test both "base core" (two packages, this time space separated) linked above. Essentially I implement what the semantics of {a,b} are.

@Leonidas-from-XIV Leonidas-from-XIV merged commit 28f0eb8 into ocaml:main Apr 6, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants