You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was using the meson rule, I saw that on the second consecutive bazel build //example call, Bazel seemed to be rebuilding / doing something when I thought it should just straight return since nothing should have changed.
I tried to see what was going on using --explain= and --execution_log_json_file= flags and found out it was due to pyc appearing in Meson's mesonbuild repository.
TL;DR I still don't know how this is happening, I tried updating rules_python to the latest version and using some py_binary flags that I thought would ensure the pyc files would appear "before" (precompiled) but nothing seemed to help.
I had also tried excluding the __pycache__ folders and didn't see any effect... until @rickeylev pointed me to a better example in rules_python!
The "fix" seems to be as simple as adding exclude = ["**/__pycache__/*"] to the glob in the Meson repo that imports the downloaded Meson tgz, although I'd love to understand more of what's happening and why! 😅 (e.g. why the pyc files seem to be coming from python 3.11 when I've tried forcing 3.13, etc).
When I was using the
meson
rule, I saw that on the second consecutivebazel build //example
call, Bazel seemed to be rebuilding / doing something when I thought it should just straight return since nothing should have changed.I tried to see what was going on using
--explain=
and--execution_log_json_file=
flags and found out it was due topyc
appearing in Meson'smesonbuild
repository.Repro: https://github.com/jjmaestro/rfcc-meson-rebuilding
TL;DR I still don't know how this is happening, I tried updating
rules_python
to the latest version and using somepy_binary
flags that I thought would ensure thepyc
files would appear "before" (precompile
d) but nothing seemed to help.I had also tried excluding the
__pycache__
folders and didn't see any effect... until @rickeylev pointed me to a better example inrules_python
!https://github.com/bazelbuild/rules_python/blob/727ab43107fb0b2d528140f609b873670a5c6c26/python/private/python_repository.bzl#L187-L195
The "fix" seems to be as simple as adding
exclude = ["**/__pycache__/*"]
to theglob
in the Meson repo that imports the downloaded Meson tgz, although I'd love to understand more of what's happening and why! 😅 (e.g. why thepyc
files seem to be coming from python 3.11 when I've tried forcing 3.13, etc).For more context, see Slack 🧵.
The text was updated successfully, but these errors were encountered: