ancient-france-42909
07/01/2024, 5:50 PMpants --changed-since=$(git merge-base HEAD origin/master) --changed-dependents=transitive list
takes 23GB of memory in our repo 😞ancient-france-42909
07/01/2024, 5:51 PMcurved-television-6568
07/01/2024, 6:52 PMancient-france-42909
07/01/2024, 6:52 PMcurved-television-6568
07/01/2024, 6:52 PMancient-france-42909
07/01/2024, 6:53 PM$ pants list :: | wc -l
28785
ancient-france-42909
07/01/2024, 6:53 PMancient-france-42909
07/01/2024, 6:54 PMancient-france-42909
07/01/2024, 6:55 PMancient-france-42909
07/01/2024, 6:59 PM10943
targets and the same command peaked at 7GB of memory.ancient-france-42909
07/01/2024, 6:59 PMancient-france-42909
07/01/2024, 7:04 PMflat-zoo-31952
07/01/2024, 7:10 PMancient-france-42909
07/01/2024, 7:13 PMflat-zoo-31952
07/01/2024, 7:15 PMflat-zoo-31952
07/01/2024, 7:16 PMancient-france-42909
07/01/2024, 7:16 PMflat-zoo-31952
07/01/2024, 7:17 PMflat-zoo-31952
07/01/2024, 7:17 PMancient-france-42909
07/01/2024, 7:17 PMflat-zoo-31952
07/01/2024, 7:17 PMflat-zoo-31952
07/01/2024, 7:18 PMflat-zoo-31952
07/01/2024, 7:18 PMancient-france-42909
07/01/2024, 7:18 PMancient-france-42909
07/01/2024, 7:19 PMflat-zoo-31952
07/01/2024, 7:19 PMflat-zoo-31952
07/01/2024, 7:19 PMflat-zoo-31952
07/01/2024, 7:20 PMancient-france-42909
07/01/2024, 7:21 PMancient-france-42909
07/01/2024, 7:21 PMflat-zoo-31952
07/01/2024, 7:22 PMflat-zoo-31952
07/01/2024, 7:23 PMflat-zoo-31952
07/01/2024, 7:23 PMancient-france-42909
07/01/2024, 7:23 PMflat-zoo-31952
07/01/2024, 7:25 PMancient-france-42909
07/01/2024, 7:27 PMancient-france-42909
07/01/2024, 7:31 PMflat-zoo-31952
07/01/2024, 7:35 PMwide-midnight-78598
07/01/2024, 8:47 PMCopy code$ pants list :: | wc -l
28785
So, just under 1MB per target? That sounds like… a lot...
@flat-zoo-31952 Were you seeing numbers like that too?wide-midnight-78598
07/01/2024, 8:54 PMancient-france-42909
07/01/2024, 8:54 PMwide-midnight-78598
07/01/2024, 8:55 PMtime
or similar?ancient-france-42909
07/01/2024, 8:55 PMancient-france-42909
07/01/2024, 8:56 PMwide-midnight-78598
07/01/2024, 8:58 PMancient-france-42909
07/01/2024, 8:58 PMancient-france-42909
07/01/2024, 8:59 PMancient-france-42909
07/01/2024, 8:59 PMwide-midnight-78598
07/01/2024, 9:00 PMancient-france-42909
07/01/2024, 9:00 PMancient-france-42909
07/01/2024, 9:01 PMwide-midnight-78598
07/01/2024, 9:02 PMancient-france-42909
07/01/2024, 9:05 PMancient-france-42909
07/01/2024, 9:06 PMwide-midnight-78598
07/01/2024, 9:09 PMwide-midnight-78598
07/01/2024, 9:09 PMwide-midnight-78598
07/01/2024, 9:11 PMancient-france-42909
07/01/2024, 9:11 PMwide-midnight-78598
07/01/2024, 9:13 PMancient-france-42909
07/01/2024, 9:23 PMwide-midnight-78598
07/01/2024, 9:24 PMwide-midnight-78598
07/01/2024, 9:35 PMancient-france-42909
07/01/2024, 9:37 PMancient-france-42909
07/01/2024, 9:38 PMancient-france-42909
07/01/2024, 9:38 PMwide-midnight-78598
07/01/2024, 9:39 PMpants --stats-memory-summary {the command}
wide-midnight-78598
07/01/2024, 9:39 PMancient-france-42909
07/01/2024, 9:49 PMwide-midnight-78598
07/01/2024, 9:57 PMancient-france-42909
07/01/2024, 9:58 PMwide-midnight-78598
07/01/2024, 10:06 PMpants.git/call-by-name-cue-deb-make-sql % pants --stats-memory-summary list :: | wc -l ⎇ call-by-name-cue-deb-make-sql*
17:38:20.85 [INFO] Memory summary (total size in bytes, count, name):
48 1 pants.backend.javascript.package_json.AllPackageJsonNames
48 1 pants.backend.project_info.filter_targets.FilterSubsystem
48 1 pants.backend.project_info.list_targets.List
48 1 pants.backend.project_info.list_targets.ListSubsystem
48 1 pants.backend.python.dependency_inference.subsystem.PythonInferSubsystem
48 1 pants.backend.python.goals.lockfile.PythonSyntheticLockfileTargetsRequest
48 1 pants.backend.python.subsystems.setup.PythonSetup
48 1 pants.backend.scala.subsystems.scala.ScalaSubsystem
48 1 pants.backend.scala.subsystems.scala_infer.ScalaInferSubsystem
ancient-france-42909
07/01/2024, 10:14 PMancient-france-42909
07/01/2024, 10:47 PMwide-midnight-78598
07/01/2024, 11:28 PM88377576 1052114 builtins.AddressInput
Would you call this a regression in memory, then? As in, the same repo, same command works on 2.17, but falls over on 2.21?flat-zoo-31952
07/02/2024, 12:32 AMAllDepenciesRequest
or something like that. So pants dependencies —transitive ::
was one of the simpler ways to trigger thatflat-zoo-31952
07/02/2024, 12:34 AMflat-zoo-31952
07/02/2024, 12:35 AMwide-midnight-78598
07/02/2024, 1:01 AMwide-midnight-78598
07/02/2024, 1:43 AMValueError: The explicit dependencyThe first trace actually had what seems to be a genuine error in it?of the target atrequirements/python#connexion
does not provide enough address parameters to identify which parametrization of the dependency target should be used.aio/aio/__init__.py:../lib
happy-kitchen-89482
07/02/2024, 6:09 AMsquare-psychiatrist-19087
07/02/2024, 6:45 AMhappy-kitchen-89482
07/02/2024, 6:58 AMhappy-kitchen-89482
07/02/2024, 6:58 AMhappy-kitchen-89482
07/02/2024, 6:58 AMwide-midnight-78598
07/02/2024, 11:38 AMancient-france-42909
07/02/2024, 11:40 AMflat-zoo-31952
07/02/2024, 12:29 PMancient-france-42909
07/02/2024, 3:11 PMcbirzan@GP3CMXYV9V:~/PycharmProjects/cr_python$ pants --tag=-no_mono --changed-since=6ed4c2c0edf22f1e796f56dd57f0196113cbad5d --changed-dependents=transitive list
17:51:40.99 [INFO] Reading /Users/cbirzan/PycharmProjects/cr_python/.python-version to determine desired version for [python-bootstrap].search_path.
17:51:41.05 [INFO] Reading /Users/cbirzan/PycharmProjects/cr_python/.python-version to determine desired version for [python-bootstrap].search_path.
17:56:19.47 [INFO] Reading /Users/cbirzan/PycharmProjects/cr_python/.python-version to determine desired version for [python-bootstrap].search_path.
⠓ 1154.28s Map all targets to their dependents
wide-midnight-78598
07/02/2024, 3:13 PMancient-france-42909
07/02/2024, 3:14 PM$ find . -name '*.py' | wc -l
7309
ancient-france-42909
07/02/2024, 3:15 PMno_mono
tag, but I guess those still go in for the graph.ancient-france-42909
07/02/2024, 3:20 PM18:19:15.53 [INFO] Filesystem changed during run: retrying `@rule(pants.backend.project_info.dependents.map_addresses_to_dependents())` in 500ms...
ancient-france-42909
07/02/2024, 3:20 PMancient-france-42909
07/02/2024, 3:21 PMflat-zoo-31952
07/02/2024, 3:22 PMancient-france-42909
07/02/2024, 3:22 PMhappy-kitchen-89482
07/02/2024, 3:32 PMancient-france-42909
07/02/2024, 3:32 PMhappy-kitchen-89482
07/02/2024, 3:32 PMhappy-kitchen-89482
07/02/2024, 3:33 PMwide-midnight-78598
07/02/2024, 3:58 PMwide-midnight-78598
07/02/2024, 4:00 PMflat-zoo-31952
07/02/2024, 4:03 PMflat-zoo-31952
07/02/2024, 4:03 PMflat-zoo-31952
07/02/2024, 4:05 PM-ldebug
logs didn't really get me anywhere, just because so many log statements are really really generic, so you can't really trace what's happening with a particular requestflat-zoo-31952
07/02/2024, 4:09 PMflat-zoo-31952
07/02/2024, 4:10 PMwide-midnight-78598
07/02/2024, 4:11 PMancient-france-42909
07/02/2024, 4:18 PMancient-france-42909
07/02/2024, 4:48 PMwide-midnight-78598
07/02/2024, 4:53 PMancient-france-42909
07/02/2024, 5:20 PMglobal
), that has the overwhelming majority of packages, and then a few overrides for specific libs. We're in the process of upgrading to connexion
3, so we have a connexion_3
resolve that has connexion 3 version, and also includes global
. We then have a global_2
resolve, that has connexion
2 inside. And all apps that use connexion
2 use global_2
. So we have a default resolve=parametrize('global', 'global_2', 'connexion_3')
at the top level. Anyway, I had forgotten to add one of these resolves to the parametrize, and it was taking 30+ minutes to print out the error message that it can't find a library (which, btw, is very confusing).ancient-france-42909
07/02/2024, 5:21 PMancient-france-42909
07/02/2024, 5:22 PMancient-france-42909
07/02/2024, 5:25 PMflat-zoo-31952
07/02/2024, 5:25 PMancient-france-42909
07/02/2024, 5:26 PMflat-zoo-31952
07/02/2024, 5:26 PMancient-france-42909
07/02/2024, 5:26 PMancient-france-42909
07/02/2024, 5:26 PMancient-france-42909
07/02/2024, 5:27 PMancient-france-42909
07/02/2024, 5:31 PMancient-france-42909
07/02/2024, 5:31 PMancient-france-42909
07/02/2024, 5:46 PMancient-france-42909
07/02/2024, 5:48 PMflat-zoo-31952
07/02/2024, 5:48 PMfresh-cat-90827
07/02/2024, 5:53 PMflat-zoo-31952
07/02/2024, 6:04 PMancient-france-42909
07/02/2024, 6:16 PMancient-france-42909
07/02/2024, 6:21 PMancient-france-42909
07/02/2024, 6:30 PMancient-france-42909
07/02/2024, 6:57 PMwide-midnight-78598
07/02/2024, 6:59 PMancient-france-42909
07/02/2024, 6:59 PMancient-france-42909
07/02/2024, 6:59 PMwide-midnight-78598
07/02/2024, 7:00 PMancient-france-42909
07/02/2024, 7:00 PMancient-france-42909
07/02/2024, 7:00 PMancient-france-42909
07/02/2024, 7:02 PMancient-france-42909
07/02/2024, 7:17 PMancient-france-42909
07/02/2024, 7:25 PMancient-france-42909
07/02/2024, 7:51 PMancient-france-42909
07/02/2024, 8:06 PMancient-france-42909
07/02/2024, 8:08 PMancient-france-42909
07/02/2024, 8:12 PMancient-france-42909
07/02/2024, 8:40 PMpy-spy> 52.45s behind in sampling, results may be inaccurate. Try reducing the sampling rate
been running for more than 30 minutes, hehancient-france-42909
07/02/2024, 9:07 PMancient-france-42909
07/02/2024, 9:24 PMancient-france-42909
07/02/2024, 9:27 PMflat-zoo-31952
07/04/2024, 1:25 PMancient-france-42909
07/04/2024, 6:31 PMancient-france-42909
07/04/2024, 6:32 PMancient-france-42909
07/08/2024, 5:59 PMhappy-kitchen-89482
07/08/2024, 6:01 PMhappy-kitchen-89482
07/08/2024, 6:01 PMancient-france-42909
07/08/2024, 6:03 PMancient-france-42909
07/08/2024, 6:05 PMhappy-kitchen-89482
07/08/2024, 6:05 PMancient-france-42909
07/08/2024, 6:20 PMwhatever:something-else#X
and whatever:something-else2#X
vs whatever:python#X
, since you cannot have more than one requirements with the same name, even if they're in different resolves, but that's okay-ish.
But now comes the hard part, let's say a library depends on X
. All your libs have to have a resolve of generic
, if they don't depend on X
, and then generic-with-old-X
if they depend on the old one, generic-with-new-X
if they depend on the new one.ancient-france-42909
07/08/2024, 6:21 PMBUILD
files and write a new one, since formatting can sometimes put function calls on the next line, and that's just painful (not that I agree with very long lines 😄 )ancient-france-42909
07/08/2024, 6:22 PMconftest.py
in another target, I did just that, but it was painfulancient-france-42909
07/08/2024, 6:42 PMsteep-eve-20716
08/13/2024, 9:52 PMNone
resolve, so that a target could be shared between other resolves would be so helpful. https://github.com/pantsbuild/pants/issues/21194#issuecomment-2253596097steep-eve-20716
08/13/2024, 9:53 PMsteep-eve-20716
08/13/2024, 9:56 PMMap all targets to their dependents
now takes 20+ minutes 😕