calm-ambulance-65371
04/26/2022, 3:26 PMresolve='...'
? I have a large company-wide monorepo and we share some modules, but it seems resolve is overly strict and when simply running tests it can't resolve all requirements because they don't all use the same resolvefast-nail-55400
04/26/2022, 3:30 PMparametrize
helper.fast-nail-55400
04/26/2022, 3:30 PMcalm-ambulance-65371
04/26/2022, 3:31 PMpython_sources
?fast-nail-55400
04/26/2022, 3:31 PMhundreds-father-404
04/26/2022, 3:31 PMcalm-ambulance-65371
04/26/2022, 3:33 PMfast-nail-55400
04/26/2022, 3:33 PMresolve=parametrize("a", 'b")
hundreds-father-404
04/26/2022, 3:33 PMpython_sourcesThere, the semantic meaning is that this code can work with either lock file. Note that pants can't actually validate that for you through static analysis. For example, it is possible to have one lock file that uses Django two and another that uses Django three. If you claim that a file using Django works with both lock files, you will have to make sure that you are using the APIs safely Fortunately, pants will run mypy and Pylint with every relevant resolve.
hundreds-father-404
04/26/2022, 3:34 PMfast-nail-55400
04/26/2022, 3:34 PMhundreds-father-404
04/26/2022, 3:35 PMparametrize
with the overrides field. I switched tool chain last week to use multiple resolves, and found that often it is very helpful to be as precise as possible with which code needs to work with multiple lock files. It reduces the surface area of code that you must make sure is compatiblefast-nail-55400
04/26/2022, 3:35 PMparametrize
is used for resolve
on JVM targets, but the same syntax is used for Python targets, so still applicable as an example)calm-ambulance-65371
04/26/2022, 5:45 PMcommon
module in our monorepo that's depended on by something like 15 other modulescalm-ambulance-65371
04/26/2022, 5:48 PMfast-nail-55400
04/26/2022, 6:01 PMfast-nail-55400
04/26/2022, 6:03 PMparametrize
with the actual different resolves.calm-ambulance-65371
04/26/2022, 6:07 PMfast-nail-55400
04/26/2022, 6:07 PMcalm-ambulance-65371
04/26/2022, 6:08 PMfast-nail-55400
04/26/2022, 6:08 PMcalm-ambulance-65371
04/26/2022, 6:08 PMfast-nail-55400
04/26/2022, 6:09 PMhundreds-father-404
04/26/2022, 6:09 PMnd resolving all of them takes... longer than 12 hours, idk I gave upwhen imstalling lockfiles from pex, pants only installs the subset of deps you need for a certain task
fast-nail-55400
04/26/2022, 6:09 PMparametrize
.calm-ambulance-65371
04/26/2022, 6:10 PMcalm-ambulance-65371
04/26/2022, 6:11 PMfast-nail-55400
04/26/2022, 6:11 PMcalm-ambulance-65371
04/26/2022, 6:11 PM2.2
-> 2.11.0rc3
calm-ambulance-65371
04/26/2022, 6:12 PMcalm-ambulance-65371
04/26/2022, 6:14 PMhundreds-father-404
04/26/2022, 6:15 PMcalm-ambulance-65371
04/26/2022, 6:16 PMcalm-ambulance-65371
04/26/2022, 6:16 PMcalm-ambulance-65371
04/26/2022, 7:39 PMgenerate-lockfiles --resolve=python-default
? I have the default set to a resolve called "all" as if I don't define it, I get something like:
UnrecognizedResolveNamesError: Unrecognized resolve name from the field `resolve` in the target module:target: python-default
calm-ambulance-65371
04/26/2022, 8:26 PMâź© ./pants generate-lockfiles --resolve=all
15:24:21.34 [INFO] Completed: Generate lockfile for all
15:24:21.34 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Generate lockfile for all' failed with exit code 1.
stdout:
stderr:
ERROR: Cannot install pantsbuild-pants==2.11.0rc0, pantsbuild-pants==2.11.0rc1, pantsbuild-pants==2.11.0rc2, pantsbuild-pants==
The conflict is caused by:
pantsbuild-pants 2.11.0rc4 depends on pex==2.1.80
pantsbuild-pants 2.11.0rc3 depends on pex==2.1.79
pantsbuild-pants 2.11.0rc2 depends on pex==2.1.78
pantsbuild-pants 2.11.0rc1 depends on pex==2.1.75
pantsbuild-pants 2.11.0rc0 depends on pex==2.1.72
witty-crayon-22786
04/27/2022, 8:45 PMwitty-crayon-22786
04/27/2022, 8:47 PMis there a way to avoid having to runyou don’t need to pass any arguments to `generate-lockfiles`: the default is to generate all of them. so if you have exactly one named resolve in the `resolves` option, that’s what will be built.? I have the default set to a resolve called “all” as if I don’t define it, I get something like:generate-lockfiles --resolve=python-default
witty-crayon-22786
04/27/2022, 8:49 PMpython-default
): you only need to define one if you need more than one.witty-crayon-22786
04/27/2022, 8:52 PM[python].enable_resolves
without defining any additional resolves in [python].resolves