Skip to content

Revisit --enable_runfiles #9248

@buchgr

Description

@buchgr

The flags --build_runfile_manifests and --build_runfile_links govern whether runfile manifests and runfile trees should be created at the time of building a binary. bazel run/test has extra logic to create runfile trees on-demand if --nobuild_runfile_links is set. This is where --enable_runfiles comes in. It disables any runfile trees creation and instead only copies the input manifest to the output manifest.

  1. I suggest we deprecate and remove the flag.
  2. Instead we introduce --test_runfile_links which enables/disables the symlink tree creation for bazel run/test. On Windows, both --build_runfile_links and --test_runfile_links would be disabled by default.
  3. In case of --nobuild_runfile_links it also copies the input manifest to the output manifest. This is unnecessary and can be slow.
  4. It has a correctness issue in that if its value changes analysis is not rerun: Runfiles tree is not recreated when value of --enable_runfiles changes #9150

@meteorcloudy @laszlocsomor

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)team-Remote-ExecIssues and PRs for the Execution (Remote) teamtype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions