From 8336b83438842958590c79f2b35e0eab79613e9d Mon Sep 17 00:00:00 2001 From: Thibaut Mattio Date: Wed, 26 Oct 2022 19:31:35 +0200 Subject: [PATCH] Change package name to vscode-ocaml --- .github/workflows/main.yml | 8 ++++---- .vscode/launch.json | 4 ++-- Makefile | 8 ++++---- README.md | 20 +++++++++---------- dune-project | 6 +++--- nix/default.nix | 2 +- nix/opam-selection.nix | 8 ++++---- package.json | 18 ++++++++--------- shell.nix | 2 +- src/dune | 2 +- src/extension_commands.ml | 4 ++-- src/extension_commands.mli | 4 ++-- src/extension_consts.ml | 4 ++-- src/extension_instance.ml | 2 +- src/import.ml | 6 +----- src/odig.ml | 2 +- src/output.ml | 2 +- src/treeview_help.ml | 2 +- ...code_ocaml_platform.ml => vscode_ocaml.ml} | 2 +- ...de_ocaml_platform.mli => vscode_ocaml.mli} | 0 ...e-ocaml-platform.opam => vscode-ocaml.opam | 6 +++--- vscode.opam | 6 +++--- 22 files changed, 57 insertions(+), 61 deletions(-) rename src/{vscode_ocaml_platform.ml => vscode_ocaml.ml} (97%) rename src/{vscode_ocaml_platform.mli => vscode_ocaml.mli} (100%) rename vscode-ocaml-platform.opam => vscode-ocaml.opam (83%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aec37ca23..0c27759df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,8 +69,8 @@ jobs: if: runner.os == 'Linux' uses: actions/upload-artifact@v2 with: - name: ocaml-platform-${{ github.sha }} - path: ocaml-platform.vsix + name: vscode-ocaml-${{ github.sha }} + path: vscode-ocaml.vsix - name: Test extension uses: GabrielBB/xvfb-action@v1 @@ -107,8 +107,8 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./ocaml-platform.vsix - asset_name: ocaml-platform.vsix + asset_path: ./vscode-ocaml.vsix + asset_name: vscode-ocaml.vsix asset_content_type: application/zip env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.vscode/launch.json b/.vscode/launch.json index a99638cd0..988a82751 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "request": "launch", "runtimeExecutable": "${execPath}", "outFiles": [ - "${workspaceRoot}/_build/default/src/vscode_ocaml_platform.bc.js" + "${workspaceRoot}/_build/default/src/vscode_ocaml.bc.js" ], "args": [ "--disable-extensions", @@ -24,7 +24,7 @@ "request": "launch", "runtimeExecutable": "${execPath}", "outFiles": [ - "${workspaceRoot}/_build/default/src/vscode_ocaml_platform.bc.js" + "${workspaceRoot}/_build/default/src/vscode_ocaml.bc.js" ], "args": ["--extensionDevelopmentPath=${workspaceFolder}"] } diff --git a/Makefile b/Makefile index e963cc868..8145d9315 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,9 @@ switch: create_switch deps ## Create an opam switch and install development depe .PHONY: build build: ## Build the project - dune build src/vscode_ocaml_platform.bc.js + dune build src/vscode_ocaml.bc.js yarn --cwd astexplorer start - yarn esbuild _build/default/src/vscode_ocaml_platform.bc.js \ + yarn esbuild _build/default/src/vscode_ocaml.bc.js \ --bundle \ --external:vscode \ --outdir=dist \ @@ -32,9 +32,9 @@ build: ## Build the project .PHONY: build-release build-release: - dune build src/vscode_ocaml_platform.bc.js --profile=release + dune build src/vscode_ocaml.bc.js --profile=release yarn --cwd astexplorer build - yarn esbuild _build/default/src/vscode_ocaml_platform.bc.js \ + yarn esbuild _build/default/src/vscode_ocaml.bc.js \ --bundle \ --external:vscode \ --outdir=dist \ diff --git a/README.md b/README.md index cf10ad026..105940b05 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# VSCode OCaml Platform +# VSCode OCaml -[![Main workflow](https://img.shields.io/github/workflow/status/ocamllabs/vscode-ocaml-platform/Main%20workflow?branch=master)](https://github.com/ocamllabs/vscode-ocaml-platform/actions?query=workflow%3A%22Main+workflow%22+branch%3Amaster) +[![Main workflow](https://img.shields.io/github/workflow/status/ocaml/vscode-ocaml/Main%20workflow?branch=master)](https://github.com/ocaml/vscode-ocaml/actions?query=workflow%3A%22Main+workflow%22+branch%3Amaster) Visual Studio Code extension for OCaml and relevant tools. @@ -304,11 +304,11 @@ required for file formatting to work. ### Problems with this Extension or OPAM support in the Extension One by one, invoke and see outputs for commands -`OCaml: Show OCaml Platform Extension Output` and +`OCaml: Show OCaml Extension Output` and `OCaml: Show OCaml Commands Output`. In these Output Views you may see errors and warnings, which can be handy to detect and fix the problem you're facing. Please, check the issue you're facing hasn't been already reported and report in -[Issues](https://github.com/ocamllabs/vscode-ocaml-platform/issues) tab of this +[Issues](https://github.com/ocaml/vscode-ocaml/issues) tab of this repository, if necessary. ### Things to include in your Issue report @@ -317,7 +317,7 @@ It is helpful to include information such as - Operation system information - VS Code version -- OCaml Platform Extension version +- OCaml Extension version - OCaml-LSP version - Reproducible setup (some codebase, for example, where we can see the bug happening) the problem @@ -328,7 +328,7 @@ It is helpful to include information such as
I installed ocaml-lsp-server, but the extension still cannot find it. -Make sure you installed the the language server in the sandbox used by the +Make sure you installed the language server in the sandbox used by the extension. _OPAM_: If you're using opam, make sure that you're using correct switch when @@ -364,13 +364,13 @@ In case you have a question or problem not listed above: - if you don't understand how to the extension works or how to make it work correctly, create a new discussion in the repository Discussions - [tab](https://github.com/ocamllabs/vscode-ocaml-platform/discussions). + [tab](https://github.com/ocaml/vscode-ocaml/discussions). - if the extension seems to misbehave: - see [Debugging](#debugging) section to see if you can see any reported errors - file an issue in the repository Issues - [tab](https://github.com/ocamllabs/vscode-ocaml-platform/issues). + [tab](https://github.com/ocaml/vscode-ocaml/issues). If this section doesn't contain the problem you managed to resolve, and you think this may help others, consider adding the problem and its solution here by @@ -417,7 +417,7 @@ The extension does not offer such functionality because it is rarely necessary. A workaround is to _not_ install `ocamllsp`. As a result you will mostly have just syntax highlighting for OCaml source files but also a warning notification that `ocamllsp` wasn't found. See this -[issue](https://github.com/ocamllabs/vscode-ocaml-platform/issues/889), feel +[issue](https://github.com/ocaml/vscode-ocaml/issues/889), feel free to upvote this issue by leaving a thumbs-up reaction. Pull requests are welcome as well. @@ -466,7 +466,7 @@ _Local switch_ { "ocaml.sandbox": { "kind": "esy", - "root": "${workspaceFolder:vscode-ocaml-platform}" + "root": "${workspaceFolder:vscode-ocaml}" } } ``` diff --git a/dune-project b/dune-project index f18af38be..3a16f72e8 100644 --- a/dune-project +++ b/dune-project @@ -1,9 +1,9 @@ (lang dune 3.0) -(name vscode-ocaml-platform) +(name vscode-ocaml) (source - (github ocamllabs/vscode-ocaml-platform)) + (github ocaml/vscode-ocaml)) (license ISC) @@ -22,7 +22,7 @@ (generate_opam_files true) (package - (name vscode-ocaml-platform) + (name vscode-ocaml) (synopsis "Visual Studio Code extension for OCaml") (allow_empty) (depends diff --git a/nix/default.nix b/nix/default.nix index c12919f66..02af4dc43 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -17,7 +17,7 @@ let in { vscode = default; - "vscode-ocaml-platform" = default; + "vscode-ocaml" = default; }; }; diff --git a/nix/opam-selection.nix b/nix/opam-selection.nix index 60d8caccf..fe8c97dc7 100644 --- a/nix/opam-selection.nix +++ b/nix/opam-selection.nix @@ -644,17 +644,17 @@ in }; opamSrc = "vscode.opam"; }; - vscode-ocaml-platform = + vscode-ocaml = { - pname = "vscode-ocaml-platform"; + pname = "vscode-ocaml"; version = "development"; - src = self.directSrc "vscode-ocaml-platform"; + src = self.directSrc "vscode-ocaml"; opamInputs = { inherit (selection) vscode promise_jsoo ppxlib opam-file-format ocaml-version ocaml jsonoo js_of_ocaml gen_js_api dune base; }; - opamSrc = "vscode-ocaml-platform.opam"; + opamSrc = "vscode-ocaml.opam"; }; yojson = { diff --git a/package.json b/package.json index 8b0016e03..5cf0110ca 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "publisher": "ocamllabs", "repository": { "type": "git", - "url": "https://github.com/ocamllabs/vscode-ocaml-platform" + "url": "https://github.com/ocaml/vscode-ocaml" }, "bugs": { - "url": "https://github.com/ocamllabs/vscode-ocaml-platform/issues" + "url": "https://github.com/ocaml/vscode-ocaml/issues" }, - "homepage": "https://github.com/ocamllabs/vscode-ocaml-platform", - "main": "./dist/vscode_ocaml_platform.bc.js", + "homepage": "https://github.com/ocaml/vscode-ocaml", + "main": "./dist/vscode_ocaml.bc.js", "engines": { "vscode": "^1.64.0" }, @@ -259,9 +259,9 @@ "title": "Show OCaml Language Server Output" }, { - "command": "ocaml.open-ocaml-platform-ext-output", + "command": "ocaml.open-ocaml-ext-output", "category": "OCaml", - "title": "Show OCaml Platform Extension Output" + "title": "Show OCaml Extension Output" }, { "command": "ocaml.open-ocaml-commands-output", @@ -451,7 +451,7 @@ ] }, "configuration": { - "title": "OCaml Platform", + "title": "OCaml", "properties": { "ocaml.sandbox": { "type": "object", @@ -1021,8 +1021,8 @@ "test:opam": "node ./test/runOpamTests.js", "test:problems": "node ./test/runProblemMatcherTests.js", "test": "npm-run-all -s test:*", - "package": "vsce package --out ocaml-platform.vsix --yarn", - "deploy:vsce": "vsce publish --packagePath ocaml-platform.vsix --yarn", + "package": "vsce package --out vscode-ocaml.vsix --yarn", + "deploy:vsce": "vsce publish --packagePath vscode-ocaml.vsix --yarn", "deploy:ovsx": "ovsx publish --yarn", "fmt:check": "prettier . --check", "fmt": "prettier . --write" diff --git a/shell.nix b/shell.nix index bf5f3e79a..6a256de34 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,7 @@ let in with local; pkgs.mkShell { - inputsFrom = [ vscode vscode-ocaml-platform ]; + inputsFrom = [ vscode vscode-ocaml ]; buildInputs = (with pkgs; [ yarn nodejs-14_x diff --git a/src/dune b/src/dune index 50626aae9..45e954d21 100644 --- a/src/dune +++ b/src/dune @@ -1,5 +1,5 @@ (executable - (name vscode_ocaml_platform) + (name vscode_ocaml) (preprocess (pps gen_js_api.ppx)) (libraries diff --git a/src/extension_commands.ml b/src/extension_commands.ml index eda0ea518..b0e29588d 100644 --- a/src/extension_commands.ml +++ b/src/extension_commands.ml @@ -142,7 +142,7 @@ let _open_current_dune_file = command Extension_consts.Commands.open_current_dune_file handler let ( _open_ocamllsp_output_pane - , _open_ocaml_platform_ext_pane + , _open_ocaml_ext_pane , _open_ocaml_commands_pane ) = let handler output (_instance : Extension_instance.t) ~args:_ = let show_output (lazy output) = OutputChannel.show output () in @@ -152,7 +152,7 @@ let ( _open_ocamllsp_output_pane Extension_consts.Commands.open_ocamllsp_output (handler Output.language_server_output_channel) , command - Extension_consts.Commands.open_ocaml_platform_ext_output + Extension_consts.Commands.open_ocaml_ext_output (handler Output.extension_output_channel) , command Extension_consts.Commands.open_ocaml_commands_output diff --git a/src/extension_commands.mli b/src/extension_commands.mli index 66cbcd67f..ca0c1eab9 100644 --- a/src/extension_commands.mli +++ b/src/extension_commands.mli @@ -5,12 +5,12 @@ and expose them here if they want to. All commands are registered using [register_all_commands] in - [Vscode_ocaml_platform.activate]. + [Vscode_ocaml.activate]. [1] https://code.visualstudio.com/api/references/vscode-api#commands *) (** Registers commands with vscode. Should be called in - [Vscode_ocaml_platform.activate]. It subscribes the disposables to the + [Vscode_ocaml.activate]. It subscribes the disposables to the extension context provided. *) val register_all_commands : Vscode.ExtensionContext.t -> Extension_instance.t -> unit diff --git a/src/extension_consts.ml b/src/extension_consts.ml index a1a1341d7..c15fe98d3 100644 --- a/src/extension_consts.ml +++ b/src/extension_consts.ml @@ -56,8 +56,8 @@ module Commands = struct let open_ocamllsp_output = ocaml_prefixed "open-ocamllsp-output" - let open_ocaml_platform_ext_output = - ocaml_prefixed "open-ocaml-platform-ext-output" + let open_ocaml_ext_output = + ocaml_prefixed "open-ocaml-ext-output" let open_ocaml_commands_output = ocaml_prefixed "open-ocaml-commands-output" end diff --git a/src/extension_instance.ml b/src/extension_instance.ml index 7833f4f50..99f344048 100644 --- a/src/extension_instance.ml +++ b/src/extension_instance.ml @@ -116,7 +116,7 @@ end = struct let clientOptions = client_options () in LanguageClient.make ~id:"ocaml" - ~name:"OCaml Platform VS Code extension" + ~name:"VSCode OCaml extension" ~serverOptions ~clientOptions () diff --git a/src/import.ml b/src/import.ml index 8d1c16935..8c6635138 100644 --- a/src/import.ml +++ b/src/import.ml @@ -209,9 +209,5 @@ module Ocaml_version = struct include Ocaml_version - module Releases = struct - let v4_14_0 = of_string_exn "4.14.0" - - include Releases - end + module Releases = Releases end diff --git a/src/odig.ml b/src/odig.ml index 198ec4cc3..ea2ada3b2 100644 --- a/src/odig.ml +++ b/src/odig.ml @@ -5,7 +5,7 @@ type t = { cache_dir : Path.t } let make_odig_cmd sandbox = Sandbox.get_command sandbox "odig" (** TODO: propose to install odig. See - https://github.com/ocamllabs/vscode-ocaml-platform/pull/771#discussion_r765297112 *) + https://github.com/ocaml/vscode-ocaml/pull/771#discussion_r765297112 *) let of_sandbox (sandbox : Sandbox.t) = let make_odig_cmd = make_odig_cmd sandbox in let odig_version = make_odig_cmd [ "--version" ] in diff --git a/src/output.ml b/src/output.ml index dc53ff532..5f5d624d2 100644 --- a/src/output.ml +++ b/src/output.ml @@ -2,7 +2,7 @@ let language_server_output_channel = lazy (Vscode.Window.createOutputChannel ~name:"OCaml Language Server") let extension_output_channel = - lazy (Vscode.Window.createOutputChannel ~name:"OCaml Platform Extension") + lazy (Vscode.Window.createOutputChannel ~name:"OCaml Extension") let command_output_channel = lazy (Vscode.Window.createOutputChannel ~name:"OCaml Commands") diff --git a/src/treeview_help.ml b/src/treeview_help.ml index 69b225921..69c559cb9 100644 --- a/src/treeview_help.ml +++ b/src/treeview_help.ml @@ -68,7 +68,7 @@ let github_item = ~command:"vscode.open" ~arguments: [ Vscode.Uri.parse - "https://github.com/ocamllabs/vscode-ocaml-platform" + "https://github.com/ocaml/vscode-ocaml" () |> Vscode.Uri.t_to_js ] diff --git a/src/vscode_ocaml_platform.ml b/src/vscode_ocaml.ml similarity index 97% rename from src/vscode_ocaml_platform.ml rename to src/vscode_ocaml.ml index eca5aa464..844301f4c 100644 --- a/src/vscode_ocaml_platform.ml +++ b/src/vscode_ocaml.ml @@ -6,7 +6,7 @@ let suggest_to_pick_sandbox () = let+ selection = Window.showInformationMessage ~message: - "OCaml Platform is using the package manager and sandbox available in \ + "VSCode OCaml is using the package manager and sandbox available in \ the environment. Pick a particular package manager and sandbox by \ clicking the button below" ~choices:[ (select_pm_button_text, ()) ] diff --git a/src/vscode_ocaml_platform.mli b/src/vscode_ocaml.mli similarity index 100% rename from src/vscode_ocaml_platform.mli rename to src/vscode_ocaml.mli diff --git a/vscode-ocaml-platform.opam b/vscode-ocaml.opam similarity index 83% rename from vscode-ocaml-platform.opam rename to vscode-ocaml.opam index aea70a075..f5200aeb9 100644 --- a/vscode-ocaml-platform.opam +++ b/vscode-ocaml.opam @@ -13,8 +13,8 @@ authors: [ "Javier Chávarri " ] license: "ISC" -homepage: "https://github.com/ocamllabs/vscode-ocaml-platform" -bug-reports: "https://github.com/ocamllabs/vscode-ocaml-platform/issues" +homepage: "https://github.com/ocaml/vscode-ocaml" +bug-reports: "https://github.com/ocaml/vscode-ocaml/issues" depends: [ "dune" {>= "3.0"} "vscode" {= version} @@ -43,4 +43,4 @@ build: [ "@doc" {with-doc} ] ] -dev-repo: "git+https://github.com/ocamllabs/vscode-ocaml-platform.git" +dev-repo: "git+https://github.com/ocaml/vscode-ocaml.git" diff --git a/vscode.opam b/vscode.opam index d381b2118..108e7464f 100644 --- a/vscode.opam +++ b/vscode.opam @@ -13,8 +13,8 @@ authors: [ "Javier Chávarri " ] license: "ISC" -homepage: "https://github.com/ocamllabs/vscode-ocaml-platform" -bug-reports: "https://github.com/ocamllabs/vscode-ocaml-platform/issues" +homepage: "https://github.com/ocaml/vscode-ocaml" +bug-reports: "https://github.com/ocaml/vscode-ocaml/issues" depends: [ "dune" {>= "3.0"} "ocaml" {>= "4.13"} @@ -38,4 +38,4 @@ build: [ "@doc" {with-doc} ] ] -dev-repo: "git+https://github.com/ocamllabs/vscode-ocaml-platform.git" +dev-repo: "git+https://github.com/ocaml/vscode-ocaml.git"