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

allow plugins to provide builtin goals and refactor BSP into backends #20913

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented May 13, 2024

Allow plugins to provide builtin goals via the newly-introduced builtin_goals function in plugin registration module.

Refactor the BSP (Build Server Protocol) support to use that feature by moving it out of the Pants core rules into several new backends.

@tdyas tdyas force-pushed the builtin_goals_in_plugins branch from 6f48967 to 9aba8db Compare May 13, 2024 17:12
@sureshjoshi
Copy link
Member

What's the use case for a plug in providing "built-in goals" rather than regular goal rules?

Feels like BuiltinGoal would no-longer be the correct term for these.

@tdyas
Copy link
Contributor Author

tdyas commented May 15, 2024

What's the use case for a plug in providing "built-in goals" rather than regular goal rules?

Feels like BuiltinGoal would no-longer be the correct term for these.

BuiltinGoal is probably misnamed since it is for goals which run without full option parsing (e.g., the help system). For BSPGoal, it needs to take over stdin and stdout when the Pants BSP implementation runs in "server" mode.

EarlyGoal is probably a better name.

I was not trying to rename BuiltinGoal with this PR though. Should I be?

@sureshjoshi
Copy link
Member

sureshjoshi commented May 15, 2024

I was not trying to rename BuiltinGoal with this PR though. Should I be?

Probably not.

But we should probably carve out a ticket/discussion about this - as once this lands, BuiltIn goal becomes part of the usable public API, need docs around naming, why to use this vs goal_rule, etc etc blah blah.

@tdyas
Copy link
Contributor Author

tdyas commented May 15, 2024

Opened discussion: #20931

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.

None yet

2 participants