-
-
Notifications
You must be signed in to change notification settings - Fork 61
Remove determine_main rule #641
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
Conversation
|
b449adf to
62920f5
Compare
This inlines this into the executable rules instead. Fixes aspect-build#605 Fixes aspect-build#621
62920f5 to
012a826
Compare
| # NB: we don't use the py_binary macro here, because we want our `main` attribute to be used | ||
| # exactly as specified here, rather than follow rules_python semantics. | ||
| py_binary_rule( | ||
| py_binary( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow what this was testing, but it was trying to force a main file w/o any srcs. if im missing something this case likely doesn't work with this change
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.
|
Closing in favor of just ditching this behavior. |
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.
Vendor `rules_python`'s `determine_main` and remove the need for a separate `determine_main` target which complicates exec properties. Replaces #641 with thanks to Keith. Fixes #605 Fixes #621 Note that `py_venv_*` already mandates that a `main=` label be provided, so this is for legacy `py_binary` only. Should be removed in 2.0. ### Changes are visible to end-users: no - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): no - Suggested release notes appear below: yes The internal `determine_main` targets have been eliminated, simplifying some advanced usages. ### Test plan - Covered by existing test cases --------- Co-authored-by: aspect-marvin[bot] <[email protected]>

This inlines this into the executable rules instead.
Fixes #605
Fixes #621