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

Unable to set __defaults__ for a target defined in an internal plugin when using environments #19445

Closed
kevinhughes27 opened this issue Jul 10, 2023 · 2 comments · Fixed by #19446
Assignees
Labels

Comments

@kevinhughes27
Copy link

kevinhughes27 commented Jul 10, 2023

Describe the bug
Unable to set __defaults__ for a target defined in an internal plugin when using environments

MappingError: Failed to parse ./BUILD:
ValueError: Unrecognized target type <custom_target> in //#__defaults__.

The same __defaults__ can be set in other BUILD files. Environments must be defined in the root BUILD file so I suspect this is an ordering issue and the root BUILD file is parsed before loading plugins.

Pants version
2.16.0rc5
I also checked 2.17.0rc1 and it has the same issue

OS
only tested on Linux

@WorkerPants
Copy link
Member

Welcome to the Pantsbuild Community. This looks like your first issue here. Thanks for taking the time to write it.

If you haven't already, feel free to come say hi on Slack.

If you have questions, or just want to surface this issue, check out the #development channel.
(If you want to check it out without logging in, check out our Linen mirror)

Thanks again, and we look forward to your next Issue/PR 😄!

@kaos kaos self-assigned this Jul 11, 2023
@kaos
Copy link
Member

kaos commented Jul 11, 2023

Thanks for the report! I'll get this fixed asap. :)

huonw added a commit that referenced this issue Oct 4, 2023
…s. (Cherry-pick of #19446) (#19968)

Fixes #19445
Fixes #19158

Co-authored-by: Andreas Stenius <[email protected]>
huonw added a commit that referenced this issue Oct 4, 2023
…s. (Cherry-pick of #19446) (#19969)

Fixes #19445
Fixes #19158

Co-authored-by: Andreas Stenius <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants