hundreds-father-404
02/26/2020, 1:13 AMTargetAdaptor and HydratedTarget.
Turns out, HydratedTarget doesn’t store any information not contained in TargetAdaptor. hydrated_target.address == hydrated_target.adaptor.address and hydrated_target.dependencies == hydrated_target.adaptor.dependencies.
The proposal is:
1) Remove dependencies and address as fields on HydratedTarget. HydratedTarget only has one field TargetAdaptor
2) Add a method on TargetAdaptor to convert back to a HydratedTarget by calling HydratedTarget(self)
3) Possibly rename HydratedTarget to something like TargetWrapper or GenericTarget?
Why keep HydratedTarget? We need it for the type-driven graph to work properly. A HydratedTarget is a generic wrapper around different target classes, whereas a TargetAdaptor has different types like PythonTestsAdaptor and PythonLibraryAdaptor. We need to be able to work with targets both generically and depending on their target type (i.e. unions)
Thoughts?