-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Don't eagerly flatten a NestedSet
in RepoMappingManifestAction
#18349
Conversation
96fda7a
to
783a194
Compare
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful!
@bazel-io flag |
@bazel-io fork 6.3.0 |
ruleContext.getTransitivePackagesForRunfileRepoMappingManifest()), | ||
runfiles), | ||
ruleContext.getTransitivePackagesForRunfileRepoMappingManifest(), | ||
runfiles.getAllArtifacts(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: getAllArtifacts() does a partial flattening -- symlinks and root symlinks are still flattened. But those those are usually small, so still a big win.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be worth improving that further? Can Runfiles
be serialized? Then that could make for a better action constructor argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so? SourceManifestAction, for example, accepts a Runfiles object directly.
I wouldn't expect a large gain in practice. The symlinks and root_symlinks are usually small. Runfiles.getAllArtifacts() is called in a few different places already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comment, it led me to discover that the repo mapping manifest didn't handle symlinks correctly: #18381
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark. Work towards bazelbuild#17941 Closes bazelbuild#18349. PiperOrigin-RevId: 531165675 Change-Id: Ia2c175834d409c30303dd3ecba0dd276ea2cd905
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark. Work towards bazelbuild#17941 Closes bazelbuild#18349. PiperOrigin-RevId: 531165675 Change-Id: Ia2c175834d409c30303dd3ecba0dd276ea2cd905
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark. Work towards bazelbuild#17941 Closes bazelbuild#18349. PiperOrigin-RevId: 531165675 Change-Id: Ia2c175834d409c30303dd3ecba0dd276ea2cd905
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark. Work towards bazelbuild#17941 Closes bazelbuild#18349. PiperOrigin-RevId: 531165675 Change-Id: Ia2c175834d409c30303dd3ecba0dd276ea2cd905
Delays the flattening from action creation to action execution in preparation for making this action accessible from Starlark.
Work towards #17941