From e5f78187a13299a4e7bfba895ccea4d9b2dd5265 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 7 Apr 2022 13:59:50 -0500 Subject: [PATCH] chore: bring back 4.14 suport ps-id: D3D5054F-3AB6-4E4F-8858-464F8EE4B6DE --- .github/workflows/build-and-test.yml | 2 +- Makefile | 2 +- README.md | 2 +- dune-project | 2 +- jsonrpc-fiber/test/jsonrpc_fiber_tests.ml | 2 +- nix/default.nix | 2 +- nix/opam-selection.nix | 18 +++++++++--------- ocaml-lsp-server.opam | 2 +- .../__tests__/completionItem-resolve.test.ts | 8 +++----- .../e2e/__tests__/textDocument-diagnostics.ts | 3 ++- ocaml-lsp-server/vendor/merlin | 2 +- 11 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9610eec8b..912e216bc 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -19,7 +19,7 @@ jobs: - ubuntu-latest - windows-latest ocaml-compiler: - - 4.13.x + - 4.14.x runs-on: ${{ matrix.os }} diff --git a/Makefile b/Makefile index 5145b599f..fbabdd7fe 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ install-test-deps: .PHONY: dev dev: ## Setup a development environment - opam switch create --no-install . ocaml-base-compiler.4.13.1 + opam switch create --no-install . ocaml-base-compiler.4.14.0 opam install -y dune-release merlin ocamlformat utop ocaml-lsp-server opam install --locked --deps-only --with-doc -y . $(MAKE) install-test-deps diff --git a/README.md b/README.md index 3d1eacc07..16ccf62f8 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ git clone --recursive git@github.com:ocaml/ocaml-lsp.git git submodule update --init --recursive # create local switch (or use global one) -opam switch create . ocaml-base-compiler.4.13.0 +opam switch create . ocaml-base-compiler.4.14.0 # don't forget to set your environment to use the local switch eval $(opam env) diff --git a/dune-project b/dune-project index c37c898de..648b56088 100644 --- a/dune-project +++ b/dune-project @@ -63,7 +63,7 @@ possible and does not make any assumptions about IO. (csexp (>= 1.5)) (ocamlformat-rpc-lib (>= 0.21.0)) (odoc :with-doc) - (ocaml (and (>= 4.13) (< 4.14))))) + (ocaml (and (>= 4.14) (< 4.15))))) (package (name jsonrpc) diff --git a/jsonrpc-fiber/test/jsonrpc_fiber_tests.ml b/jsonrpc-fiber/test/jsonrpc_fiber_tests.ml index 6626fb63b..0175b2241 100644 --- a/jsonrpc-fiber/test/jsonrpc_fiber_tests.ml +++ b/jsonrpc-fiber/test/jsonrpc_fiber_tests.ml @@ -266,7 +266,7 @@ let%expect_test "test from jsonrpc_test.ml" = Uncaught error when handling notification: { "method": "raise", "jsonrpc": "2.0" } Error: - [ { exn = "(Failure \"special failure\")"; backtrace = "" } ] + [ { exn = "Failure(\"special failure\")"; backtrace = "" } ] { "id": 10, "jsonrpc": "2.0", "result": 1 } { "id": "testing", "jsonrpc": "2.0", "result": 2 } |}] diff --git a/nix/default.nix b/nix/default.nix index 43ccdb642..f04f62dcf 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -13,7 +13,7 @@ let [ "nix" "shell.nix" "default.nix" ]; in pkgs.nix-gitignore.gitignoreSourcePure ignores ../.; args = { - inherit (pkgs.ocaml-ng.ocamlPackages_4_13) ocaml; + inherit (pkgs.ocaml-ng.ocamlPackages_4_14) ocaml; selection = ./opam-selection.nix; src = { ocamlformat-rpc-lib = ocamlformat; diff --git a/nix/opam-selection.nix b/nix/opam-selection.nix index fea420388..8728a8d6e 100644 --- a/nix/opam-selection.nix +++ b/nix/opam-selection.nix @@ -24,7 +24,7 @@ in { format-version = 4; inherit repos; - ocaml-version = "4.13.1"; + ocaml-version = "4.14.0"; selection = { astring = @@ -522,7 +522,7 @@ in ocaml = { pname = "ocaml"; - version = "4.13.1"; + version = "4.14.0"; src = null; opamInputs = { @@ -534,25 +534,25 @@ in }; opamSrc = repoPath (repos.opam-repository.src) { - package = "packages/ocaml/ocaml.4.13.1"; - hash = "sha256:12aajj2hc636jr6wbv4vba8pmjdndbcvnw7q35gj4agxmrjspziw"; + package = "packages/ocaml/ocaml.4.14.0"; + hash = "sha256-uEKCTkEWM1EhLO/zOkZtLP45aWRcN8Z/LFffwK8zkdw="; }; }; ocaml-base-compiler = { pname = "ocaml-base-compiler"; - version = "4.13.1"; + version = "4.14.1"; src = pkgs.fetchurl { - url = "https://github.com/ocaml/ocaml/archive/4.13.1.tar.gz"; - sha256 = "1i7ad8lh5l74wb3yzmhlv529wc75a5sjybzkad7wdl8zrj47jk0r"; + url = "https://github.com/ocaml/ocaml/archive/4.14.0.tar.gz"; + sha256 = "sha256-uEKCTkEWM1EhLO/zOkZtLP45aWRcN8Z/LFffwK8zkdw="; }; opamInputs = { }; opamSrc = repoPath (repos.opam-repository.src) { - package = "packages/ocaml-base-compiler/ocaml-base-compiler.4.13.1"; - hash = "sha256:069i5vsndd9lsvdm5wk898nfnc85ww7459nibjg6881ww43w8ck1"; + package = "packages/ocaml-base-compiler/ocaml-base-compiler.4.14.0"; + hash = "sha256-uEKCTkEWM1EhLO/zOkZtLP45aWRcN8Z/LFffwK8zkdw="; }; }; ocaml-compiler-libs = diff --git a/ocaml-lsp-server.opam b/ocaml-lsp-server.opam index 895c54886..e20e42bac 100644 --- a/ocaml-lsp-server.opam +++ b/ocaml-lsp-server.opam @@ -38,7 +38,7 @@ depends: [ "csexp" {>= "1.5"} "ocamlformat-rpc-lib" {>= "0.21.0"} "odoc" {with-doc} - "ocaml" {>= "4.13" & < "4.14"} + "ocaml" {>= "4.14" & < "4.15"} ] dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git" build: [ diff --git a/ocaml-lsp-server/test/e2e/__tests__/completionItem-resolve.test.ts b/ocaml-lsp-server/test/e2e/__tests__/completionItem-resolve.test.ts index 5fd461682..4423e5810 100644 --- a/ocaml-lsp-server/test/e2e/__tests__/completionItem-resolve.test.ts +++ b/ocaml-lsp-server/test/e2e/__tests__/completionItem-resolve.test.ts @@ -53,11 +53,10 @@ describe("textDocument/completion", () => { expect(response).toMatchInlineSnapshot(` Object { - "documentation": " [map2 f [a1; ...; an] [b1; ...; bn]] is + "documentation": "[map2 f [a1; ...; an] [b1; ...; bn]] is [[f a1 b1; ...; f an bn]]. @raise Invalid_argument if the two lists are determined - to have different lengths. Not tail-recursive. - ", + to have different lengths. Not tail-recursive.", "label": "map2", } `); @@ -75,8 +74,7 @@ describe("textDocument/completion", () => { expect(response).toMatchInlineSnapshot(` Object { - "documentation": " [find_all] is another name for {!filter}. - ", + "documentation": "[find_all] is another name for {!filter}.", "label": "find_all", } `); diff --git a/ocaml-lsp-server/test/e2e/__tests__/textDocument-diagnostics.ts b/ocaml-lsp-server/test/e2e/__tests__/textDocument-diagnostics.ts index 4c99b0e13..a87bd909b 100644 --- a/ocaml-lsp-server/test/e2e/__tests__/textDocument-diagnostics.ts +++ b/ocaml-lsp-server/test/e2e/__tests__/textDocument-diagnostics.ts @@ -180,7 +180,8 @@ describe("textDocument/diagnostics", () => { sig val x : int end is not included in sig val x : unit end - Values do not match: val x : int is not included in val x : unit", + Values do not match: val x : int is not included in val x : unit + The type int is not compatible with the type unit", "range": Object { "end": Object { "character": 3, diff --git a/ocaml-lsp-server/vendor/merlin b/ocaml-lsp-server/vendor/merlin index 249c0b191..c060be2ec 160000 --- a/ocaml-lsp-server/vendor/merlin +++ b/ocaml-lsp-server/vendor/merlin @@ -1 +1 @@ -Subproject commit 249c0b191dfccbbae23eb9a1be8c266aa58350f3 +Subproject commit c060be2ec721fa4be04cea9f5051a5807da489de