-
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
construct: Do not produce redundant prefixes #1618
Conversation
e487539
to
520163a
Compare
Right, it sounds like a reasonable assumption and I cannot think of a counter example so far. |
Seems reasonable to me. Is there a way to read this information inside merlin? I tried just calling |
I don't know either, I will have a look ! |
The |
520163a
to
94b1ad2
Compare
OK, I took some guesses as to how best to thread the config value through to the construct command. Hopefully my changes make sense but please feel free to ask for any modifications. |
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 for the changes, I just have a last nit-pick :-)
When construct is called, there is always enough type information for type-directed disambiguation to find the appropriate constructor. This changes stops generating prefixes for constructors and record field names. Closes ocaml#1552.
fa8e850
to
fe1194e
Compare
Thank you ! |
from bcc32/omit-module-prefixes
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
CHANGES: Thu Aug 24 17:17:42 CEST 2023 + merlin binary - Constrain socket path buffer size to avoid build warnings (ocaml/merlin#1631) - Handle concurrent server start (ocaml/merlin#1622) - Omit module prefixes for constructors and record fields in the `construct` command (ocaml/merlin#1618). Prefixes are still produced when warning 42 (disambiguated name) is active. - Correctly invalidate PPX cache when pipeline ran partially (ocaml/merlin#1650, fixes ocaml/merlin#1647) - Prevent `short-path` from looping in some cases related to recursive type definitions (ocaml/merlin#1645) - Support parsing negative numbers in sexps (ocaml/merlin#1655) - Fix construct not working with inline records (ocaml/merlin#1658) - Improve behavior of `type-enclosing` on let/and operators (ocaml/merlin#1653) - Fix occurrences of extension constructors (ocaml/merlin#1662) - Improve node selection when ghosts are present (ocaml/merlin#1664, fixes ocaml/merlin#1660) + editor modes - emacs: call merlin-client-logger with "interrupted" if the merlin binary itself is interrupted, not just the parsing of the result (ocaml/merlin#1626). - emacs: merlin-construct, with a prefix argument, now includes local values in the completion options. Alternatively, this behavior can be enabled permanently by customizing `merlin-construct-with-local-values` (ocaml/merlin#1644) - emacs: add support for opam-switch-mode (ocaml/merlin#1654, fixes ocaml/merlin#1591). See <https://github.com/ProofGeneral/opam-switch-mode>
As suggested in #1552, there shouldn't be any need to generate module prefixes for constructors or record fields when using
construct
, since the hole's type can be used with type-directed disambiguation.Closes #1552.