diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml index f6ec3c14..0ae6ef47 100644 --- a/bindings/rust/Cargo.toml +++ b/bindings/rust/Cargo.toml @@ -16,7 +16,7 @@ rust-version = "1.60.0" [dependencies] # Keep in sync with dev/proto-generate.sh -protobuf = "=3.1.0" +protobuf = "=3.2.0" [dev-dependencies] pretty_assertions = "1.2.1" diff --git a/bindings/rust/src/generated/scip.rs b/bindings/rust/src/generated/scip.rs index 182c2ec9..aef4f3a3 100644 --- a/bindings/rust/src/generated/scip.rs +++ b/bindings/rust/src/generated/scip.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit +// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc --rust-out=... // @generated @@ -23,7 +23,7 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; /// Index represents a complete SCIP index for a workspace this is rooted at a /// single directory. An Index message payload can have a large memory footprint diff --git a/dev/proto-generate.sh b/dev/proto-generate.sh index 733d4236..b9195462 100755 --- a/dev/proto-generate.sh +++ b/dev/proto-generate.sh @@ -12,7 +12,7 @@ PROTOC_GEN_RUST_VERSION="$(cat bindings/rust/Cargo.toml | grep 'protobuf =' | se if ! grep -q "$PROTOC_GEN_RUST_VERSION" "./.bin/PROTOC_GEN_RUST_VERSION" \ || ! test -f "./.bin/bin/protoc-gen-rust"; then rm -rf .bin - cargo install --root .bin protobuf-codegen --version 3.1.0 + cargo install --root .bin protobuf-codegen --version 3.2.0 echo "$PROTOC_GEN_RUST_VERSION" > "./.bin/PROTOC_GEN_RUST_VERSION" fi diff --git a/docs/scip.md b/docs/scip.md index ad80af6a..445eda3a 100644 --- a/docs/scip.md +++ b/docs/scip.md @@ -164,13 +164,13 @@ NOTE: This corresponds to a module in Go and JVM languages. ### Relationship -| Name | Type | Description | -| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Name | Type | Description | +| ---------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **symbol** | string | -| **is_reference** | bool | When resolving "Find references", this field documents what other symbols should be included together with this symbol. For example, consider the following TypeScript code that defines two symbols `Animal#sound()` and `Dog#sound()`: `ts interface Animal { ^^^^^^ definition Animal# sound(): string ^^^^^ definition Animal#sound() } class Dog implements Animal { ^^^ definition Dog#, implementation_symbols = Animal# public sound(): string { return "woof" } ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), implementation_symbols = Animal#sound() } const animal: Animal = new Dog() ^^^^^^ reference Animal# console.log(animal.sound()) ^^^^^ reference Animal#sound() ` Doing "Find references" on the symbol `Animal#sound()` should return references to the `Dog#sound()` method as well. Vice-versa, doing "Find references" on the `Dog#sound()` method should include references to the `Animal#sound()` method as well. | -| **is_implementation** | bool | Similar to `references_symbols` but for "Go to implementation". It's common for the `implementation_symbols` and `references_symbols` fields have the same values but that's not always the case. In the TypeScript example above, observe that `implementation_symbols` has the value `"Animal#"` for the "Dog#" symbol while `references_symbols` is empty. When requesting "Find references" on the "Animal#" symbol we don't want to include references to "Dog#" even if "Go to implementation" on the "Animal#" symbol should navigate to the "Dog#" symbol. | -| **is_type_definition** | bool | Similar to `references_symbols` but for "Go to type definition". | -| **is_definition** | bool | Allows overriding the behavior of "Go to definition" and "Find references" for symbols which do not have a definition of their own or could potentially have multiple definitions. | +| **is_reference** | bool | When resolving "Find references", this field documents what other symbols should be included together with this symbol. For example, consider the following TypeScript code that defines two symbols `Animal#sound()` and `Dog#sound()`: `ts interface Animal { ^^^^^^ definition Animal# sound(): string ^^^^^ definition Animal#sound() } class Dog implements Animal { ^^^ definition Dog#, implementation_symbols = Animal# public sound(): string { return "woof" } ^^^^^ definition Dog#sound(), references_symbols = Animal#sound(), implementation_symbols = Animal#sound() } const animal: Animal = new Dog() ^^^^^^ reference Animal# console.log(animal.sound()) ^^^^^ reference Animal#sound() ` Doing "Find references" on the symbol `Animal#sound()` should return references to the `Dog#sound()` method as well. Vice-versa, doing "Find references" on the `Dog#sound()` method should include references to the `Animal#sound()` method as well. | +| **is_implementation** | bool | Similar to `references_symbols` but for "Go to implementation". It's common for the `implementation_symbols` and `references_symbols` fields have the same values but that's not always the case. In the TypeScript example above, observe that `implementation_symbols` has the value `"Animal#"` for the "Dog#" symbol while `references_symbols` is empty. When requesting "Find references" on the "Animal#" symbol we don't want to include references to "Dog#" even if "Go to implementation" on the "Animal#" symbol should navigate to the "Dog#" symbol. | +| **is_type_definition** | bool | Similar to `references_symbols` but for "Go to type definition". | +| **is_definition** | bool | Allows overriding the behavior of "Go to definition" and "Find references" for symbols which do not have a definition of their own or could potentially have multiple definitions. | Additional notes on **is_definition**: