Skip to content

feat: support manifest based runfiles lookup #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Feb 9, 2024
Merged

feat: support manifest based runfiles lookup #214

merged 25 commits into from
Feb 9, 2024

Conversation

aherrmann
Copy link
Owner

Part of #86

  • Integration test for runfiles
  • Integration test for runfiles manifest
  • update generated files
  • Factor out runfiles discovery
  • factor out var names and suffixes
  • Factor out realpath conversion
  • runfiles-discovery: more general interface
  • discoverRunfiles returns Location
  • Implement general runfiles discovery
  • Unit tests for runfiles discovery
  • Accept runfiles discovery options at create
  • Named DiscoverOptions type
  • Factor out directory based runfiles lookup
  • Unit test for directory based lookup
  • Factor out rpath splitting
  • update generated files
  • PRath HashMapContext
  • Implement manifest based runfiles strategy
  • Support manifest based runfiles lookup
  • Add unit tests for Runfiles
  • Avoid name Self
  • Document --nobuild_runfile_manifests behavior

With repo remapping in play, since Bazel 6 and bzlmod, we need to
consider the repository and path components of an rpath separately. This
is particularly relevant for the manifest based runfiles strategy where
we need to look up runfiles paths in a key-value mapping. If we were to
use simple strings as keys in this mapping then a runfiles lookup that
involves remapping would always require an extra allocation to construct
the new runfiles path with the remapped repository. This is unnecessary,
if we simply consider the repository and path component separately, then
we can avoid this extra allocation.
Use more descriptive names to bind `This()`.
It also disables the runfiles directory generation.
@aherrmann aherrmann enabled auto-merge February 9, 2024 17:13
This makes it easier to properly handle the case when the repo mapping
file does not exist.
@aherrmann aherrmann merged commit 3fd56ec into main Feb 9, 2024
@aherrmann aherrmann deleted the runfiles branch February 9, 2024 19:58
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.

1 participant