馃殌 feature request
Relevant Rules
lock
Description
The runnable targets generated by lock pass --no-cache to uv:
This flag applies to both build actions and runnable targets. As a result, repeated invocations of bazel run //path:requirements.run (in our case via multirun), use temporary caches instead of reusing registry metadata, Git checkouts, and build metadata.
Describe the solution you'd like
Drop the --no-cache flag from .run target but keep it on build actions. This way runnable targets would use the caller's environment and write the lockfile into the workspace, so they could also reuse the cache. Callers could still pass --no-cache or select a cache with UV_CACHE_DIR if they want.
Describe alternatives you've considered
Patching rules_python downstream. I'll open up a PR to show what my patch looks like.
馃殌 feature request
Relevant Rules
lockDescription
The runnable targets generated by
lockpass--no-cachetouv:rules_python/python/uv/private/lock.bzl
Line 146 in 9cc620e
This flag applies to both build actions and runnable targets. As a result, repeated invocations of
bazel run //path:requirements.run(in our case viamultirun), use temporary caches instead of reusing registry metadata, Git checkouts, and build metadata.Describe the solution you'd like
Drop the
--no-cacheflag from.runtarget but keep it on build actions. This way runnable targets would use the caller's environment and write the lockfile into the workspace, so they could also reuse the cache. Callers could still pass--no-cacheor select a cache withUV_CACHE_DIRif they want.Describe alternatives you've considered
Patching
rules_pythondownstream. I'll open up a PR to show what my patch looks like.