another question regarding the future experimental...
# general
w
another question regarding the future experimental JVM support in 2.9.0. Having the Google Java Formatter and ScalaFMT backends configured in `pants.toml`(in addition to the ones to regarding other languages). When running
./pants lint ::
I don’t see the JVM ones giving any results but if I run
./pants fmt ::
then they are invoked. Is this intended? Example of
./pants lint ::
Copy code
09:42:27.94 [INFO] Initializing scheduler...
09:42:28.40 [INFO] Scheduler initialized.
09:42:31.48 [INFO] Completed: Lint with shfmt - shfmt succeeded.
09:42:31.48 [INFO] Completed: Lint with gofmt - gofmt succeeded.
09:42:31.80 [INFO] Completed: Lint with Shellcheck - Shellcheck succeeded.
09:42:40.28 [INFO] Completed: Lint with Hadolint - hadolint succeeded.
09:42:40.81 [INFO] Completed: Lint with docformatter - Docformatter succeeded.
09:42:41.35 [INFO] Completed: Lint with isort - isort succeeded.
09:42:43.11 [INFO] Completed: Lint with Black - Black succeeded.
All done! ✨ 🍰 ✨
15 files would be left unchanged.


09:42:48.36 [INFO] Completed: Building flake8.pex from 3rdparty/python/flake8.lock
09:42:49.74 [INFO] Completed: Lint with Flake8 - Flake8 succeeded.

✓ Black succeeded.
✓ Docformatter succeeded.
✓ Flake8 succeeded.
✓ Shellcheck succeeded.
✓ gofmt succeeded.
✓ hadolint succeeded.
✓ isort succeeded.
✓ shfmt succeeded.
Example of
./pants fmt ::
Copy code
09:43:04.21 [INFO] Completed: Format with gofmt - gofmt made no changes.
09:43:04.22 [INFO] Completed: Format with shfmt - shfmt made no changes.
09:43:05.69 [INFO] Completed: Format with Google Java Format - Google Java Format made no changes.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer (file:/private/var/folders/c9/5v4gbjh17w9_vy73fc90fnch0000gn/T/.tmpIag3cM/4709a472310186fc49e11bd6e6834da83cb4ab66c4d9fb94408faf6702e354dd/com.google.googlejavaformat_google-java-format_1.13.0.jar) to field com.sun.tools.javac.parser.JavaTokenizer.reader
WARNING: Please consider reporting this to the maintainers of com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


09:43:07.14 [INFO] Completed: Format with Black - Black made no changes.
All done! ✨ 🍰 ✨
15 files left unchanged.


09:43:07.64 [INFO] Completed: Format with docformatter - Docformatter made no changes.
09:43:08.79 [INFO] Completed: Format with isort - isort made no changes.
09:43:21.88 [INFO] Completed: Format with scalafmt - scalafmt made no changes.
        Output from `scalafmt` on 1443 files (.scalafmt.conf):
        Reformatting...
Reformatting... (1.39 %, 20 / 1443)

Reformatting... (6.72 %, 97 / 1443)

Reformatting... (14.35 %, 207 / 1443)

Reformatting... (23.63 %, 341 / 1443)

Reformatting... (33.47 %, 483 / 1443)

Reformatting... (46.08 %, 665 / 1443)

Reformatting... (58.07 %, 838 / 1443)

Reformatting... (67.78 %, 978 / 1443)

Reformatting... (80.39 %, 1160 / 1443)

Reformatting... (93.00 %, 1342 / 1443)

Reformatting... (99.79 %, 1440 / 1443)

Reformatting...



✓ Black made no changes.
✓ Docformatter made no changes.
✓ Google Java Format made no changes.
✓ gofmt made no changes.
✓ isort made no changes.
✓ scalafmt made no changes.
✓ shfmt made no changes.
You can also see in the last one the warning from JVM regarding the reflective access too (not the same I mentioned yesterday, as that was when running some tests, but also something that may need it’s own JVM flags)
h
Oh lol. Oops. We didn't hook up the
UnionRule
to register our implementation with the plugin hook. Fixing now. Thanks!!
w
thanks Eric!
and regarding the reflective access and output: https://github.com/pantsbuild/pants/issues/13951 and https://github.com/pantsbuild/pants/issues/13942 are about cleaning those up. sorry for the trouble!
we should cherry-pick https://github.com/pantsbuild/pants/pull/14108, but i think that the cosmetic issues will have to come in followup
…actually. i’ll bang out https://github.com/pantsbuild/pants/issues/13951 since we’re going to have an RC anyway.
w
great, many thanks to you guys, really good work
❤️ 1