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

Rename FilesSources and split target into target generator vs. atom target #13190

Merged
merged 2 commits into from
Oct 9, 2021

Conversation

Eric-Arellano
Copy link
Contributor

@Eric-Arellano Eric-Arellano commented Oct 9, 2021

Part of #12954 and the proposal at https://docs.google.com/document/d/1HpJn2jTWf5sKob6zhe4SqHZ7KWBlX4a6OJOwnuw-IHo/edit.

End functionality is the same, but we're now safe in followups to expose files vs. file targets, where the former has an overrides field.

This brings to light an issue explored in #13086: when looking at direct dependencies, should you replace the target generator with its generated targets? Here, we need to for the archive(files=) and relocated_files(files_targets=) fields to work when you put an address for a files target rather than a file target. As the author of those two targets, I did not realize this nuance, even though we had file targets in Pants 2.0+ and this dynamic still existed. This is subtle and awkward, but I think valuable to bring to light something we need to figure out vs. hiding it.

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

… target

[ci skip-rust]
[ci skip-build-wheels]
Copy link
Member

@kaos kaos left a comment

Choose a reason for hiding this comment

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

Lgtm :)

…generator

# Conflicts:
#	src/python/pants/backend/python/goals/setup_py.py
#	src/python/pants/backend/shell/shell_command.py
#	src/python/pants/backend/shell/shell_command_test.py
#	src/python/pants/backend/shell/target_types.py

# 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]
@Eric-Arellano Eric-Arellano merged commit d0cee46 into pantsbuild:main Oct 9, 2021
@Eric-Arellano Eric-Arellano deleted the files-target-generator branch October 9, 2021 22:29
Eric-Arellano added a commit that referenced this pull request Oct 10, 2021
…13194)

Builds off of #13190.

[ci skip-rust]
[ci skip-build-wheels]
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