curved-manchester-66006
01/24/2023, 8:30 PMfoo[bar]
, other code to depend on foo[bar,bax]
and yet other code to depend on foo[qux]
, then those dependencies need to be in separate resolvers?enough-analyst-54434
01/24/2023, 8:36 PMenough-analyst-54434
01/24/2023, 8:36 PMenough-analyst-54434
01/24/2023, 8:37 PMfoo[bar,bax,qux]>=1.0
in your requirements.txt for example - no clue where you write your reqs.enough-analyst-54434
01/24/2023, 8:38 PMbaz
extra, add baz
to the extras list there, etc. The resolve / lock sub-setting Pants already does will ensure everyone gets only what they need and not the full union.enough-analyst-54434
01/24/2023, 8:39 PMfoo
dependency which does expose extras.curved-manchester-66006
01/24/2023, 8:48 PMpex_binary
depend on '3rdparty/py:reqs#foo[bar]
which gives "ValueError: The explicit dependency ... does not provide enough address parameters to identify which parametrization of the dependency target should be used."
But in the more typical case where it is 1st party code doing the depending I can have `foo[bar,bax,qux]>=1.0`` and inferred dependencies on foo
will only use the needed extras and not the full union?enough-analyst-54434
01/24/2023, 8:56 PMcurved-manchester-66006
01/24/2023, 9:00 PMfeast[aws,snowflake]==0.25.0
and this
pex_binary(
name="feast-cli",
entry_point="feast.cli:cli",
dependencies=['3rdparty/py:reqs#feast[aws]'
],
resolve="feast_demo"
)
gives
15:59:12.84 [ERROR] 1 Exception encountered:
Engine traceback:
in `run` goal
ValueError: The explicit dependency `3rdparty/py:reqs#feast[aws]` of the target at `src/docker/feastui:feast-cli` does not provide enough address parameters to identify which parametrization of the dependency target should be used.
Target `3rdparty/py:reqs` can be addressed as:
* 3rdparty/py:reqs
* 3rdparty/py:reqs#feast
* 3rdparty/py/requirements.txt:reqs
My interpretation of which is that the []
syntax is not understood by dependencies=
enough-analyst-54434
01/24/2023, 9:00 PMcurved-manchester-66006
01/24/2023, 9:00 PMenough-analyst-54434
01/24/2023, 9:01 PMcurved-manchester-66006
01/24/2023, 9:03 PM$ cat 3rdparty/py/requirements.txt
# TODO: Clarify targets per extra?
feast[aws,snowflake]==0.25.0
enough-analyst-54434
01/24/2023, 9:04 PMenough-analyst-54434
01/24/2023, 9:05 PMenough-analyst-54434
01/24/2023, 9:07 PMcurved-television-6568
01/24/2023, 9:34 PMcurved-manchester-66006
01/25/2023, 9:30 PM