Skip to content

Conversation

cormacrelf
Copy link
Contributor

@cormacrelf cormacrelf commented Sep 23, 2025

Fixes #683, but leaves cell-segmentation in place for Meta.

Also fixes #890.

This is achieved by, under cfg(not(fbcode_build)), by not storing the build_file_cell in ImportPath any more. I can confirm this fixes the test case on that issue (https://github.com/cormacrelf/buck2-tset-bug).

This is a big improvement for users outside of Meta because previously it was practically impossible to use transitive sets. I have been writing some rules and have had to emulate the feature with regular starlark sets.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2025
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D83033385. (Because this pull request was imported automatically, there will not be any future comments.)

@cormacrelf cormacrelf force-pushed the feature/no-cell-segmentation branch from 351fb34 to 58cf47a Compare September 23, 2025 08:41
@cormacrelf
Copy link
Contributor Author

Test buck2_interpreter/ package_imports::tests::test fixed, I think windows was failing for unrelated reasons.

@cormacrelf
Copy link
Contributor Author

Also, if you want to turn this into a runtime config flag so you can test and migrate behaviour internally that's fine, feel free to do so. You can make a very similar change that simply overrides build_file_cell = path.cell() at ImportPath construction time, which works just as well and can then be made configurable.

@cormacrelf cormacrelf force-pushed the feature/no-cell-segmentation branch from 58cf47a to 3978603 Compare September 23, 2025 11:06
This is achieved by not storing the build_file_cell in ImportPath any more.
@cormacrelf cormacrelf force-pushed the feature/no-cell-segmentation branch from 3978603 to 6202ba3 Compare September 23, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type inconsistency when loading .bzl from different cells Transitive sets don't aggregate across cells

2 participants