-
Notifications
You must be signed in to change notification settings - Fork 615
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
Fork all sbt tasks #1000
Fork all sbt tasks #1000
Conversation
One caveat with this is that this seems to serialize the tests in the forked JVM... That isn't the behavior I intended here. Looking into this. |
b087030
to
5ff347f
Compare
Sbt needs an additional option to re-enable parallel execution in the forked JVM. That option took too long to find. This should provide the same performance as before (documented above) without the metaspace issues that crop up in testing. |
12805f7
to
98107b9
Compare
This causes sbt tasks (run, test, etc.) to fork to a separate JVM to avoid running out of metaspace. This issue crops up for developers or users repeatedly running sbt tasks in the same sbt session. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - sorry to take so long to review this
This causes sbt tasks (run, test, etc.) to fork to a separate JVM to avoid running out of metaspace. This issue crops up for developers or users repeatedly running sbt tasks in the same sbt session. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
…pbundles (#1000) * Attempt to deal with timing vagaries in UniquifySpec.quicklyrenamedeepbundles Switching to Scala 2.12.8 cause this test to start failing on OSX. Try earlier scheme to compare shallow vs deep to reduce brittleness. * Address review concerns; update comment.
This causes all
sbt
test/run tasks (test
,testOnly
, andtestQuick
,run
,runMain
,Test / run
, andTest / runMain
) to fork to a separate JVM. This avoids a situation where repeatedly running tasks exhausts the JVM's metaspace. This doesn't necessarily appear to be our problem (I think it's in sbt/scalaTest), but this buys us some time to figure it out.This happens for developers repeatedly running tasks (e.g.,
test
orrun
) in the same sbt session. Tasks that are run in a-DminimalResources
environment (e.g., CircleCI) will not fork and will continue to run serially.More information:
The performance impact of this should only be the fork overhead. I spot checked this on a 6-core machine:
Baseline
Test / fork := true
Test / fork := true; Test / testForkedParallel := true
Related issue: chipsalliance/firrtl#978
Type of change: bug report
Impact: no functional change
Development Phase: implementation
Release Notes
(No release notes as this is a testing-only change and we don't publish tests.)