Enable parallel execution of scripted in the plugin#3657
Closed
Enable parallel execution of scripted in the plugin#3657
Conversation
Uses Scala 2.12.4 for the build definition. This includes fix for runtime reflection of empty package members under Java 9. Fixes sbt#3587
Bump to Scala 2.12.4
24c183f to
3229eae
Compare
The change to enable batched and parallel execution for scripted was done only for the scripted-sbt project. This pull request enables it for scripted-plugin, so that all sbt plugins in 1.x. can benefit from it. By default, it configures a number of parallel instances of 1 and batch execution is disabled. Users can change the number of parallel sbt hosts running scripted tests via the `scriptedParallelInstances` setting. In some plugins scripted tests', batch execution can cause issues because the first time `>` commands are executed they assume sbt starts up. This error can be fixed by doing `reload` before running the `>` command. Note that the current scripted plugin does not allow parallel execution in non-batched mode.
3229eae to
f644936
Compare
Member
Author
|
To be sure this does not cause any problem in the future, I have tested that scripted runs correctly with both batch execution enabled and disabled in |
Member
Author
|
@eed3si9n Can you please review this? |
eed3si9n
requested changes
Oct 25, 2017
Member
eed3si9n
left a comment
There was a problem hiding this comment.
Overall LGTM, but I think this should target 1.x branch since it's a feature addition.
dwijnand
reviewed
Oct 25, 2017
| private[this] val bCls = classOf[Boolean] | ||
| private[this] val asCls = classOf[Array[String]] | ||
| private[this] val lfCls = classOf[java.util.List[File]] | ||
| private[this] val iCls = classOf[Integer] |
Member
There was a problem hiding this comment.
Any particular reason these aren't defined inside scriptedRunTask?
IIUC there's no computation done for these; they're just class literals.
dwijnand
reviewed
Oct 25, 2017
| bootProps: File, | ||
| launchOpts: Array[String], | ||
| prescripted: java.util.List[File], | ||
| instances: Integer |
dwijnand
approved these changes
Oct 25, 2017
Member
dwijnand
left a comment
There was a problem hiding this comment.
LGTM. Just a couple of minor questions.
Member
|
Rebased in #3891. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable parallel execution of scripted in the plugin
The change to enable batched and parallel execution for scripted was done
only for the scripted-sbt project. This pull request enables it for
scripted-plugin, so that all sbt plugins in 1.x. can benefit from it.
By default, it configures a number of parallel instances of 1 and batch
execution is disabled. Users can change the number of parallel sbt hosts
running scripted tests via the
scriptedParallelInstancessetting.In some plugins scripted tests', batch execution can cause issues because
the first time
>commands are executed they assume sbt starts up. Thiserror can be fixed by doing
reloadbefore running the>command.Note that the current scripted plugin does not allow parallel execution
in non-batched mode.