-
Notifications
You must be signed in to change notification settings - Fork 233
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
Fix ignorance of STDLIB in .merlin #1803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think it's better like this, and we can even reuse existing logic related to the treatment of the cfg.stdlib
option.
Can you rebase the PR on main
? It should help fixing the CI issues.
@@ -427,6 +427,7 @@ let postprocess cfg = | |||
(dirs :> Merlin_dot_protocol.directive list) | |||
) | |||
; (cfg.pass_forward :> Merlin_dot_protocol.directive list) | |||
; cfg.stdlib |> Option.map ~f:(fun stdlib -> `STDLIB stdlib) |> Option.to_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
; cfg.stdlib |> Option.map ~f:(fun stdlib -> `STDLIB stdlib) |> Option.to_list | |
; [`STDLIB stdlib] |
The local stdlib
value seems perfect here, it defaults to Findlib's result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this results in incorrect behavior, as the -ocamllib-path
flag will be ignored. With this change, it will appear to mconfig_dot.ml
as if the .merlin
file contained the STDLIB
directive, which it will then prioritize over the -ocmallib-path
flag. Indeed, I added a test for this case and confirmed that accepting this change would break the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah make sense, let's forget this the :-)
Done! |
CHANGES: Thu Sep 26 18:48:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Canonicalize paths in occurrences. This helps deduplicate the results and show more user-friendly paths. (ocaml/merlin#1840) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Thu Sep 26 18:48:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Thu Sep 26 18:48:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Canonicalize paths in occurrences. This helps deduplicate the results and show more user-friendly paths. (ocaml/merlin#1840) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Canonicalize paths in occurrences. This helps deduplicate the results and show more user-friendly paths. (ocaml/merlin#1840) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828) [new release] merlin (3 packages) (4.17.1-501) CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828) [new release] merlin (3 packages) (4.17.1-414) CHANGES: Fri Sep 27 12:02:42 CEST 2024 + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770) - Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745) - Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812) - Add `signature-help` command (ocaml/merlin#1720) - Implement new search-by-type command for searching values by types (ocaml/merlin#1828) - Fix dot-merlin-reader ignoring `SOURCE_ROOT` and `STDLIB` directives (ocaml/merlin#1839, ocaml/merlin#1803) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798) - vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804) - emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814) - emacs: Add `merlin-search-by-type`, `merlin-search-by-polarity` and change the behaviour of `merlin-search` to switch between `by-type` or `by-polarity` depending on the query (ocaml/merlin#1828)
Currently, the directive
STDLIB
inside a.merlin
file is ignored. This PR fixes this bug.