breezy-mouse-20493
12/05/2023, 9:56 PMpants repl
. Given a repo that has multiple projects, what addresses are valid to use with pants repl
?
src
└── python
├── BUILD
├── project1
├── project2
├── project3
.
.
.
pants repl src/python/project1
works as expected. However if project1
and project2
both have a common third party dependency, then I see Pex `ResolveError`'s. So, apparently it's not okay to do this.
Which is a bummer because I wanted to pants repl ::
. What should I be doing instead? This is sort of a hypothetical... Not sure who would actually want to open a REPL with the entire universe in it, but someone on my team might ask to do this and I want to know what the story is 😄curved-television-6568
12/05/2023, 10:22 PMpants export
to get a venv to play with..breezy-mouse-20493
12/05/2023, 10:25 PMbreezy-mouse-20493
12/05/2023, 10:28 PMbroad-processor-92400
12/06/2023, 6:27 AMbroad-processor-92400
12/06/2023, 6:29 AMproject1
needs pydantic<2
and project2
needs pydantic>=2
, what should happen for pants repl ::
?late-advantage-75311
12/06/2023, 10:42 AMResolveError
)
https://www.pantsbuild.org/docs/reference-clibreezy-mouse-20493
12/06/2023, 2:36 PMbreezy-mouse-20493
12/06/2023, 2:42 PMResolveError
Yeah, I agree that would be good. Should have posted this earlier. Here is the tail of the actual traceback:
pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /home/alex/.cache/pants/named_caches/pex_root/unzipped_pexes/a3363d23744e7994b84a07a9e15356d7dfe15855.
Needed cp310-cp310-manylinux_2_35_x86_64 compatible dependencies for:
1: numpy
Required by:
project1 4.5.6
project2 1.2.3
But this pex had no ProjectName(raw='numpy', normalized='numpy') distributions.>
There are five more of these, for h5py, pyzmq, pydantic, and a few others.late-advantage-75311
12/06/2023, 3:03 PM1.2.3
and 4.5.6
. Oh, the projects are configured as publishable artifacts? I would expect the issue is coming from somewhere here, and may be related to this issue. It would be instructive to see what is happening in the sandbox during failure.
I don't think there isn't something fundamental about the repl ::
that should prevent you from running it with project1 and project2 loaded unless they are actually incompatible.breezy-mouse-20493
12/06/2023, 5:43 PMpublish artifactsCorrect! I have a
python_artifact
target in some of these modules because they will packaged and uploaded to a local pypi server.breezy-mouse-20493
12/06/2023, 5:45 PMpants repl ::
works. So what exactly is going on here?late-advantage-75311
12/06/2023, 5:48 PMbreezy-mouse-20493
12/06/2023, 5:50 PMpants test ::
against non-packaged modules. Tests can simply run against source code in the repo.breezy-mouse-20493
12/06/2023, 5:51 PMlate-advantage-75311
12/06/2023, 5:55 PMpython_artifact
target is likely a bug, but more details would be helpful to be able to figure that out. This is related to the tests issue I mention above only in what I am guessing is the root cause.breezy-mouse-20493
12/06/2023, 6:04 PMlate-advantage-75311
12/06/2023, 6:06 PM