Using <google-java-format>, has anyone else had is...
# general
l
Using google-java-format, has anyone else had issues with java text blocks” For example:
Copy code
String multiLine = 
  """
  My multi-line string!
  """
When running
pants fmt src::
the formatter complains (we’re using
[jvm].jdk=temurin:1.17
)
I noticed that when running:
Copy code
pants fmt src/jvm::
what’s logged to the console is:
Copy code
08:48:26.44 [INFO] pantsd started
08:48:27.69 [INFO] Initializing scheduler...
08:48:29.42 [INFO] Scheduler initialized.
⠠ 1.25s Ensure download of JDK --jvm=temurin:1.11.
even though I’ve set
[jvm].jdk=temurin:1.17
. When I compile. it’s not an issue and the override is
1.17
. Am I missing a config setting for the formatter?
c
do you need to set
[jvm].tool_jdk
too?
👀 1
❤️ 1
b
Amazing, this worked out great for us! We did not locate this setting in the config file.
c
heh, it's tucked away as the last setting on the JVM doc. I see we also don't reference it on the main Java and Scala page. Would that be the best place to call this out?
l
I would. It really wasn’t obvious and just assumed
[jvm].jdk
would apply to cmds also, not just build
@careful-address-89803 our last blocker is the IDE setup for the JVM (with bsp). You wouldn’t happen to have insight on getting setup with intellij? https://pantsbuild.slack.com/archives/C046T6T9U/p1714521696147849
c
Unfortunately, I don't have experience with using the JVM backend. I gave a longshot suggestion, hopefully that helps