rhythmic-butcher-20315
01/04/2024, 6:38 PMrequirements.txt
file that's shared between lots of projects, and this file is being managed by pants. One issue we're facing is that when a project needs to test a new library, it takes a very long time for pants to generate a new lockfile as it tries to check if all dependencies are compatible with each other.
I am sure this is not something that I am the only one facing and I wanted to know if you can share some suggestions on how to deal with this issue.
Currently, our projects are separated by contexts, so I'm testing creating requirements.txt
files for each context to have a smaller subset of dependencies for each context instead of having only one requimements.txt
for the entire repo. This makes the issue more manageable, but we lose the central dependency management that pants gives us.
One thing that I also want to try is to use a single requirements.txt
file for the entire repo, but to create different resolves for each context with their subset of dependencies. I am not sure if this solves my issue, but if this could simplify and speed up the process of generating lockfiles, that would be great.
So, what are your thoughts on these approaches, and could you share any suggestions on how to deal with a single requirements.txt
, but many projects?
Also, is there any way to create a resolve from dependencies that pants detected by itself? I think that would be a cool experiment to try.
Thanks in advance!curved-manchester-66006
01/04/2024, 7:36 PMOne issue we're facing is that when a project needs to test a new library, it takes a very long time for pants to generate a new lockfile as it tries to check if all dependencies are compatible with each other.The time for
generate-lockfiles
is a problem, or that it updates "a bunch of other stuff" is a problem in its own right?rhythmic-butcher-20315
01/04/2024, 8:38 PMcurved-manchester-66006
01/04/2024, 8:41 PMrhythmic-butcher-20315
01/04/2024, 8:49 PMcurved-manchester-66006
01/04/2024, 9:16 PMrhythmic-butcher-20315
01/04/2024, 10:50 PMpolite-angle-82480
01/05/2024, 5:32 AMpip.log
file that prints pip activity. In that log file you can see pip saying things like “downloading multiple versions…this could take a while” Implementing cburrough’s 2nd suggestion to add tighter constraints for packages that pip complains about would help pip speed up. More conversation in this threadrhythmic-butcher-20315
01/05/2024, 4:48 PMflat-sunset-36133
12/13/2024, 6:13 PMpolite-angle-82480
12/16/2024, 4:07 PMflat-sunset-36133
12/17/2024, 7:30 PM