-
-
Notifications
You must be signed in to change notification settings - Fork 57
chore(semantics): Remove determine_main #702
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
base: main
Are you sure you want to change the base?
Conversation
Determining the main using suffix matching was always a goofy idea. The underlying rules have long required that main be a label. Rip out determine_main and provide minimal default semantics for main as part of the existing wrapper macros. Those too should go away, but for now we have them. Replaces #641 with thanks to Keith.
59f9875 to
bf5852e
Compare
|
|
note that this is a subtle compatibility break with rules_python, at least last time I dug into this code, rules_python users couldn't adopt rules_py without changing their code. Perhaps we can make the case that we no longer aim for drop-in compatibility with rules_python, but if we give that up we ought to be clear about it in the readme or other communication with users. |
This is true; rules_python has already swapped |




Determining the main using suffix matching was always weird and a poor choice of semantics. The underlying rules have long required that main be a label. Other rules such as
rust_binaryandgo_binarystrictly require labels, Gazelle generates strict label references. As such this behavior is inconsistent with the broader ecosystem, a source of an unneeded action and potential footguns. Rip out determine_main and provide minimal default semantics for main as part of the existing wrapper macros.Those too should go away, but for now we have them.
Replaces #641 with thanks to Keith.
Fixes #605
Fixes #621
Changes are visible to end-users: yes
BREAKING: The
main=ofpy_*targets must now be a file label. Main will no longer be searched for by string suffix.Test plan