Has something changed in the past couple of weeks,...
# development
w
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
Not that I'm aware of
w
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
hmm, and that's not being cached?
even if it were, I wouldn't expect 10-15 minutes
w
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
Hm, you can manually run the script at
build-support/githooks/pre-commit
w
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
Hm, I think you could do
--changed-since=<fill me in> --changed-dependees=transitive list
to see why that's happening
w
Ahh, thanks - I was looking for that dependees command - couldn't remember
❤️ 1
🤦‍♂️
h
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
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
I thought we've had JVM code in pantsbuild/pants for several months now