aloof-angle-91616
02/20/2020, 10:29 PMhundreds-breakfast-49010
02/20/2020, 10:29 PM./pants --v2 --no-v1 <goal> --help
, right now we're getting help results for both the v2 and v1 versions of that goalhundreds-breakfast-49010
02/20/2020, 10:29 PMhundreds-father-404
02/20/2020, 10:38 PM./pants --no-v1 --v2 goals
, not --help
hundreds-breakfast-49010
02/20/2020, 10:39 PMhundreds-breakfast-49010
02/20/2020, 10:39 PM--help
, right?aloof-angle-91616
02/20/2020, 10:39 PMaloof-angle-91616
02/20/2020, 10:39 PMhundreds-father-404
02/20/2020, 10:57 PMhundreds-breakfast-49010
02/21/2020, 1:28 AMlocal_pants_runner.py
?hundreds-breakfast-49010
02/21/2020, 1:34 AMmaybe_run_v1
and maybe_run_v2
there, at the same time, and presumably relying on self.__options._goals_by_version
to figure out what exactly to run?hundreds-breakfast-49010
02/21/2020, 1:34 AM_options
member for v1
or v2
?hundreds-father-404
02/21/2020, 1:35 AM./pants --v1 --v2 fmt fmt2 ::
.
Itâs also possible to run ambiguous goals at the same time, ./pants --v1 --v2 test ::
will run test with both the V1 and V2 implementationshundreds-breakfast-49010
02/21/2020, 1:36 AM--help
flag to be ambiguous too, right?hundreds-breakfast-49010
02/21/2020, 1:36 AM./pants --v2 --v1 test --help
hundreds-breakfast-49010
02/21/2020, 1:36 AMhundreds-father-404
02/21/2020, 1:48 AMhundreds-breakfast-49010
02/21/2020, 2:08 AMhundreds-breakfast-49010
02/22/2020, 2:05 AMIPython
subystem currently works?hundreds-breakfast-49010
02/22/2020, 2:06 AMhundreds-breakfast-49010
02/22/2020, 2:06 AMhundreds-father-404
02/22/2020, 4:52 AMâipython-version
to change the version to the one they want.
This will be very similar to how we do the V2 linters, where we have a subsystem for the underlying tool.
To use it in a rule, simply declare subsystem_rule(IPython) and request it as a param to the rulehappy-kitchen-89482
02/22/2020, 5:40 AMaloof-angle-91616
02/24/2020, 4:49 PM@frozen_after_init
@dataclass(unsafe_hash=True)
class Get(Generic[_Product]):
"""Experimental synchronous generator API.
May be called equivalently as either: # verbose form: Get[product](subject_declared_type,
subject) # shorthand form: Get[product](subject_declared_type(<constructor args for subject>))
"""
aloof-angle-91616
02/24/2020, 4:49 PMhundreds-father-404
02/24/2020, 6:37 PMhundreds-breakfast-49010
02/25/2020, 1:20 AMhundreds-breakfast-49010
02/25/2020, 10:12 PMbazel_protos::remote_execution::*
types are?hundreds-breakfast-49010
02/25/2020, 10:12 PMhundreds-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?