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
Bazel now has had a dormant deps feature (--experimental_dormant_deps) for a bit now, where:
You swap attributes and label lists for dormant variables (attr(for_dependency_resolution=), attr.dormant_label(), attr.dormant_label_list() and rule(for_dependency_resolution=)), to allow plumbing through a list of attributes to allow for "dormant" dependency lists and resolution logic
You implement a materializer (attr.label(materializer=)) to turn the above attributes into an actual dependency
As I understand, using virtual_deps currently add an analyze-time dependency on all dependencies in the default requirements (from resolutions.from_requirements(...)) which isn't great. Dormant deps is specifically aimed to help reduce this.
Based on my layperson understanding of how to integrate dormant deps, the virtual_deps+ resolutions interface are quite close to what would be required for a clean drop-in implementation of dormant deps.
(I have begun to take a pass at trying to patch this for a monorepo to validate this, so I'll report back with any other notes about obstacles or even a patch)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bazel now has had a dormant deps feature (
--experimental_dormant_deps) for a bit now, where:attr(for_dependency_resolution=),attr.dormant_label(),attr.dormant_label_list()andrule(for_dependency_resolution=)), to allow plumbing through a list of attributes to allow for "dormant" dependency lists and resolution logicattr.label(materializer=)) to turn the above attributes into an actual dependencyThey have a more detailed design doc @ https://docs.google.com/document/d/1BLgnPvWqI1hfUh-rXD6Gw6QqqjwAyJuqhjuAL0t6lBw/edit?tab=t.0 (bazelbuild/bazel#22241)
As I understand, using
virtual_depscurrently add an analyze-time dependency on all dependencies in the default requirements (fromresolutions.from_requirements(...)) which isn't great. Dormant deps is specifically aimed to help reduce this.Based on my layperson understanding of how to integrate dormant deps, the
virtual_deps+resolutionsinterface are quite close to what would be required for a clean drop-in implementation of dormant deps.(I have begun to take a pass at trying to patch this for a monorepo to validate this, so I'll report back with any other notes about obstacles or even a patch)
Beta Was this translation helpful? Give feedback.
All reactions