From 3b73a2fa86f42e4a442db9914856e443dae48992 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 14 Sep 2023 17:00:55 -0700 Subject: [PATCH] Update LSP to latest spec --- generator/lsp.json | 6 ++++++ packages/python/lsprotocol/types.py | 5 +++++ packages/python/pyproject.toml | 2 +- packages/python/requirements.txt | 6 +++--- packages/rust/lsprotocol/src/lib.rs | 13 +++++++++---- requirements.txt | 12 ++++++------ 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/generator/lsp.json b/generator/lsp.json index c81aa32..264d88d 100644 --- a/generator/lsp.json +++ b/generator/lsp.json @@ -13470,6 +13470,12 @@ "name": "Log", "value": 4, "documentation": "A log message." + }, + { + "name": "Debug", + "value": 5, + "documentation": "A debug message.\n\n@since 3.18.0", + "since": "3.18.0" } ], "documentation": "The message type" diff --git a/packages/python/lsprotocol/types.py b/packages/python/lsprotocol/types.py index 00328dd..980ca5b 100644 --- a/packages/python/lsprotocol/types.py +++ b/packages/python/lsprotocol/types.py @@ -251,6 +251,11 @@ class MessageType(int, enum.Enum): """An information message.""" Log = 4 """A log message.""" + Debug = 5 + """A debug message. + + @since 3.18.0""" + # Since: 3.18.0 @enum.unique diff --git a/packages/python/pyproject.toml b/packages/python/pyproject.toml index 19e5df9..acee821 100644 --- a/packages/python/pyproject.toml +++ b/packages/python/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi" [project] name = "lsprotocol" description = 'Python implementation of the Language Server Protocol.' -version = "2023.0.0a3" +version = "2023.0.0b1" authors = [ { name = "Microsoft Corporation", email = "lsprotocol-help@microsoft.com" }, ] diff --git a/packages/python/requirements.txt b/packages/python/requirements.txt index 4892dad..1475faa 100644 --- a/packages/python/requirements.txt +++ b/packages/python/requirements.txt @@ -14,9 +14,9 @@ cattrs==23.1.2 \ --hash=sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4 \ --hash=sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657 # via -r ./packages/python/requirements.in -exceptiongroup==1.1.2 \ - --hash=sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5 \ - --hash=sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f +exceptiongroup==1.1.3 \ + --hash=sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9 \ + --hash=sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3 # via cattrs importlib-metadata==6.7.0 \ --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ diff --git a/packages/rust/lsprotocol/src/lib.rs b/packages/rust/lsprotocol/src/lib.rs index 2dfe455..cba915d 100644 --- a/packages/rust/lsprotocol/src/lib.rs +++ b/packages/rust/lsprotocol/src/lib.rs @@ -332,12 +332,12 @@ pub enum LSPNotificationMethods { #[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)] pub enum MessageDirection { - #[serde(rename = "both")] - Both, - #[serde(rename = "clientToServer")] - ClientToServer, #[serde(rename = "serverToClient")] ServerToClient, + #[serde(rename = "clientToServer")] + ClientToServer, + #[serde(rename = "both")] + Both, } /// A set of predefined token types. This set is not fixed @@ -678,6 +678,11 @@ pub enum MessageType { /// A log message. Log = 4, + + /// A debug message. + /// + /// @since 3.18.0 + Debug = 5, } /// Defines how the host (editor) should sync diff --git a/requirements.txt b/requirements.txt index 5750da9..2a988d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,9 +19,9 @@ colorama==0.4.6 \ --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 # via pytest -exceptiongroup==1.1.2 \ - --hash=sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5 \ - --hash=sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f +exceptiongroup==1.1.3 \ + --hash=sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9 \ + --hash=sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3 # via # cattrs # pytest @@ -92,9 +92,9 @@ pyrsistent==0.19.3 \ --hash=sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9 \ --hash=sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c # via jsonschema -pytest==7.4.0 \ - --hash=sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32 \ - --hash=sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a +pytest==7.4.2 \ + --hash=sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002 \ + --hash=sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069 # via -r ./requirements.in tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \