-
Notifications
You must be signed in to change notification settings - Fork 541
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
[bzlmod bug/regression] entry_point
no longer working with blzmod
#958
Comments
entry_point
no longer working with blzmod entry_point
no longer working with blzmod
Same here, our case is even just registering |
my case was fixed at head with 2c29f40, but based on that commit it's because my case had a |
Yeah, I've encountered that with another package and fixed it with the commit. But this's a different issue I think. |
* Added support for users setting `incompatible_generate_aliases` to `True`. They can use the `bin` struct exposed via `@<hub_rep>//<dep>:bin.bzl`. * Added support for bzlmod users not setting `incompatible_generate_aliases`. They can use it via `use_repo("<hub_repo>_<dep")` and then importing the same struct via `@<hub_repo>_<dep>//:bin.bzl`. * The legacy behaviour of the `entry_point` macro is unchanged for the remaining users. Design notes: * Expose the struct in separate `.bzl` files in order to have no eager fetches. * Exposing it via a struct will give users an error message if the target with the specified name does not exist and it will tell the available struct attributes. * The inspiration comes from `rules_js` which @alexeagle has pointed to. Fixes bazelbuild#958.
* Added support for users setting `incompatible_generate_aliases` to `True`. They can use the `bin` struct exposed via `@<hub_rep>//<dep>:bin.bzl`. * Added support for bzlmod users not setting `incompatible_generate_aliases`. They can use it via `use_repo("<hub_repo>_<dep")` and then importing the same struct via `@<hub_repo>_<dep>//:bin.bzl`. * The legacy behaviour of the `entry_point` macro is unchanged for the remaining users. Design notes: * Expose the struct in separate `.bzl` files in order to have no eager fetches. * Exposing it via a struct will give users an error message if the target with the specified name does not exist and it will tell the available struct attributes. * The inspiration comes from `rules_js` which @alexeagle has pointed to. Fixes bazelbuild#958.
…po (#1206) It seems that the tool was correctly trying to modify the `.bazelrc` at the root of the repo, but the `find` execution would run in the `$PWD`. This change ensures that the `find` is consistent with the file we are trying to modify and allows the user to execute the script from anywhere in the repo. Tested: 1. Update the deleted packages with the version of the script at HEAD 1. Fix the bug 1. Rerun the script from the 'tests' sub-folder in the repo to ensure that running the script is noop. 1. Revert the changes to '.bazelrc' to reduce conflicts as other PRs are modifying it. Work towards #958.
Previously we would depend on the value of .bazelrc and this change ensures that we are explicitly enable bzlmod via CLI args. It seems that the `py_proto_library` integration tests defined in the `//examples:BUILD.bazel` file were not running using `bzlmod` before hand, however, they were correctly executed in the CI. Work towards #958.
@aignas is this fixed? |
Fixed by #1220. |
Add `entry_point` macro to the repo generated by the `pip.parse` extension. This works by using the canonical label literal, so should work without users needing to add the spoke repos to the `use_repo` statement. We test this by having an extra folder in the `bzlmod` example. Fixes #958.
🐞 bug report
Affected Rule
The issue is caused by the rule:entry_point
when using with blzmodIs this a regression?
Yes
Description
entry_point
rule no longer working when used with blzmod🔬 Minimal Reproduction
You can find a reproducible example at this repo: https://github.com/xinbinhuang/rules_python_bug
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: