Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs: fix stack overflow on large files #1024

Merged
merged 2 commits into from
Sep 26, 2019

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Sep 20, 2019

Don't recurse on the outline list, as large files have a long list and Emacs runs out of stack.

This ensures that merlin-imenu doesn't need to change Emacs stack depth settings (see discussion in #1021).

Also rename variables to ensure they're appropriately namespaced.

emacs/merlin-imenu.el Outdated Show resolved Hide resolved
@taquangtrung
Copy link
Contributor

taquangtrung commented Sep 21, 2019

@Wilfred, @rgrinberg : awesome patch. Now I can use merlin-imenu normally with the module llvm.mli with the default thresholds of max-lisp-eval-depth and setq max-specpdl-size.

Btw, I love what two of you are doing. Do you want to be added as the contributors of this package? (and feel free to do so)

@Wilfred
Copy link
Contributor Author

Wilfred commented Sep 23, 2019

@taquangtrung you mean listed as contributors in the header of the file? I don't mind, as it's all in git-blame anyway :)

@Wilfred
Copy link
Contributor Author

Wilfred commented Sep 23, 2019

Updated to use the private variable naming convention.

@rgrinberg
Copy link
Member

rgrinberg commented Sep 24, 2019

Did you forget to add the -- separators? Or am I missing something?

@Wilfred
Copy link
Contributor Author

Wilfred commented Sep 24, 2019

Argh, I messed up my force push. Should be correct now.

@rgrinberg rgrinberg merged commit 8c25431 into ocaml:master Sep 26, 2019
@rgrinberg
Copy link
Member

Thank you!

let-def added a commit to let-def/opam-repository that referenced this pull request Nov 29, 2019
CHANGES:

Fri Nov 29 17:35:58 CET 2019

  + backend
    - support OCaml 4.09 (ocaml/merlin#1055)
    - fix parse errors in 4.08 (ocaml/merlin#1037)
    - update 4.08 support to OCaml 4.08.1 (ocaml/merlin#1053)
    - support `without_cmis`
    - separate reading from caching in file-cache, use caching in
      `Env.check_state_consistency` (ocaml/merlin#1044)
    - simplify compiler state management (ocaml/merlin#1056, ocaml/merlin#1059)
    - fix creation of initial environment, improve compatibility with
      upstream 4.08 (ocaml/merlin#1052)
  + frontend
    - code re-organization (ocaml/merlin#1042)
    - error command: select which kind of errors to show (ocaml/merlin#995)
    - print value types in outline (ocaml/merlin#1014)
    - fix process handling in windows (ocaml/merlin#1005)
  + editor modes
    - emacs
      + bugfixes in merlin-imenu, merlin-xref (ocaml/merlin#1000, ocaml/merlin#1021, ocaml/merlin#1001)
      + show types in merlin-imenu (ocaml/merlin#1013)
      + reset buffer local configurations when resetting server (ocaml/merlin#1004)
      + remove merlin-use-tuareg-imenu
      + fix stack overflow (ocaml/merlin#1024)
      + fix merlin-occurrence (ocaml/merlin#1043)
    - vim
      + display warn-error warnings as errors (ocaml/merlin#1009)
  + testsuite
    - cover file-cache and `check_state_consistency` (ocaml/merlin#1044)
    - check inconsistent assumptions, test server versus single modes (ocaml/merlin#1047)
let-def added a commit to let-def/opam-repository that referenced this pull request Mar 2, 2020
CHANGES:

Fri Nov 29 17:35:58 CET 2019

  + backend
    - support OCaml 4.09 (ocaml/merlin#1055)
    - fix parse errors in 4.08 (ocaml/merlin#1037)
    - update 4.08 support to OCaml 4.08.1 (ocaml/merlin#1053)
    - support `without_cmis`
    - separate reading from caching in file-cache, use caching in
      `Env.check_state_consistency` (ocaml/merlin#1044)
    - simplify compiler state management (ocaml/merlin#1056, ocaml/merlin#1059)
    - fix creation of initial environment, improve compatibility with
      upstream 4.08 (ocaml/merlin#1052)
  + frontend
    - code re-organization (ocaml/merlin#1042)
    - error command: select which kind of errors to show (ocaml/merlin#995)
    - print value types in outline (ocaml/merlin#1014)
    - fix process handling in windows (ocaml/merlin#1005)
  + editor modes
    - emacs
      + bugfixes in merlin-imenu, merlin-xref (ocaml/merlin#1000, ocaml/merlin#1021, ocaml/merlin#1001)
      + show types in merlin-imenu (ocaml/merlin#1013)
      + reset buffer local configurations when resetting server (ocaml/merlin#1004)
      + remove merlin-use-tuareg-imenu
      + fix stack overflow (ocaml/merlin#1024)
      + fix merlin-occurrence (ocaml/merlin#1043)
    - vim
      + display warn-error warnings as errors (ocaml/merlin#1009)
  + testsuite
    - cover file-cache and `check_state_consistency` (ocaml/merlin#1044)
    - check inconsistent assumptions, test server versus single modes (ocaml/merlin#1047)
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