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

Clarify how __defaults__ apply to target generators. #17493

Merged

Conversation

danxmoran
Copy link
Contributor

Closes #17450

I've seen a few users (including myself) be confused when __defaults__ don't apply to generated targets. Add a blurb to the docs explicitly stating that defaults only apply before target generation, so if you want to specify defaults for both generated & manually-written targets then you need to list both the generator & generated targets in the __defaults__ dict.

I've seen a few users (including myself) be confused when `__defaults__`
don't apply to generated targets. Add a blurb to the docs explicitly
stating that defaults only apply _before_ target generation, so if you
want to specify defaults for both generated & manually-written targets
then you need to list both the generator & generated targets in the
`__defaults__` dict.
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.

Thank you Dan for that clarifying note. 👍🏽

docs/markdown/Using Pants/concepts/targets.md Outdated Show resolved Hide resolved
@kaos kaos merged commit 546bffc into pantsbuild:main Nov 8, 2022
@danxmoran danxmoran deleted the danxmoran/defaults-docs-clarification branch November 8, 2022 21:46
danxmoran added a commit to danxmoran/pants that referenced this pull request Nov 8, 2022
)

I've seen a few users (including myself) be confused when `__defaults__`
don't apply to generated targets. Add a blurb to the docs explicitly
stating that defaults only apply _before_ target generation, so if you
want to specify defaults for both generated & manually-written targets
then you need to list both the generator & generated targets in the
`__defaults__` dict.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]
danxmoran added a commit to danxmoran/pants that referenced this pull request Nov 8, 2022
)

I've seen a few users (including myself) be confused when `__defaults__`
don't apply to generated targets. Add a blurb to the docs explicitly
stating that defaults only apply _before_ target generation, so if you
want to specify defaults for both generated & manually-written targets
then you need to list both the generator & generated targets in the
`__defaults__` dict.
kaos pushed a commit that referenced this pull request Nov 8, 2022
…#17493) (#17498)

Clarify how `__defaults__` apply to target generators. (#17493)

I've seen a few users (including myself) be confused when `__defaults__`
don't apply to generated targets. Add a blurb to the docs explicitly
stating that defaults only apply _before_ target generation, so if you
want to specify defaults for both generated & manually-written targets
then you need to list both the generator & generated targets in the
`__defaults__` dict.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]
kaos pushed a commit that referenced this pull request Nov 8, 2022
…#17493) (#17499)

Clarify how `__defaults__` apply to target generators. (#17493)

I've seen a few users (including myself) be confused when `__defaults__`
don't apply to generated targets. Add a blurb to the docs explicitly
stating that defaults only apply _before_ target generation, so if you
want to specify defaults for both generated & manually-written targets
then you need to list both the generator & generated targets in the
`__defaults__` dict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify that __defaults__ apply before target generation in docs
2 participants