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

loud-stone-83419

04/14/2021, 8:28 PM
@bored-art-40741 Looks like you are making a lot of progress on JVM support, let us know if there are things we can help with 🙂 cc @great-shoe-2826
p

polite-garden-50641

04/14/2021, 8:39 PM
w

witty-crayon-22786

04/14/2021, 8:51 PM
h

hundreds-father-404

04/15/2021, 3:42 AM
A good, fairly independent task is to integrate the autoformatter Google-Java-formatter. It could be a good intro to the plugin API and shouldn't be as blocked on Patrick's work, eg i don't think you'd need compilation implemented Would y'all be interested in that? Not sure if you're using it or not
l

loud-stone-83419

04/15/2021, 7:37 PM
We are not using it, probably would be hard for us to do a good job at it
h

hundreds-father-404

04/15/2021, 7:38 PM
Are you using any linters? Altho I think some of those require compilation so can be trickier
l

loud-stone-83419

04/15/2021, 7:39 PM
we use scalafmt
h

hundreds-father-404

04/15/2021, 7:43 PM
Oh cool, that would be great to add an integration for! I think the only tricky part will be how to install the tool, which @happy-kitchen-89482 was saying is probably through Coursier which Patrick has been adding How would you feel about adding Scalafmt as a first project? There's a guide on adding formatters, and I can also write some additional relevant instructions. A cool result is that it would be usable immediately, even without the rest of Scala implemented. And we can help you get it working as an in repo plugin if you can't yet upgrade to 2.5 :)
h

happy-kitchen-89482

04/15/2021, 7:56 PM
Does Scalafmt require the upstream classpath in order to work? Or is it strictly operating on the structure of the source file, with no other info needed.
👍 1
If the latter, this would be much easier
h

hundreds-father-404

04/15/2021, 8:05 PM
Are y'all using MyPy by chance? An even better starter ticket is tweaking the argv we pass to MyPy to only run over specified files, not the whole transitive closure. It's valuable and 2 users have asked for it, and it's more accessible because you're tweaking existing code rather than writing new code https://github.com/pantsbuild/pants/issues/11553
w

witty-crayon-22786

04/15/2021, 8:20 PM
scalafmt does not require the classpath… scalafix does for “semantic” rewrites, but not for “syntactic” rewrites
l

loud-stone-83419

04/16/2021, 1:36 PM
Not using MyPy but that could be a good issue to start with. Scalafmt plugin would be a good idea as well. What about docker support? I seem to remember you left it out for the community to pick it up
h

hundreds-father-404

04/16/2021, 2:43 PM
I wouldn't recommend starting with docker - it's still not very well scoped and there isn't a guide on how to do it already. Could be cool later tho if y'all were still interested - indeed, it's very frequently requested
h

happy-kitchen-89482

04/16/2021, 4:43 PM
Yeah, the main issue with Docker support is figuring out what that means - different orgs have different needs, and the challenge is reconciling those into a general-purpose feature.
Why don't you jump on that mypy ticket then, to familiarize yourself with the codebase and how rules work?
It'll be good training wheels for the more elaborate jvm work
Note to self: make a github project full of starter projects
h

hundreds-father-404

04/16/2021, 6:00 PM
make a github project full of starter projects
I labeled things "help wanted" a few weeks ago for candidate intern projects for Liam, which are also roughly good starter issues for contributors
Nvm on the MyPy issue, another user fixed it this morning :) I think scalafmt could still be a good starter issue. Lmk if y'all are interested and I can write instructions
h

happy-kitchen-89482

04/18/2021, 5:52 AM
Labels are good, but "help wanted" doesn't really mean the same as "Good for starter projects"
Oh, we have the
good first issue
label
Will use that, and we really don't need
help wanted
as well, I think
we have way too many labels
Yeah, scalafmt seems like a good way to get started then
l

loud-stone-83419

04/19/2021, 1:14 PM
will take on the scalafmt one then
thx for the heads up!
h

happy-kitchen-89482

04/19/2021, 3:11 PM
@hundreds-father-404 can you give some pointers?
h

hundreds-father-404

04/19/2021, 7:24 PM
Yes, writing up an issue. @loud-stone-83419 how are you all installing scalafmt right now? I'm thinking we should install the Graal native images for the fastest performance. I think Pants also supports NailGun, but Graal seems simpler https://scalameta.org/scalafmt/docs/installation.html#native-image
l

loud-stone-83419

04/19/2021, 7:26 PM
Right now people have 2 confs - either they use pants scalafmt 1.30.x
or intellij directly
in both scenario we have not been installing scalafmt directly
I agree - the native build seems to be best
h

hundreds-father-404

04/19/2021, 7:30 PM
Cool. Next question, what versions do you think we need to support? If we say it must be 2.7.0+ (Sept 2020), the installation of native binaries is much easier. Otherwise we have to handle that they changed their installation scheme on https://github.com/scalameta/scalafmt/releases, compare 2.7.0, 2.6.4, and 2.6.3 It'd be great to avoid their bash install script if possible: https://raw.githubusercontent.com/scalameta/scalafmt/master/bin/install-scalafmt-native.sh
@loud-stone-83419 @great-shoe-2826 see https://github.com/pantsbuild/pants/issues/11943 for some thoughts on how to approach this. It's written so that you can do it in distinct steps, hopefully to make this more approachable Lmk if you'd like to pair program on anything, I'd be glad to 🙂 I suspect Part 3 could get confusing, for example
l

loud-stone-83419

04/19/2021, 8:21 PM
We are using 2.7.5
👍 1
I believe that would be enough but I don't have further market data beside what we are using
h

hundreds-father-404

04/19/2021, 8:34 PM
We can always add back support for earlier versions if a user needs it. But start simple
h

happy-kitchen-89482

04/27/2021, 7:05 PM
Hi, just checking in to see how things are going with this?
l

loud-stone-83419

04/28/2021, 12:50 PM
It is a slow start - Will reach out if we need some help
h

happy-kitchen-89482

04/28/2021, 4:35 PM
SG, thanks