stocky-helmet-22655
12/02/2022, 9:14 PMModuleNotFoundError
on any 3rd party dependencies that are shared, even if they’re the same version. How am I supposed to handle this situation?happy-kitchen-89482
12/02/2022, 10:46 PMhappy-kitchen-89482
12/02/2022, 10:47 PMhappy-kitchen-89482
12/02/2022, 10:47 PMhappy-kitchen-89482
12/02/2022, 10:48 PMhappy-kitchen-89482
12/02/2022, 10:48 PMhappy-kitchen-89482
12/02/2022, 10:49 PMstocky-helmet-22655
12/03/2022, 1:38 AMBut generally we encourage having a single unified set of allowed requirements (aka “resolve”) for the entire repo, unless you truly need conflicting versions in different parts of the codebaseI would love for this to be the case, unfortunately the repo I am trying to integrate Pants into is a mess right now, with module different sets of dependencies, including a significant amount of overlap with different versions of the same 3rd party deps. Is there a way to tell Pants to treat it like different projects in the same repo? I had assumed that’s what
[source]
was for but that doesn’t seem to be the case
Without Pants you have to repeat requirements for every subproject/distribution/deployable thing, because that’s how the python package/deploy tooling works. But with Pants you just need a single “universe” of allowed requirements, and Pants selects the subset that you actually use in any given case. So it’s a different idiom.Is it possible for this “universe” of allowed requirements to include multiple versions of dependencies? If not I may not be able to incorporate Pants into this repo, at least not until some significant cleanup has been done.. I’m hoping Pants can be a help in performing that cleanup though
happy-kitchen-89482
12/03/2022, 1:41 AMhappy-kitchen-89482
12/03/2022, 1:41 AMhappy-kitchen-89482
12/03/2022, 1:42 AMhappy-kitchen-89482
12/03/2022, 1:42 AMhappy-kitchen-89482
12/03/2022, 1:42 AMhappy-kitchen-89482
12/03/2022, 1:43 AMhappy-kitchen-89482
12/03/2022, 1:43 AMhappy-kitchen-89482
12/03/2022, 1:43 AMhappy-kitchen-89482
12/03/2022, 1:44 AMstocky-helmet-22655
12/03/2022, 1:46 AMstocky-helmet-22655
12/03/2022, 1:47 AMhappy-kitchen-89482
12/03/2022, 1:47 AMhappy-kitchen-89482
12/03/2022, 1:47 AMhappy-kitchen-89482
12/03/2022, 1:47 AMhappy-kitchen-89482
12/03/2022, 1:48 AMhappy-kitchen-89482
12/03/2022, 1:48 AMhappy-kitchen-89482
12/03/2022, 1:48 AMhappy-kitchen-89482
12/03/2022, 1:48 AMstocky-helmet-22655
12/03/2022, 1:49 AMstocky-helmet-22655
12/03/2022, 1:50 AMstocky-helmet-22655
12/03/2022, 1:51 AMstocky-helmet-22655
12/03/2022, 2:00 AMstocky-helmet-22655
12/03/2022, 2:01 AMstocky-helmet-22655
12/03/2022, 2:01 AMhappy-kitchen-89482
12/03/2022, 2:06 AMWhen I try to resolve both packages to the same universe though, it goes back to failing on the same errors as beforeCan you explain what you’re doing here to cause the errors?
happy-kitchen-89482
12/03/2022, 2:06 AMstocky-helmet-22655
12/03/2022, 2:08 AMNote however that the resolves represent “universes”, not projects. So if you have 20 different projects in your repo, but each can be assigned to one of 3 universes, you have 3 resolves, not 20.I’m trying to use each package as a project with one shared universe/resolve. In case showing is better than telling, here’s the code: https://github.com/nikwotton/Broken-Pants-Demo/commit/d0ef5cdde4f10306c7da2a472f59d77b33a68c2b When I run
./pants test ::
it throws errorsstocky-helmet-22655
12/03/2022, 2:09 AMhappy-kitchen-89482
12/03/2022, 2:10 AMhappy-kitchen-89482
12/03/2022, 2:10 AMstocky-helmet-22655
12/03/2022, 2:10 AMhappy-kitchen-89482
12/03/2022, 2:10 AMhappy-kitchen-89482
12/03/2022, 2:10 AMhappy-kitchen-89482
12/03/2022, 2:10 AM3rdparty
subdir of ithappy-kitchen-89482
12/03/2022, 2:10 AMstocky-helmet-22655
12/03/2022, 2:13 AMpipenv_requirements(
name="pipenv",
resolve="packageA"
)
stocky-helmet-22655
12/03/2022, 2:16 AMpython_tests(
name="tests",
resolve="packageA"
)
stocky-helmet-22655
12/03/2022, 2:16 AMstocky-helmet-22655
12/07/2022, 4:20 PM