Skip to content
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

[internal] Use "file addresses" internally for some files and resources targets #13188

Merged

Conversation

Eric-Arellano
Copy link
Contributor

The insight from file targets and its target generator followup is that not all targets generated from the same generator necessarily need to act together as an atomic unit. You can bundle together things into a single target generator, and then callers depend on the more specific generated target to get what they need.

This applies that philosophy to two files() and resources() target internal usages. No change in functionality, but tests out this mental model.

[ci skip-rust]
[ci skip-build-wheels]

…urces` targets

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Copy link
Sponsor Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in accord with the philosophy, but you can see how it sucks for the user: //BUILD_ROOT:files is more verbose than //:build_root, it includes two pieces of information instead of one, as previously, and the second piece of information is useless since it could in principle be determined unambiguously from just the first.

So really we should aim towards supporting just //BUILD_ROOT in the future :)

@Eric-Arellano
Copy link
Contributor Author

Agreed! I should have better clarified that my intention here is dogfooding, including highlighting the sh*it.

@Eric-Arellano Eric-Arellano merged commit 98aeaac into pantsbuild:main Oct 9, 2021
@Eric-Arellano Eric-Arellano deleted the use-files-as-generator branch October 9, 2021 17:41
@stuhood stuhood mentioned this pull request Oct 11, 2021
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.

2 participants