New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass JVM options to scalafmt #4774

Merged
merged 4 commits into from Jul 31, 2017

Conversation

Projects
None yet
2 participants
@stuhood
Copy link
Member

stuhood commented Jul 28, 2017

Problem

JVM options were not being passed to scalafmt, so it wasn't possible to increase/decrease allocated memory. Additionally, in cases where large sets of files were in use, we could run into argument-list-too-long errors.

Solution

Pass JVM options, and use Xargs. Finally, enable caching for the Check task, which is sideeffect free.

Result

scalafmt will run for bite-size chunks, and will cache when checking files.

@kwlzn

kwlzn approved these changes Jul 28, 2017

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Jul 28, 2017

It looks like there are a few other fixes to be made here related to argument list lengths on huge targets when nailgun is disabled. Won't land this quite yet... or might merge it in with #4635

@stuhood stuhood requested a review from jsirois Jul 31, 2017

@stuhood stuhood added this to the 1.3.1 milestone Jul 31, 2017

@stuhood stuhood merged commit b6cf3e5 into pantsbuild:master Jul 31, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/pass-jvm-options-to-scalafmt branch Jul 31, 2017

stuhood added a commit that referenced this pull request Jul 31, 2017

Partition and pass JVM options to scalafmt (#4774)
### Problem

JVM options were not being passed to scalafmt, so it wasn't possible to increase/decrease allocated memory. Additionally, in cases where large sets of files were in use, we could run into argument-list-too-long errors.

### Solution

Pass JVM options, and use `Xargs`. Finally, enable caching for the `Check` task, which is sideeffect free.

### Result

scalafmt will run for bite-size chunks, and will cache when checking files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment