Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Add deps as submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jun 23, 2017
1 parent 760e0c9 commit 02b01dd
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 53 deletions.
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[submodule "rls-vfs"]
path = vfs
url = [email protected]:nrc/rls-vfs.git
[submodule "vscode"]
path = vscode
url = [email protected]:rust-lang-nursery/rls-vscode.git
[submodule "span"]
path = span
url = [email protected]:nrc/rls-span.git
[submodule "data"]
path = data
url = [email protected]:nrc/rls-data.git
[submodule "analysis"]
path = analysis
url = [email protected]:nrc/rls-analysis.git
[submodule "languageserver-types"]
path = languageserver-types
url = [email protected]:gluon-lang/languageserver-types.git
64 changes: 34 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
[workspace]
members = [
"rls",
"vfs",
"analysis",
"data",
"span",
"languageserver-types",
]

[replace]
"rls-data:0.7.0" = { path = "data" }
"rls-span:0.4.0" = { path = "span" }
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ better experience for larger and larger crates.

The RLS is designed to be frontend-independent. We hope it will be widely
adopted by different editors and IDEs. To seed development, we provide a
[reference implementation of an RLS frontend](https://github.com/jonathandturner/rls_vscode)
for [Visual Studio Code](https://code.visualstudio.com/).
[reference implementation of an RLS frontend](https://github.com/rust-lang-nursery/rls-vscode)
(and included in this repo as a submodule) for [Visual Studio Code](https://code.visualstudio.com/).


## Setup
Expand Down Expand Up @@ -75,13 +75,12 @@ Next, you'll need to run the VSCode extension (for this step, you'll need a
recent [node](https://nodejs.org/en/) installed:

```
git clone https://github.com/rust-lang-nursery/rls_vscode
cd rls_vscode
cd vscode
npm install
code .
```

VSCode will open into the `rls_vscode` project. From here, click the Debug
VSCode will open into the `vscode` project. From here, click the Debug
button on the left-hand side (a bug with a line through it). Next, click the
green triangle at the top. This will launch a new instance of VSCode with the
`rls_vscode` plugin enabled. VSCode setting `"window.openFoldersInNewWindow"`
Expand Down
1 change: 1 addition & 0 deletions analysis
Submodule analysis added at da75ba
30 changes: 17 additions & 13 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ please get in touch by filing an issue or on IRC.

## Building

Note, you also don't need to build the `rls` to use it. Instead, you can install
Note, you don't need to build the `rls` to use it. Instead, you can install
via `rustup`, which is the currently preferred method. See the
[readme](README.md) for more information.

Expand All @@ -43,6 +43,10 @@ cd rls
cargo build --release
```

After cloning or updating, if you have missing or out of date crates, you might
need to update the submodules, try `git submodule update --init`.


### Step 3: Connect the RLS to your compiler

If you're using recent versions of rustup, you will also need to make sure that
Expand Down Expand Up @@ -108,7 +112,7 @@ cargo run
Though more commonly, you'll use an IDE plugin to invoke it for you
(see [README.md](README.md) for details).

We recommend using https://github.com/jonathandturner/rls_vscode in VSCode. If
We recommend using https://github.com/rust-lang-nursery/rls-vscode in VSCode. If
you are debugging you should set `HIDE_WINDOW_OUTPUT` to `false`, this will send
logging and other messages to the extensions panel in VSCode. Anything the RLS
writes to stderr is redirected to VSCode. Do not write to stdout, that will
Expand Down Expand Up @@ -243,8 +247,8 @@ The RLS tracks changes to files, and keeps the changed file in memory (i.e., the
RLS does not need the IDE to save a file before providing data). These changed
files are tracked by the 'Virtual File System' (which is a bit of a grandiose
name for a pretty simple file cache at the moment, but I expect this area to
grow significantly in the future). The VFS is in a [separate
crate](https://github.com/nrc/rls-vfs).
grow significantly in the future). The VFS is in a its own crate in the `vfs`
directory.

We want to start building before the user needs information (it would be too
slow to start a build when data is requested). However, we don't want to start a
Expand Down Expand Up @@ -275,7 +279,7 @@ reference and store this data in HashMaps and use it to look up data for the
IDE.

Reading, processing, and storing the analysis data is handled by the
[rls-analysis crate](https://github.com/nrc/rls-analysis).
rls-analysis crate (in the `analysis` directory).

### Communicating with IDEs

Expand All @@ -296,12 +300,12 @@ the RLS.

### Extensions to the Language Server Protocol

The RLS uses some custom extensions to the Language Server Protocol. Currently
these are all sent from the RLS to an LSP client and are only used to improve
the user experience by showing progress indicators.
The RLS uses some custom extensions to the Language Server Protocol.

* `rustDocument/diagnosticsBegin`: notification, no arguments. Sent before a
build starts and before any diagnostics from a build are sent.
* `rustDocument/diagnosticsEnd`: notification, no arguments. Sent when a build
is complete (successfully or not, or even skipped) and all post-build analysis
by the RLS is complete.
* `rustDocument/diagnosticsBegin`: notification, no arguments. Sent from the RLS
to a client before a build starts and before any diagnostics from a build are sent.
* `rustDocument/diagnosticsEnd`: notification, no arguments. Sent from the RLS
to a client when a build is complete (successfully or not, or even skipped)
and all post-build analysis by the RLS is complete.
* `rustWorkspace/deglob`: message sent from the client to the RLS to initiate a
deglob refactoring.
1 change: 1 addition & 0 deletions data
Submodule data added at b6159d
1 change: 1 addition & 0 deletions languageserver-types
Submodule languageserver-types added at 1c2a20
10 changes: 5 additions & 5 deletions rls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ build = "build.rs"
cargo = { git = "https://github.com/rust-lang/cargo" }
derive-new = "0.3"
env_logger = "0.4"
languageserver-types = "0.11.0"
languageserver-types = { path = "../languageserver-types" }
log = "0.3"
racer = "2.0.6"
rls-analysis = "0.4.1"
rls-data = "= 0.7"
rls-span = { version = "0.4", features = ["serialize-serde"] }
rls-vfs = { version = "0.4", features = ["racer-impls"] }
rls-analysis = { path = "../analysis" }
rls-data = { path = "../data" }
rls-span = { path = "../span" , features = ["serialize-serde"] }
rls-vfs = { path = "../vfs", features = ["racer-impls"] }
rustfmt-nightly = "0.1"
serde = "1.0"
serde_json = "1.0"
Expand Down
1 change: 1 addition & 0 deletions span
Submodule span added at af9343
1 change: 1 addition & 0 deletions vfs
Submodule vfs added at 0e6f75
1 change: 1 addition & 0 deletions vscode
Submodule vscode added at 90a01c

0 comments on commit 02b01dd

Please sign in to comment.