Skip to content

Conversation

@let-def
Copy link
Contributor

@let-def let-def commented Jul 1, 2019

This is a tentative fix for #972.

(with-stdout-to %{targets}\n\
(run gcc -E -x c -P %{deps}))))")
else
("*.mly", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cute.

@trefis trefis changed the title Fix 408 4.08: Fix exceptions leaking from Parser Jul 1, 2019
@let-def
Copy link
Contributor Author

let-def commented Jul 1, 2019

This patch:

  • removes all error rules in the grammar (they use the built-in error handling system of yacc which conflicts with merlin recovery algorithm)
  • fixes a few conflicts in the grammar (inlining of match_cases, precedence annotation for LET_LWT)
  • replaces all (most) exceptions thrown by a call to Msupport_parsing.raise_error to register the error and then returns a sane fallback value.

Copy link
Contributor

@trefis trefis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes a few conflicts in the grammar (inlining of match_cases, precedence annotation for LET_LWT)

I can't speak for that part, but everything else looks good.

@let-def let-def merged commit e857af8 into master Jul 2, 2019
@let-def let-def deleted the fix-408 branch July 2, 2019 09:55
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 9, 2019
CHANGES:

Tue Jul  9 17:34:42 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 15, 2019
CHANGES:

Mon Jul 15 11:10:35 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
    - disable arity checks on externals (for Bucklescript compatibility)
    - remove parser preprocessing (simplify compilation for OCaml < 4.08) (ocaml/merlin#997)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 15, 2019
CHANGES:

Mon Jul 15 11:10:35 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
    - disable arity checks on externals (for Bucklescript compatibility)
    - remove parser preprocessing (simplify compilation for OCaml < 4.08) (ocaml/merlin#997)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants