diff --git a/analysis.opam b/analysis.opam index 982612de8c..7ca6d748a6 100644 --- a/analysis.opam +++ b/analysis.opam @@ -10,8 +10,8 @@ depends: [ "dune" {>= "3.17"} "ocaml" {>= "5.0.0"} "odoc" {with-doc} - "lsp" {= "1.27.0"} - "jsonrpc" {= "1.27.0"} + "lsp" {= "1.28.1"} + "jsonrpc" {= "1.28.1"} "uutf" {= "1.0.4"} "ppx_yojson_conv_lib" {>= "v0.16.0" & <= "v0.17.0"} "yojson" {= "3.0.0"} diff --git a/analysis/src/cli.ml b/analysis/src/cli.ml index bbf599215f..d9fe90a0c1 100644 --- a/analysis/src/cli.ml +++ b/analysis/src/cli.ml @@ -389,6 +389,8 @@ let test ~state ~path = (edit : [ `AnnotatedTextEdit of Lsp.Types.AnnotatedTextEdit.t + | `SnippetTextEdit of + Lsp.Types.SnippetTextEdit.t | `TextEdit of Lsp.Types.TextEdit.t ]) -> let start_char, new_text, range = @@ -401,6 +403,10 @@ let test ~state ~path = ( te.range.start.character, te.newText, te.range ) + | `SnippetTextEdit te -> + ( te.range.start.character, + te.snippet.value, + te.range ) in let indent = String.make start_char ' ' in Printf.printf diff --git a/dune-project b/dune-project index 2930333848..bb6aadb6fb 100644 --- a/dune-project +++ b/dune-project @@ -77,10 +77,10 @@ (>= 5.0.0)) (odoc :with-doc) (lsp - (= 1.27.0)) + (= 1.28.1)) ; Linked into the binaries through lsp. (jsonrpc - (= 1.27.0)) + (= 1.28.1)) (uutf (= 1.0.4)) ; v0.17.0 needs OCaml 5.1; the OCaml 5.0 CI job gets v0.16.0. diff --git a/packages/@rescript/darwin-arm64/THIRD_PARTY_LICENSES b/packages/@rescript/darwin-arm64/THIRD_PARTY_LICENSES index 4757d25cd6..8da216572d 100644 --- a/packages/@rescript/darwin-arm64/THIRD_PARTY_LICENSES +++ b/packages/@rescript/darwin-arm64/THIRD_PARTY_LICENSES @@ -961,7 +961,7 @@ POSSIBILITY OF SUCH DAMAGE. LSP === -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: rescript-editor-analysis and rescript-tools @@ -987,7 +987,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. JSONRPC ======= -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: runtime dependency of LSP diff --git a/packages/@rescript/linux-arm64/THIRD_PARTY_LICENSES b/packages/@rescript/linux-arm64/THIRD_PARTY_LICENSES index 2bb8c220a4..b0adace61a 100644 --- a/packages/@rescript/linux-arm64/THIRD_PARTY_LICENSES +++ b/packages/@rescript/linux-arm64/THIRD_PARTY_LICENSES @@ -961,7 +961,7 @@ POSSIBILITY OF SUCH DAMAGE. LSP === -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: rescript-editor-analysis and rescript-tools @@ -987,7 +987,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. JSONRPC ======= -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: runtime dependency of LSP diff --git a/packages/@rescript/linux-x64/THIRD_PARTY_LICENSES b/packages/@rescript/linux-x64/THIRD_PARTY_LICENSES index ed7de966b0..08b0c9a3e2 100644 --- a/packages/@rescript/linux-x64/THIRD_PARTY_LICENSES +++ b/packages/@rescript/linux-x64/THIRD_PARTY_LICENSES @@ -961,7 +961,7 @@ POSSIBILITY OF SUCH DAMAGE. LSP === -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: rescript-editor-analysis and rescript-tools @@ -987,7 +987,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. JSONRPC ======= -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: runtime dependency of LSP diff --git a/packages/@rescript/win32-x64/THIRD_PARTY_LICENSES b/packages/@rescript/win32-x64/THIRD_PARTY_LICENSES index e40eafabba..7856590146 100644 --- a/packages/@rescript/win32-x64/THIRD_PARTY_LICENSES +++ b/packages/@rescript/win32-x64/THIRD_PARTY_LICENSES @@ -961,7 +961,7 @@ POSSIBILITY OF SUCH DAMAGE. LSP === -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: rescript-editor-analysis and rescript-tools @@ -987,7 +987,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. JSONRPC ======= -Version: 1.27.0 +Version: 1.28.1 Source: https://github.com/ocaml/ocaml-lsp License: ISC Included in: runtime dependency of LSP diff --git a/scripts/generateThirdPartyLicenses.js b/scripts/generateThirdPartyLicenses.js index ef5b77909d..4ef6769094 100644 --- a/scripts/generateThirdPartyLicenses.js +++ b/scripts/generateThirdPartyLicenses.js @@ -27,12 +27,14 @@ const platforms = [ { packageName: "win32-x64", family: "win32" }, ]; -// The dune executables in the platform packages, by source directory. +// The dune executables in the platform packages, by source directory, with +// the names `dune describe workspace` may give them: the private name, or +// from dune 3.25 on, the public name when there is one. const shippedExecutables = new Map([ - ["compiler/bsc", "rescript_compiler_main"], - ["rewatch-ocaml", "rescript_ocaml"], - ["analysis/bin", "main"], - ["tools/bin", "main"], + ["compiler/bsc", ["rescript_compiler_main", "bsc"]], + ["rewatch-ocaml", ["rescript_ocaml"]], + ["analysis/bin", ["main", "rescript-editor-analysis"]], + ["tools/bin", ["main", "rescript-tools"]], ]); /** @@ -146,8 +148,8 @@ function linkedOpamPackages() { const sourceDir = path.posix.dirname( path.posix.relative("_build/default", impl ?? ""), ); - const name = shippedExecutables.get(sourceDir); - if (name !== undefined && atoms(field(fields, "names")).includes(name)) { + const names = shippedExecutables.get(sourceDir) ?? []; + if (atoms(field(fields, "names")).some(name => names.includes(name))) { roots.push(fields); } }