https://pantsbuild.org/ logo
#development
Title
# development
w

wide-midnight-78598

08/14/2022, 4:31 AM
Has something changed in the past couple of weeks, such that the
pre-commit
hook now needs to download and install a bunch of scala/java tooling?
I wiped my pants install, pulled from main, and started on my plugin. Where before, pre-commit was just a few checks, now it asks me about a bunch of jvm-centric code, and I'm waiting10-15 minutes for pre-commit to finish on 4 python files
h

hundreds-father-404

08/15/2022, 1:58 PM
Not that I'm aware of
w

wide-midnight-78598

08/15/2022, 1:59 PM
It's pretty rough - I basically can't commit with pre-commit enabled. Haven't debugged yet. I thought it passed after the 10-15, but actually not. Just stuck
h

hundreds-father-404

08/15/2022, 2:04 PM
hmm, and that's not being cached?
even if it were, I wouldn't expect 10-15 minutes
w

wide-midnight-78598

08/15/2022, 2:04 PM
Well, I haven't had a pre-commit enabled commit work in a week or two
Ever since it started trying to pull down Scala/Maven/Java stuff for some reason (I have Lulu installed, so I need to give permission to all those tools, which never happened before)
What's weirder is that I'm not even getting git logs about what it's doing, so I'm just kinda assuming it's typechecking or something 🤷
h

hundreds-father-404

08/15/2022, 2:08 PM
Hm, you can manually run the script at
build-support/githooks/pre-commit
w

wide-midnight-78598

08/15/2022, 2:10 PM
Copy code
* Typechecking
[=== 00:00 Building native code... ===]
    Finished release [optimized + debuginfo] target(s) in 0.75s
10:10:35.12 [INFO] Initializing scheduler...
10:10:36.07 [INFO] Scheduler initialized.
⠠ 9.21s Fetching with coursier: org.scala-lang.modules:scala-collection-compat_2.13:2.4.4
⠠ 8.79s Fetching with coursier: org.scala-lang:scala-compiler:2.13.7
⠠ 8.77s Fetching with coursier: org.scala-lang:scala-reflect:2.13.7
⠠ 9.50s Fetching with coursier: org.typelevel:simulacrum-scalafix-annotations_2.13:0.5.4
⠠ 9.50s Fetching with coursier: org.javassist:javassist:3.28.0-GA
⠠ 9.50s Fetching with coursier: com.chuusai:shapeless_2.13:2.3.7
I must be somehow pulling in java in the transitive deps???
🤯
h

hundreds-father-404

08/15/2022, 2:13 PM
Hm, I think you could do
--changed-since=<fill me in> --changed-dependees=transitive list
to see why that's happening
w

wide-midnight-78598

08/15/2022, 2:14 PM
Ahh, thanks - I was looking for that dependees command - couldn't remember
❤️ 1
🤦‍♂️
h

hundreds-father-404

08/15/2022, 3:04 PM
oh, so what I think is happening: for dependees to work, we need to map every target to its transitive deps. Even though you only changed Python code, it is possible for Python and JVM code to have a dependency (which currently does nothing) To determine JVM deps, we need to do dep inference, and thus pull down those tools
so, that is expected. what is not expected is why this is so slow for you, and not cached
w

wide-midnight-78598

08/15/2022, 3:05 PM
I let it run for like 40 minutes and I think it downloaded now, but is this functionality new? I've never installed these tools before
h

hundreds-father-404

08/15/2022, 3:06 PM
I thought we've had JVM code in pantsbuild/pants for several months now