Commit Graph

1873 Commits

Author SHA1 Message Date
Eugene Yokota e4dd090d0c Add debug log on unhandled notification 2017-11-29 00:51:16 -05:00
Alexey Alekhin c689821383 Added deserialization for NotificationMessage and used it in handleBody 2017-11-29 00:46:18 -05:00
Alexey Alekhin 36e079d12b Added onNotification handler for the LSP CommandChannel 2017-11-29 00:46:18 -05:00
wpopielarski 452e97e41d Adds backticks to class/trait/object name.
Adapts tests to changed specs2 dependency.

Tiny fixes.

Removes Scala IDE compiler clues.
2017-11-28 13:27:15 -05:00
wpopielarski 73b0034cfc textDocument/definition for LSP / VS Code
This is an implementation of `textDocument/definition` request.
Supports types only, and only in case when type is found in Zinc Analysis. When source(s) are found then editor opens potential source(s).
This simple implementation does not use semantic data.

During the processing of `textDocument/didSave`, we will start collecting the location of Analysis files via `lspCollectAnalyses`.
Later on, when the user asked for `textDocument/definition`, sbt server will invoke a Future call to lspDefinition, which direct reads the files to locate the definition of a class.
2017-11-28 13:27:07 -05:00
Dale Wijnand 297fd5d24b
Merge pull request #3742 from eed3si9n/wip/socket
IPC Unix domain socket / Windows named pipe
2017-11-28 16:04:11 +00:00
Eugene Yokota f785750fc4 IPC Unix domain socket for sbt server
In addition to TCP, this adds sbt server support for IPC (interprocess communication) using Unix domain socket and Windows named pipe.

The use of Unix domain socket has performance and security benefits.
2017-11-27 21:37:31 -05:00
eugene yokota e6165464ba
Merge pull request #3740 from laughedelic/wip/logmessage
LSP: improve logMessage notifications
2017-11-27 20:51:50 -05:00
xuwei-k 6b4093dc15 update specs2 4.0.1 2017-11-26 13:59:50 +09:00
xuwei-k 8ee413778a fix #3591. "Not a valid key: console-quick" 2017-11-23 14:56:52 +09:00
Alexey Alekhin 0c0e0ce912 Log StringEvents and MessageEvents to the LSP client 2017-11-14 21:53:29 +01:00
Alexey Alekhin 6b6047b55c Publish ExecStatusEvent taking into account its channel name 2017-11-14 21:53:15 +01:00
Dale Wijnand bb6d8d62ec
Merge pull request #3672 from RomanIakovlev/1.x
Add new setting to determine if running in CI env
2017-10-28 00:28:44 +01:00
Roman Iakovlev 69ae4f3073 Add a check for a change in SBT version before reload
Fixes #1055
2017-10-27 20:38:23 +02:00
Roman Iakovlev 5f143434a8 Add new setting to determine if running in CI env
Fixes #3653
2017-10-26 20:59:04 +02:00
Dale Wijnand 9f1d60be60
Rewrite to polymorphic function syntax 2017-10-25 10:23:46 +01:00
eugene yokota 8eb5879101 Merge pull request #3659 from eed3si9n/wip/reboot
Adds "reboot dev"
2017-10-25 04:06:59 -04:00
Eugene Yokota 6ac4571197 Adds "reboot dev"
This adds a new option `dev` to the `reboot` command, which deletes the only the current sbt artifacts from the boot directory. `reboot dev` reads actively from `build.properties` instead of using the current state since `reboot` can restart into another sbt version.

In general, `reboot dev` is intended for the local development of sbt.

Fixes #3590
2017-10-25 03:19:10 -04:00
Dale Wijnand 81c5eaec33 Merge pull request #3633 from dwijnand/misc-2017-10-12
Misc 2017-10-12
2017-10-24 20:37:20 +01:00
PanAeon 64241e0d3a Fixes #3464. Escape imports from sbt files, so if user creates a backquoted definition then task evalution will not fail. 2017-10-13 11:04:15 +01:00
Dale Wijnand 10397926aa
Make sure of EvaluateTask in Extracted obvious 2017-10-12 15:36:05 +01:00
eugene yokota fa33b6e422 Merge pull request #3632 from dwijnand/trailing-println
Kill trailing println
2017-10-11 13:38:09 -04:00
Dale Wijnand d8e52bb5d4
Kill trailing println 2017-10-11 15:29:15 +01:00
eugene yokota 8c04b267bf Merge branch '1.x' into 1.0.x 2017-10-10 10:57:05 -04:00
Michael Stringer b9a4d32916 Add system property to revert to old polling fs watcher
This adds a sbt.watch.mode system property that if set to 'polling' will
use PollingWatchService instead of WatchServiceAdapter (nio).

On macOS this will default to 'polling' and on all others 'nio'.

This is a temporary workaround for users affected by #3527
2017-10-10 01:17:42 -04:00
Michael Stringer a3c34c6c0a
Add system property to revert to old polling fs watcher
This adds a sbt.watch.mode system property that if set to 'polling' will
use PollingWatchService instead of WatchServiceAdapter (nio).

On macOS this will default to 'polling' and on all others 'nio'.

This is a temporary workaround for users affected by #3527
2017-10-09 18:01:33 +01:00
Eugene Yokota 5c394e18f6 implement window/logMessage
This sends sbt's log message as "window/logMessage" event to LSP.
2017-10-08 01:51:27 -04:00
Dale Wijnand f22843f91c
Move SlashSyntax to the settings component 2017-10-06 09:52:34 +01:00
eugene yokota 201a8031de Merge pull request #3609 from dwijnand/ref
Correct handling of resolving ThisProject
2017-10-05 15:39:24 -04:00
eugene yokota 5a6a651b8f Merge pull request #3604 from dwijnand/dedup-cmds-lists
Dedup DefaultCommands and allBasicCommands
2017-10-05 15:36:37 -04:00
Dale Wijnand f4b2fc4228
Correct handling of resolving ThisProject
In ca71b4b902 I went about fixing the
inexhaustive matching in Scope's resolveProjectBuild and
resolveProjectRef. Looking back the change was wrong.

For resolveProjectBuild the new implementation is less wrong, but still
not great, seeing as it doesn't actually do any build resolving.

For resolveProjectRef the new implementation now blows up instead of
lies. Which means it's less leneant, more "fail-fast".

isProjectThis is unused; remnant of the pre-AutoPlugin days when build
settings where defined in Plugin.settings.
2017-10-05 19:00:48 +01:00
Dale Wijnand 68129e6782
Dedup DefaultCommands and allBasicCommands
The command component's BasicCommands.allBasicCommands is a subset of
main component's BuiltinCommands.DefaultCommands, so I deduplicated.
2017-10-05 09:14:01 +01:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
Dale Wijnand dae4694f46 Merge pull request #3603 from eed3si9n/wip/zerozerozero
Fixes Zero / Zero / Zero / name handling
2017-10-05 08:59:30 +01:00
Eugene Yokota 60f2498c0a Implement toString for keys
toString added for REPL testing:

```
scala> Zero / Zero / Zero / name
res0: sbt.SlashSyntax.ScopeAndKey[sbt.SettingKey[String]] = Zero / Zero / Zero / name
```
2017-10-05 02:46:09 -04:00
Eugene Yokota 53bbb99617 Fixes Zero / Zero / Zero / name handling
Prior to this change `Zero / Zero / Zero / name` broke as folllows:

```
scala> Zero / Zero / Zero / name
Zero / Zero / Zero / name
<console>:18: error: inferred type arguments [sbt.Zero.type] do not conform to method /'s type parameter bounds [K <: sbt.SlashSyntax.Key[K]]
       Zero / Zero / Zero / name
                   ^
```
2017-10-05 02:43:50 -04:00
Dale Wijnand 530c405b2f
Implement Project#withId 2017-10-04 13:54:37 +01:00
Dale Wijnand d997fe8043
Oneline mkGeneratedRoot 2017-10-04 13:42:30 +01:00
Dale Wijnand ccdd77a94f
Remove old, commented out Project.apply 2017-10-04 13:42:29 +01:00
Dale Wijnand 1685dae1d9
Oneline Project.apply 2017-10-04 13:42:29 +01:00
Dale Wijnand ceb0f0228a
Use copy2 in resolveBuild 2017-10-04 13:42:29 +01:00
Dale Wijnand 9e855ffb55
Resolve some TODOs by creating a private copy2 in Project 2017-10-04 13:42:28 +01:00
eugene yokota 7af716f37b Merge pull request #3524 from eed3si9n/wip/language_server
language server protocol (VS Code integration)
2017-10-03 11:56:26 -04:00
Dale Wijnand 5c7461ada8 Merge pull request #3596 from dwijnand/slash
Cleanup and improve the unified slash syntax
2017-10-03 13:37:20 +01:00
Eugene Yokota 1ad9360e3e setting query is "sbt/setting" 2017-10-03 01:45:06 -04:00
Eugene Yokota a8e770c446 handle exec as "sbt/exec" 2017-10-03 00:18:58 -04:00
Eugene Yokota f188e60d8f Update test 2017-10-02 17:12:15 -04:00
Eugene Yokota 4fe0d08ab0 substitute println with logger 2017-10-02 15:42:55 -04:00
Dale Wijnand e7b893fdc5
Cleanup and improve the unified slash syntax 2017-10-02 17:24:37 +01:00
Eugene Yokota 0c1c380f71 begins language server protocol
This is the first cut for the Language Server Protocol on top of server that is still work in progress.

With this change, sbt is able to invoke `compile` task on saving files in VS Code.
2017-10-02 04:01:13 -04:00