Currently, our environment repos have a layout of something like:
tools/{tool_name}/{os}_{cpu}_archive/
tools/{tool_name}/{os}_{cpu}_executable -> symlink to a file in archive
We could consider updating the layout to something like:
archives/{archive_alias}/
archives/BUILD.bazel # export all dirs
tools/{tool_name}/{os}_{cpu}_executable -> symlink to a file in archive
Which would better support this particular use-case.
It's not obvious whether {archive_alias} should be the filename, filename+sha256, or a user-supplied value in the lockfile. We could add a new 'reference-archive' binary kind that depends on the alias, or we could tie together archives automatically. The specifics here need a bit more of a plan, but something of this shape is probably a thing we'd be willing to adopt in the repo.
Sometimes, several applicable tools come packaged in the same archive.
@andyscott mentioned in https://github.com/theoremlp/rules_multitool/pull/22#issuecomment-2011165507:
Currently, our environment repos have a layout of something like:
We could consider updating the layout to something like:
Which would better support this particular use-case.
It's not obvious whether
{archive_alias}
should be the filename, filename+sha256, or a user-supplied value in the lockfile. We could add a new 'reference-archive' binary kind that depends on the alias, or we could tie together archives automatically. The specifics here need a bit more of a plan, but something of this shape is probably a thing we'd be willing to adopt in the repo.