diff --git a/.gitignore b/.gitignore index 6341c1153..87080c961 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,14 @@ .DS_Store out node_modules -client/server +examples/*/lib +analysis/tests/lib +analysis/tests/.merlin +# artifacts from binary compilation *.exe +*.cmi +*.cmt +*.cmti +*.cmx +*.o +*.install diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c14af9b3..59e0fa91b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,17 @@ +## master + +Fixes: +- Jump-to-definition on some Windows paths. +- `->` autocomplete overruled `.`. + +Features: +- Autocomplete for props in JSX components. +- `->` autocomplete for built-in list, array, string, option types. And for string and array literals. +- Hover on labels in component functions with compiler version 9.1, and labels with type annotation. +- Don't show file path on hover (cleaner). + ## 1.0.8 + Fixes: - Diagnostics display for long lines. diff --git a/analysis/.github/workflows/ci.yml b/analysis/.github/workflows/ci.yml deleted file mode 100644 index 10666f906..000000000 --- a/analysis/.github/workflows/ci.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - test: - strategy: - fail-fast: false - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v2.3.4 - - - name: Cache OCaml's opam - uses: actions/cache@v2.1.5 - with: - path: ~/.opam - key: ${{matrix.os}}-latest-ocaml-4.06.1 - - - name: Use OCaml - uses: avsm/setup-ocaml@v1.1.10 - with: - ocaml-version: 4.06.1 - - - name: Use Node.js - uses: actions/setup-node@v2.1.5 - with: - node-version: 14.4.0 - - - run: npm ci - - # These 2 runs (or just the second?) are for when you have opam dependencies. We don't. - # Don't add deps. But if you ever do, un-comment these - # - run: opam pin add rescript-editor-support.dev . --no-action - # - run: opam install . --deps-only --with-doc --with-test - - - run: eval $(opam env) && make test - if: matrix.os != 'windows-latest' - # CI windows running the binary somehow stucks. Not sure why. Disable for now. - - run: "& $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make" - if: matrix.os == 'windows-latest' - - # Also avoids artifacts upload permission loss: - # https://github.com/actions/upload-artifact/tree/ee69f02b3dfdecd58bb31b4d133da38ba6fe3700#permission-loss - - name: Compress files - run: tar -cvf rescript-editor-support.tar -C lib rescript-editor-support.exe - - - uses: actions/upload-artifact@v2 - with: - name: ${{matrix.os}}-rescript-editor-support.exe - path: rescript-editor-support.tar diff --git a/analysis/.gitignore b/analysis/.gitignore deleted file mode 100644 index bd4fcb222..000000000 --- a/analysis/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.merlin -!/.merlin -*.install -examples/*/lib -tests/lib -node_modules -*.cmi -*.cmt -*.cmti -*.cmx -*.o diff --git a/analysis/Changes.md b/analysis/Changes.md deleted file mode 100644 index 549dccbb7..000000000 --- a/analysis/Changes.md +++ /dev/null @@ -1,59 +0,0 @@ -# master -- Fix issue in jump-to-definition on Windows. (See https://github.com/rescript-lang/rescript-vscode/issues/98) where the wrong URI was generated. -- Don't show file path on hover. -- Add autocomplete for props in JSX components. -- Autocomplete: fix issue where `->` autocomplete was overruling `.`. See https://github.com/rescript-lang/rescript-editor-support/issues/99. -- Add pipe autocomplete for builtin list, array, string, option types. And for string and array literals. -- Fix hover on labels in component functions with compiler version 9.1, and labels with type annotation. - -## Release 1.0.6 of rescript-vscode -This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/03ee0d97b250474028d4fb08eac81ddb21ccb082) is vendored in [rescript-vscode 1.0.6](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.6). - -#### New features -- Add support for autocomplete for pipe-first `foo->`: the type of `foo` is used to determine the module to take completions from. -- Add support for autocomplete for decorators such as `@module` and `@val`. -- Add support for autocomplete of labelled arguments `foo(~label... )`. -- Add support for @deprecated attributes in autocomplete. -- Support for upcoming `rescript` npm package for the compiler. Looks for `rescript` in addition to `bs-platform` in `node_modules`. - -#### Fixes - -- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See https://github.com/rescript-lang/rescript-editor-support/issues/62). -- Fix type hint when hovering over labeled arguments of components (See https://github.com/rescript-lang/rescript-editor-support/issues/63). -- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See https://github.com/rescript-lang/rescript-vscode/issues/72). -- Fix hover on definitions inside a react component module, or whenever multiple definitins for the same value exist in the module (See https://github.com/rescript-lang/rescript-editor-support/issues/67). -- Fix autocomplete issue where multiple open's were considered in the wrong priority order (See https://github.com/rescript-lang/rescript-editor-support/issues/72). -- Autocomplete: add support for `open!` in addition to `open`. - -## Release 1.0.5 of rescript-vscode -This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/6bdd10f6af259edc5f9cbe5b9df06836de3ab865) is vendored in [rescript-vscode 1.0.5](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.5). - -- Add support for doc strings when hovering on modules. -- Add support for printing uncurried function types in hover. -- Fix autocomplete issue where `open Foo` would be picked up inside line comments (see https://github.com/rescript-lang/rescript-editor-support/issues/15). -- Don't print parens as in `A()` for 0-ary variants. -- Fix infinite loop in autocomplete that can cause `rescript-editor-support.exe` processes to use up 100% cpu. -- Fix jump to type definition for types defined in an inner module. - -## Release 1.0.3 of rescript-vscode -This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/214d220d8573f9f0c8d54e623c163e01617bf124) is vendored in [rescript-vscode 1.0.3](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.3). - -- Fix type shown when hovering on record fields (see https://github.com/rescript-lang/rescript-vscode/issues/52), and doc comments for records. -- Fix issue where type variables are printed with global renaming when hovering or autocompleting a module (see https://github.com/rescript-lang/rescript-editor-support/issues/38). -- Fix issue where a log file was always created (see https://github.com/rescript-lang/rescript-vscode/issues/47). -- Add support for hover on the id of toplevel module definitions (```module Id = ...```). - -## Release 1.0.1 of rescript-vscode -This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/232ad609766c415048750c5cc828973a9995f382) is vendored in [rescript-vscode 1.0.1](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.1). - -- Support printing inline records. -- Add typedef hover support. -- Always output valid json, even in case of internal error. -- Remove semicolon in module top level preview. -- Support syntax highlight in hover fenced blocks. -- Fix printing of variant arguments. -- Use outcome printer from the syntax to print type declarations. -- Fix issue in command-line parsing on Windows with paths of the form `c:/...:line:column`. - -## Release 1.0.0 of rescript-vscode -This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/d45f45793a307a3bb87dcac0542fd412669f1b6e) is vendored in [rescript-vscode 1.0.0](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.0). diff --git a/analysis/LICENSE b/analysis/LICENSE deleted file mode 100644 index 22b154936..000000000 --- a/analysis/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) ReScript - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/analysis/package-lock.json b/analysis/package-lock.json deleted file mode 100644 index 3d168c8c1..000000000 --- a/analysis/package-lock.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "rescript-editor-support", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "version": "1.0.0", - "license": "MIT", - "devDependencies": { - "reanalyze": "^2.15.0" - } - }, - "node_modules/reanalyze": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/reanalyze/-/reanalyze-2.15.0.tgz", - "integrity": "sha512-FUN/pqgTKs5i+kzi9Mje5deahZHKniOQDyig5UseozDiK81eW77A4iRyN+3UsnontG6K6mAdUcXCU9NpEqZFug==", - "dev": true, - "hasInstallScript": true, - "bin": { - "reanalyze": "reanalyze.exe" - } - } - }, - "dependencies": { - "reanalyze": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/reanalyze/-/reanalyze-2.15.0.tgz", - "integrity": "sha512-FUN/pqgTKs5i+kzi9Mje5deahZHKniOQDyig5UseozDiK81eW77A4iRyN+3UsnontG6K6mAdUcXCU9NpEqZFug==", - "dev": true - } - } -} diff --git a/analysis/package.json b/analysis/package.json deleted file mode 100644 index 26a2352b0..000000000 --- a/analysis/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "rescript-editor-support", - "version": "1.0.0", - "keywords": [ - "rescript", - "lsp", - "ide" - ], - "private": true, - "repository": { - "url": "https://github.com/rescript-lang/rescript-editor-support", - "type": "git" - }, - "description": "Core editor analysis for ReScript's editor plugins", - "author": "Cristiano Calcagno", - "license": "MIT", - "devDependencies": { - "reanalyze": "^2.15.0" - } -} diff --git a/package.json b/package.json index 44f1ea714..62fd87ad7 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ ] }, "scripts": { - "clean": "rm -r client/out server/out", + "clean": "rm -rf client/out server/out", "vscode:prepublish": "npm run clean && npm run compile", "compile": "tsc -b", "watch": "tsc -b -w",