From 23479d648fa98aa259ad6914a828ecec4f8487fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Tue, 13 Apr 2021 12:15:54 +0200 Subject: [PATCH] [new release] merlin and dot-merlin-reader (4.2-412) CHANGES: Tue Apr 12 11:44:22 AM CET 2021 + merlin binary - external configuration reading: + use relative paths to communicate with Dune when possible. This solves issues related to symlinks on Unix and improve Windows support (ocaml/merlin#1271, fixes ocaml/merlin#1288) + make the `workdir` configuration value when using the `dune ocaml-merlin` configuration provider the same as when using `dot-merlin-reader` so that ppxes behaves in the same way as before (ocaml/merlin#1284, fixes ocaml/dune#4479, discussion in ocaml/merlin#1292) - destruct: + improve prefixing of generated constructors in Destruct by filtering opened modules (ocaml/merlin#1277) + make the destruct command more resilient to ill-typed expressions and when called without nodes (ocaml/merlin#1304, fixes ocaml/merlin#1300) - reintroduce some record recovery and improve completion (ocaml/merlin#1276) - introduce a new AST node for holes (`_`), allow correct typing of these holes and add a new `holes` command that returns the locations of all holes in the current file along with their types (ocaml/merlin#1242, ocaml/merlin#1289) - Mppx: don't restore cookies after invocation. Ppx are invoked only once so there is no need to manage cookies. This small change should increase performance and should not change any other behavior (ocaml/merlin#1309) - Windows: system command variant: do not open a window console when launching a ppx (ocaml/merlin#1270, fixes ocaml/merlin#714) - fix same file documentation bug (ocaml/merlin#1265 by @ulugbekna, fixes ocaml/merlin#1261) + editor modes - vim: Add `MerlinNextHole` and `MerlinPreviousHole` commands to navigate between holes. Jump to the first hole after destruct (ocaml/merlin#1287, ocaml/merlin#1303) - emacs: Add `merlin-next-hole` and `merlin-previous-hole` commands to navigate holes. Jump to the first hole after calling destruct. (ocaml/merlin#1291) - emacs: modernization of the elisp code and conformance with coding guidelines (ocaml/merlin#1247, ocaml/merlin#1310 by Steve Purcell ) - vim & emacs : new client-side "merlin use package" commands, restoring previous behavior (ocaml/merlin#1272, fixes ocaml/merlin#1191) + test suite - cover constructor disambiguation and record fields (ocaml/merlin#1276) - cover the new `holes` command and AST node (ocaml/merlin#1242, ocaml/merlin#1289) - cover the document fix (ocaml/merlin#1265, ocaml/merlin#1315) --- .../dot-merlin-reader.4.2-412/opam | 30 ++++++++ packages/merlin/merlin.4.2-412/opam | 76 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 packages/dot-merlin-reader/dot-merlin-reader.4.2-412/opam create mode 100644 packages/merlin/merlin.4.2-412/opam diff --git a/packages/dot-merlin-reader/dot-merlin-reader.4.2-412/opam b/packages/dot-merlin-reader/dot-merlin-reader.4.2-412/opam new file mode 100644 index 000000000000..b10434724ead --- /dev/null +++ b/packages/dot-merlin-reader/dot-merlin-reader.4.2-412/opam @@ -0,0 +1,30 @@ +opam-version: "2.0" +maintainer: "defree@gmail.com" +authors: "The Merlin team" +synopsis: "Reads config files for merlin" +homepage: "https://github.com/ocaml/merlin" +bug-reports: "https://github.com/ocaml/merlin/issues" +dev-repo: "git+https://github.com/ocaml/merlin.git" +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "4.06.1" } + "dune" {>= "2.7.0"} + "yojson" {>= "1.6.0"} + "ocamlfind" {>= "1.6.0"} + "csexp" {>= "1.2.3"} + "result" {>= "1.5"} +] +description: + "Helper process: reads .merlin files and gives the normalized content to merlin" +x-commit-hash: "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c" +url { + src: + "https://github.com/ocaml/merlin/releases/download/v4.2-412/merlin-v4.2-412.tbz" + checksum: [ + "sha256=86c30769277d3e2c09a8be6c68a98cd342bc0bdbde07c7225bfe2e6d0da2d394" + "sha512=27fbfb2ac50d7cd86807bd8cb02ff1e4661ee46abf071b9bec505e1df6d41f366c9c287988e66096fb7a14b67fd806df39c56b9f70c53ec40612192ba2a0e530" + ] +} diff --git a/packages/merlin/merlin.4.2-412/opam b/packages/merlin/merlin.4.2-412/opam new file mode 100644 index 000000000000..b4dcc0d856d9 --- /dev/null +++ b/packages/merlin/merlin.4.2-412/opam @@ -0,0 +1,76 @@ +opam-version: "2.0" +maintainer: "defree@gmail.com" +authors: "The Merlin team" +homepage: "https://github.com/ocaml/merlin" +bug-reports: "https://github.com/ocaml/merlin/issues" +dev-repo: "git+https://github.com/ocaml/merlin.git" +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" "merlin,dot-merlin-reader" "-j" "1"] {with-test} +] +depends: [ + "ocaml" {>= "4.12" & < "4.13"} + "dune" {>= "2.7.0"} + "dot-merlin-reader" {>= "4.0"} + "yojson" {>= "1.6.0"} + "conf-jq" {with-test} + "csexp" {>= "1.2.3"} + "result" {>= "1.5"} + "menhir" {dev} + "menhirLib" {dev} + "menhirSdk" {dev} +] +synopsis: + "Editor helper, provides completion, typing and source browsing in Vim and Emacs" +description: + "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." +post-messages: [ + "merlin installed. + +Quick setup for VIM +------------------- +Append this to your .vimrc to add merlin to vim's runtime-path: + let g:opamshare = substitute(system('opam var share'),'\\n$','','''') + execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" + +Also run the following line in vim to index the documentation: + :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" + +Quick setup for EMACS +------------------- +Add opam emacs directory to your load-path by appending this to your .emacs: + (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) + (when (and opam-share (file-directory-p opam-share)) + ;; Register Merlin + (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) + (autoload 'merlin-mode \"merlin\" nil t nil) + ;; Automatically start it in OCaml buffers + (add-hook 'tuareg-mode-hook 'merlin-mode t) + (add-hook 'caml-mode-hook 'merlin-mode t) + ;; Use opam switch to lookup ocamlmerlin binary + (setq merlin-command 'opam))) + +Take a look at https://github.com/ocaml/merlin for more information + +Quick setup with opam-user-setup +-------------------------------- + +Opam-user-setup support Merlin. + + $ opam user-setup install + +should take care of basic setup. +See https://github.com/OCamlPro/opam-user-setup +" + {success & !user-setup:installed} +] +x-commit-hash: "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c" +url { + src: + "https://github.com/ocaml/merlin/releases/download/v4.2-412/merlin-v4.2-412.tbz" + checksum: [ + "sha256=86c30769277d3e2c09a8be6c68a98cd342bc0bdbde07c7225bfe2e6d0da2d394" + "sha512=27fbfb2ac50d7cd86807bd8cb02ff1e4661ee46abf071b9bec505e1df6d41f366c9c287988e66096fb7a14b67fd806df39c56b9f70c53ec40612192ba2a0e530" + ] +}