Commit Graph

19 Commits

Author SHA1 Message Date
Igal Tabachnik a920693c96 Checking for target .class files present and absent before and after cleanCache 2021-08-27 17:46:41 +03:00
Igal Tabachnik c55880d795 Implementing `buildTarget/cleanCache` to support Rebuild operations from IntelliJ 2021-08-27 17:46:41 +03:00
Adrien Piquerez 120ccccaab Make BSP requests robust to some target failures
The request of the form buildTarget/* often take a sequence of build
targets as parameter. So far if there is an error on a single build
target, the entire request fails.
This is not the best because the client wants the result of the other
build targets anyway:
For example:
- workspace/buildTargets: if one build target has an invalid Scala
version we still want to import the other ones
- buildTarget/scalacOptions: if a dependency cannot be resolved we still
want to import the build targets that do not depend on it
- buildTarget/scalaMainClasses: if buildTarget does not compile we still
want the main classes of the other targets
...

The change is to respond to BSP requests with the successful
build targets and  to ignore the failed ones.
This is implemented the same in Bloop since before BSP in sbt.

In  https://github.com/build-server-protocol/build-server-protocol/issues/204,
I made a proposal to also add the failed build targets in the response.
2021-07-30 14:41:00 +02:00
Adrien Piquerez b4c6299b9c [BSP] Add test on failing workspace/reload 2021-07-08 09:25:01 +02:00
Jason Zaugg fe046476b1 Refine and test SBT BSP target
- Pass source dirs and current list of files
  - Align display name and URI
2021-06-30 11:19:24 +10:00
Adrien Piquerez ef7d8b68f6 [BSP] add server test on custom failure when compiling 2021-06-25 10:41:10 +02:00
Samuel CLARENC f3ec202a06 Add resourcesProvider flag to BuildServerCapabilities in BSP contra 2021-06-21 16:51:34 +02:00
Samuel CLARENC a0e3d89855 Implement BSP buildTarget/resources command 2021-06-21 16:51:34 +02:00
Adrien Piquerez 93afa7e892 Improve BSP processing logs
The processing log is sent when a command issued by a request is being
processed, if the request has not yet been responded. In particular,
the processing log of sbtReportResult is filtered out if the client has
already received a response.

The processing log severity is the lowest so that it can be ignored by
the BSP client.
2021-03-09 10:18:12 +01:00
Adrien Piquerez 66f4032699 Fix BuildServerReporter and add tests 2020-10-26 09:04:14 +01:00
Adrien Piquerez f5753f763c Add BSP buildTarget/test endpoint 2020-09-21 12:17:20 +02:00
Adrien Piquerez 50cf74cc67 Add BSP `buildTarget/scalaTestClasses` endpoint 2020-09-21 12:17:20 +02:00
Adrien Piquerez cfaede2bf6 Increase buildTarget/scalaMainClasses test timeout 2020-09-21 09:18:07 +02:00
Adrien Piquerez 759392aaf0 Add BSP `buildTarget/run` test 2020-09-17 14:23:07 +02:00
Adrien Piquerez 92fb69f370 Add BSP buildTarget/scalaMainClasses endpoint 2020-09-17 13:32:30 +02:00
Adrien Piquerez ac85117841 Add BSP workspace/reload 2020-09-14 13:10:11 +02:00
Adrien Piquerez f89cef1fd0 add bspCompile task 2020-05-16 09:52:20 +02:00
Eugene Yokota d2d0a9ca80 buildTarget/scalacOptions 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