Skip to content

--incompatible_filegroup_runfiles_for_data #26330

@fmeum

Description

@fmeum

Motivation

filegroup currently does not include the runfiles of its srcs into its own runfiles when used in the data attribute of a rules. As a consequence, replacing an executable file with an executable target with additional runfiles is a potentially breaking change for anyone who consumes it in a filegroup.

Description

With --incompatible_filegroup_runfiles_for_data, filegroup merges the runfiles from its srcs into its own runfiles, regardless of whether it is then used in a "default" or "data" runfiles context.

Incompatible Flag

--incompatible_filegroup_runfiles_for_data

Migration Guide

Since flipping this flag may only add additional runfiles, migration usually isn't needed.

Analysis test assertions may need to be updated and test runtime may increase in some cases due to larger runfiles trees. If this causes problems, query and cquery's somepath operator can be used to determine the source of the additional runfiles.

In which Bazel LTS version will this incompatible change be enabled?

Bazel 9

Additional Context

#25365

TODO List

No response

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)incompatible-changeIncompatible/breaking changeteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, website

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions