high-yak-85899
10/02/2023, 5:50 PMhigh-yak-85899
10/02/2023, 5:50 PMhigh-yak-85899
10/02/2023, 5:51 PMcurved-television-6568
10/02/2023, 6:02 PMhigh-yak-85899
10/02/2023, 6:03 PMcurved-television-6568
10/02/2023, 6:03 PMhigh-yak-85899
10/02/2023, 6:03 PMcurved-television-6568
10/02/2023, 6:04 PMcurved-television-6568
10/02/2023, 6:05 PMcurved-television-6568
10/02/2023, 6:05 PMhigh-yak-85899
10/02/2023, 6:06 PMhigh-yak-85899
10/02/2023, 6:06 PMcurved-television-6568
10/02/2023, 6:06 PMhigh-yak-85899
10/02/2023, 6:06 PMcurved-television-6568
10/02/2023, 6:06 PMcurved-television-6568
10/02/2023, 6:07 PMhigh-yak-85899
10/02/2023, 6:07 PMcurved-television-6568
10/02/2023, 6:08 PMhigh-yak-85899
10/02/2023, 6:08 PMhigh-yak-85899
10/02/2023, 6:08 PMcurved-television-6568
10/02/2023, 6:09 PMhigh-yak-85899
10/02/2023, 6:17 PMhigh-yak-85899
10/02/2023, 6:24 PMlate-advantage-75311
10/02/2023, 7:08 PMa.py
and b.py
and a has an import b
in it. In your BUILD file you have a python_source
for b
that has resolve=parametrize(...)
and a python_source for a
that has no resolve
specified explicitly, and you are getting an error that it can't figure out which target a
depends on?late-advantage-75311
10/02/2023, 7:11 PMdependencies=parametrize(...)
...high-yak-85899
10/02/2023, 7:11 PMsrc/
- a.py
- b.py
- file1.txt
- file2.txt
I want a.py
to be parametrized as having either 1) just file1.txt
or 2) file1.txt
and file2.txt
, so I make a build file like this
resource(name="file1", source="file1.txt")
resource(name="file2", source="file2.txt")
python_sources(overrides={"a.py": {"dependencies": parametrize(one=[":file1"], both=[":file1", ":file2"])}})
Then, in b.py
, I have an import a
statement.high-yak-85899
10/02/2023, 7:11 PMa.py
successfully; one that has one file and one that has both.high-yak-85899
10/02/2023, 7:12 PMimport a
because there are two potential targets to pick and a resultant ambiguity.high-yak-85899
10/02/2023, 7:12 PMhigh-yak-85899
10/02/2023, 7:13 PMno infer dep
comments since I've updated my build files to manually call out the dependency anyway.late-advantage-75311
10/02/2023, 7:13 PMresolve
that is parametrized because there is special machinery to keep those worlds separate.high-yak-85899
10/02/2023, 7:16 PMlate-advantage-75311
10/02/2023, 7:17 PMdependencies
here usually means dependencies in addition to those that were inferred? so just supplying them in the BUILD file does not imply that inference should not be done.high-yak-85899
10/02/2023, 7:19 PMhigh-yak-85899
10/02/2023, 7:19 PMhigh-yak-85899
10/02/2023, 7:19 PMlate-advantage-75311
10/02/2023, 7:21 PMhigh-yak-85899
10/02/2023, 7:23 PMhigh-yak-85899
10/02/2023, 7:23 PMhigh-yak-85899
10/02/2023, 7:23 PMhigh-yak-85899
10/02/2023, 7:24 PMlate-advantage-75311
10/02/2023, 7:24 PMhigh-yak-85899
10/02/2023, 7:24 PMlate-advantage-75311
10/02/2023, 7:25 PMpython_distribution
or lambda or pex_binarylate-advantage-75311
10/02/2023, 7:25 PM!!big_optional_file
high-yak-85899
10/02/2023, 7:25 PMlate-advantage-75311
10/02/2023, 7:27 PMbig_files_for_local_dev.py
high-yak-85899
10/02/2023, 7:27 PMlate-advantage-75311
10/02/2023, 7:29 PMlate-advantage-75311
10/02/2023, 7:29 PMhigh-yak-85899
10/02/2023, 7:38 PM