Commit Graph

17922 Commits

Author SHA1 Message Date
Eugene Yokota 95f3877bae Add stubs for build/shutdown and build/exit 2020-05-16 09:52:20 +02:00
Eugene Yokota cb93d20492 build server protocol
Initial draft for bsp support.

This shows two communication pattern around BSP.
First, if the request can be handled with the build knowledge is readily available in `NetworkChannel` we can reply immediately. `BuildServerImpl#onBspBuildTargets` is an example for that.

Second, if the request requires `State`, then we can forward the parameter into a custom command, and reply back from a command. `BuildServerProtocol.bspBuildTargetSources` is an example of that since it needs to invoke tasks to generate sources.
2020-05-16 09:52:20 +02:00
Alexandre Archambault ce3ee9d241
Merge pull request #232 from alexarchambault/remove-dependency-artifact-matching
Get rid of flaky dependency / artifact matching, mark updateSbtClassifiers artifacts as optional
2020-05-15 13:56:31 +02:00
Alexandre Archambault ca0d5eaa3c Set dependencyResolution in scalaCompilerBridgeScope too 2020-05-15 12:20:43 +02:00
Alexandre Archambault 907d26865a Set missingOk if sbtClassifiers is true
Seems sbt doesn't do it by default
2020-05-15 12:20:43 +02:00
OlegYch 66711aa796 Add updateSbtClassifiers test 2020-05-15 12:20:43 +02:00
Alexandre Archambault 0ce27bde9e Pass sbtClassifiers around
Mostly for printed messages, and for missingOk in a subsequent commit
2020-05-15 12:20:26 +02:00
Alexandre Archambault aefefb4634 Mark artifacts as optional if missingOk is true 2020-05-15 12:20:26 +02:00
Alexandre Archambault 55a0e79239 Remove some duplicate input prior to resolution 2020-05-15 11:49:07 +02:00
Alexandre Archambault 597a4c014a Get dependency / artifact matching straight from coursier
Rather than matching them after-the-fact in a fragile way.
2020-05-15 11:49:07 +02:00
Alexandre Archambault ecd84e2b83 Fix scala version in Appveyor config 2020-05-15 11:49:07 +02:00
Alexandre Archambault 468001f02f Update sbt launcher 2020-05-15 11:49:07 +02:00
Alexandre Archambault 6d0e824923 Update coursier to 2.0.0-RC6-16 2020-05-15 11:46:31 +02:00
eugene yokota 7e806effa2
Merge pull request #5555 from alexarchambault/bump-lm-coursier
Update coursier to 2.0.0-RC6-4
2020-05-14 13:01:14 -04:00
Alexandre Archambault f850a9c966 Update coursier to 2.0.0-RC6-4
And warn at start-up if ~/.coursier/cache is found.
2020-05-14 15:54:43 +02:00
eugene yokota 56a613fb82
Merge pull request #5554 from adpi2/fix/relay-appender
fix relay appender
2020-05-13 13:03:15 -04:00
Adrien Piquerez ae1df53033 fix relay appender 2020-05-13 14:11:45 +02:00
eugene yokota 4592493617
Merge pull request #5549 from adpi2/issue/json-response
Prevent more than one response per json RPC request
2020-05-12 22:07:11 -04:00
eugene yokota ea608ccd77
Merge pull request #5540 from bjaglin/service-loader
enable ServiceLoader discovery across classloader layers
2020-05-12 22:05:53 -04:00
Adrien Piquerez c221f57812 code review 2020-05-12 19:20:43 +02:00
Adrien Piquerez 42e4c5a7c0 evict some mima errors in sbt.internal 2020-05-12 19:20:43 +02:00
Alexandre Archambault b6fb4da157
Merge pull request #230 from alexarchambault/sbt-lm-coursier
Bump coursier plugin
2020-05-12 19:01:35 +02:00
Adrien Piquerez 8df754eeb1 rename publish to either respond or notify 2020-05-12 16:26:33 +02:00
Alexandre Archambault ee8a818160 Remove sbt-lm-coursier
It's actually not needed, and can be an issue if users use a vanilla sbt
launcher, pulling an old lm-coursier library.
2020-05-12 16:13:32 +02:00
Alexandre Archambault 94edfb1530 Use sbt-lm-coursier rather than sbt-coursier 2020-05-12 14:50:01 +02:00
Alexandre Archambault 90c80c1959 Update sbt-coursier to 2.0.0-RC6-4 2020-05-12 14:49:14 +02:00
Adrien Piquerez 255a0a6ea6 send response to the source channel only 2020-05-12 14:44:10 +02:00
Alexandre Archambault d38e523663
Merge pull request #228 from alexarchambault/remove-sbt-shading
Remove sbt-shading sources
2020-05-12 10:50:24 +02:00
Adrien Piquerez df293fbfd5 prevent multiple response to a single request 2020-05-12 10:38:47 +02:00
Adrien Piquerez e040eebd21 "add failing json rpc response tests" 2020-05-12 10:37:48 +02:00
Alexandre Archambault e43be3d52d Update sbt-shading to 2.0.0 2020-05-12 01:00:40 +02:00
Alexandre Archambault 9694d32083 Remove sbt-shading sources
It now lives at https://github.com/coursier/sbt-shading.
2020-05-12 01:00:09 +02:00
Scala Steward bbcce56b4a
Update coursier to 2.0.0-RC6-15 (#225) 2020-05-12 00:54:15 +02:00
Scala Steward dc907dbf0d
Update scalatest to 3.1.2 (#226) 2020-05-12 00:54:07 +02:00
Adrien Piquerez 781584d137 id is mandatory in json rpc responses 2020-05-11 16:51:34 +02:00
eugene yokota e84e414328
Merge pull request #5546 from eed3si9n/wip/bumpio
IO 1.4.0-M6
2020-05-09 17:08:28 -04:00
Eugene Yokota e8ad695623 IO 1.4.0-M6 2020-05-09 15:53:33 -04:00
eugene yokota 9eedbce815
Merge pull request #5545 from eed3si9n/fport/duplicated-strings
[fport] Avoid tens of thousands of duplicated "TypeFuntions.const(())" strings
2020-05-09 15:04:46 -04:00
Jason Zaugg 43cc55a24c Avoid tens of thousands of duplicated "TypeFuntions.const(())" strings 2020-05-09 13:02:16 -04:00
Brice Jaglin 331ca6ec9b enable ServiceLoader discovery across classloader layers
java.util.ServiceLoader uses findResources(), which was not
overriden in ReverseLookupClassLoader, causing resources available
in the descendant classloader not to be discovered when a service
loader instance was using the top classloader.
2020-05-08 12:41:44 +02:00
eugene yokota f5eae27c69
Merge pull request #5531 from eatkins/optimize-task-progress
Optimize task progress performance
2020-05-06 23:07:39 -04:00
eugene yokota d2fa0f100e
Merge pull request #5533 from eatkins/ivy-xml
Make IvyXml.writeFiles private[sbt]
2020-05-06 11:46:29 -04:00
eugene yokota f6e64b0a14
Merge pull request #5530 from eatkins/build-sources
Rework build source monitoring
2020-05-06 11:31:56 -04:00
Ethan Atkins e3e53df797 Make IvyXml.writeFiles private[sbt]
I got confused an changed the access for the wrong method to support
https://github.com/sbt/sbt/pull/5364.

Partially reverts 5c55393f1b.
2020-05-06 07:43:22 -07:00
Ethan Atkins 9b2bbdd4cc Report progress on background thread
Having the progress reports directly generated in beforeWork delays the
task from being submitted to the executor. This commit moves all of the
reporting onto the background thread to avoid these delays since
progress is less important than task evaluation.
2020-05-05 21:28:08 -07:00
Ethan Atkins f4c11a63ab Re-implement meta build source checking
The old implementation of checkBuildSources can easily take 20ms to run
when called in MainLoop.processCommand. It is rarely faster than 4-5ms.
To reduce this overhead, I stopped using the checkBuildSources task in
processCommand. Instead, I manually cache the build source hashes in a
global state variable and add a file monitor that invalidate the entire
set of source hashes if any changes are detected. This could probably be
more efficient, but I figure that build sources change infrequently
enough that it's fine to just invalidate the entire list of source
hashes.

Because the CheckBuildSources instance is already watching the meta
build, I reworked Continuous to use that FileTreeRepository for the
build sources if it is available.

Bonus: fixes https://github.com/sbt/sbt/issues/5482
2020-05-05 21:26:04 -07:00
Ethan Atkins b829ac9796 Remove FileManagement
This was unused.
2020-05-05 21:25:56 -07:00
Ethan Atkins 0a06bfe2d5 Optimize TaskProgress.containsSkipTasks
I was surprised to find this method in a flamegraph* so I optimized it.
TaskProgress was actually on the hotpath of task evaluation so every
single task was slower to be enqueued with the CompletionService. After
this change, containsSkipTasks dropped out of the flamegraph.

*The flamegraph was for a compile loop where sbt constantly modified a
single source file and re-compiled it. The containsSkipTasks method
appeared in over 2% of the method calls.
2020-05-05 21:04:09 -07:00
eugene yokota 77cc7285ae
Merge pull request #5517 from eed3si9n/wip/js_workaround
Revert "Mark scala-js-macro pending"
2020-05-05 22:26:32 -04:00
Eugene Yokota de098b94d2 IO 1.4.0-M4 2020-05-05 21:47:48 -04:00