I think I've got my questions about `(jvm|scala)_a...
# general
a
I think I've got my questions about
(jvm|scala)_artifacts
answered, but now I'm just trying to run
pants check ::
on a project with a single scala file and it just hangs forever saying
Copy code
Compile src/main/scala/example/Foo.scala with scalac
is there a way to debug what it's doing?
b
If you can get it to fail (either timeout, or by killing the process manually e.g. with
pkill
or a process manager), then you can start inspecting sandboxes: https://www.pantsbuild.org/prerelease/docs/using-pants/troubleshooting-common-issues#debug-tip-inspect-the-sandbox-with---keep-sandboxes For instance: 1.
pants --keep-sandboxes=on_failure check ::
2. make scalac fail 3. jump into the printed sandbox and start inspecting/editing the
__run.sh
script and other contents
a
interesting, I'll give that a shot
should I expect to see a
scalac
process running on my machine? I see two nailgun servers and killing one of them did stop the compilation but I don't know where to find the printed sandbox (if there is one)
I found the
example-jvm
project works so I've been slowly working toward making my test project look exactly like what finally fixed the issue is commenting out my
[jvm].jdk
setting
Copy code
[jvm]
jdk = "temurin:1.21"
👍 1
using
temurin:1.11
and
temurin:1.17
both work, it's just
1.21
that doesn't 🤔
b
should I expect to see a
scalac
process running on my machine? I see two nailgun servers and killing one of them did stop the compilation but I don't know where to find the printed sandbox (if there is one)
Ah, usually there's a line like printed by the
pants ...
invocation:
Copy code
13:21:12.53 [INFO] Preserving local process execution dir /private/var/folders/sv/vd266m4d4lvctgs2wpnhjs9w0000gn/T/pants-sandbox-Tmvlw7 for <process name>.
But maybe the JVM nailgun stuff behaves differently (I don't use it myself, so am not sure).
e
I've found that the
Preserving local process....
line doesn't seem to always print when using
--keep-sandboxes=on_failure
. (The sandbox is still preserved, eg. in
/tmp/pants-sandbox-<####>
or something, but it just doesn't print a log to tell you. Using
--keep-sandboxes=always
seems to always log though