-
Notifications
You must be signed in to change notification settings - Fork 235
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 FLG -pp ppx.exe -as-pp/-dump-ast on Windows #1723
Fix FLG -pp ppx.exe -as-pp/-dump-ast on Windows #1723
Conversation
Windows is special cased in Merlin to have a direct program execution without any shell, so shell redirection does not work. This is a narrow, Windows-only fix for ocaml#1722
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.
Exactly what I had in mind, thanks!
Feedback from @nojb
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.
LGTM
Someone with commit privileges will need to approve/merge (cc @voodoos)
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 am not expert enough to comment the Windows code, it looks all right and I will trust your judgement on it.
The rest of the PR looks fine to me, I just made a few stylistic propositions.
Style conformity Co-authored-by: Ulysse <[email protected]>
Friendly ping @voodoos: I think the PR can now be merged. |
Thanks @jonahbeckford ! |
from jonahbeckford/fix-noshellredirect-win32
CHANGES: Thu Feb 22 14:00:42 CET 2024 + merlin binary - Add a "heap_mbytes" field to Merlin server responses to report heap usage (ocaml/merlin#1717) - Add cache stats to telemetry (ocaml/merlin#1711) - Add new SyntaxDocument command to find information about the node under the cursor (ocaml/merlin#1706) - Fix `FLG -pp ppx.exe -as-pp/-dump-ast` use of invalid shell redirection when direct process launch on Windows. (ocaml/merlin#1723, fixes ocaml/merlin#1722) - Add a query_num field to the `ocamlmerlin` responses to detect server crashes (ocaml/merlin#1716) - Jump to cases within a match statement (ocaml/merlin#1726) - Jump to `module-type` (ocaml/merlin#1728, partially fixes ocaml/merlin#1656) - Exposes stable functions for configuration handling and pattern variable destruction. (ocaml/merlin#1730) + editor modes - vim: load merlin under the ocamlinterface and ocamllex filetypes (ocaml/merlin#1340) - Fix merlinpp not using binary file open (ocaml/merlin#1725, fixes ocaml/merlin#1724)
CHANGES: Thu Feb 22 14:00:42 CET 2024 + merlin binary - Add a "heap_mbytes" field to Merlin server responses to report heap usage (ocaml/merlin#1717) - Add cache stats to telemetry (ocaml/merlin#1711) - Add new SyntaxDocument command to find information about the node under the cursor (ocaml/merlin#1706) - Fix `FLG -pp ppx.exe -as-pp/-dump-ast` use of invalid shell redirection when direct process launch on Windows. (ocaml/merlin#1723, fixes ocaml/merlin#1722) - Add a query_num field to the `ocamlmerlin` responses to detect server crashes (ocaml/merlin#1716) - Jump to cases within a match statement (ocaml/merlin#1726) - Jump to `module-type` (ocaml/merlin#1728, partially fixes ocaml/merlin#1656) - Exposes stable functions for configuration handling and pattern variable destruction. (ocaml/merlin#1730) + editor modes - vim: load merlin under the ocamlinterface and ocamllex filetypes (ocaml/merlin#1340) - Fix merlinpp not using binary file open (ocaml/merlin#1725, fixes ocaml/merlin#1724)
CHANGES: Thu Feb 22 14:00:42 CET 2024 + merlin binary - Add a "heap_mbytes" field to Merlin server responses to report heap usage (ocaml/merlin#1717) - Add cache stats to telemetry (ocaml/merlin#1711) - Add new SyntaxDocument command to find information about the node under the cursor (ocaml/merlin#1706) - Fix `FLG -pp ppx.exe -as-pp/-dump-ast` use of invalid shell redirection when direct process launch on Windows. (ocaml/merlin#1723, fixes ocaml/merlin#1722) - Add a query_num field to the `ocamlmerlin` responses to detect server crashes (ocaml/merlin#1716) - Jump to cases within a match statement (ocaml/merlin#1726) - Jump to `module-type` (ocaml/merlin#1728, partially fixes ocaml/merlin#1656) - Exposes stable functions for configuration handling and pattern variable destruction. (ocaml/merlin#1730) + editor modes - vim: load merlin under the ocamlinterface and ocamllex filetypes (ocaml/merlin#1340) - Fix merlinpp not using binary file open (ocaml/merlin#1725, fixes ocaml/merlin#1724)
CHANGES: Thu Feb 22 14:00:42 CET 2024 + merlin binary - Add a "heap_mbytes" field to Merlin server responses to report heap usage (ocaml/merlin#1717) - Add cache stats to telemetry (ocaml/merlin#1711) - Add new SyntaxDocument command to find information about the node under the cursor (ocaml/merlin#1706) - Fix `FLG -pp ppx.exe -as-pp/-dump-ast` use of invalid shell redirection when direct process launch on Windows. (ocaml/merlin#1723, fixes ocaml/merlin#1722) - Add a query_num field to the `ocamlmerlin` responses to detect server crashes (ocaml/merlin#1716) - Jump to cases within a match statement (ocaml/merlin#1726) - Jump to `module-type` (ocaml/merlin#1728, partially fixes ocaml/merlin#1656) - Exposes stable functions for configuration handling and pattern variable destruction. (ocaml/merlin#1730) + editor modes - vim: load merlin under the ocamlinterface and ocamllex filetypes (ocaml/merlin#1340) - Fix merlinpp not using binary file open (ocaml/merlin#1725, fixes ocaml/merlin#1724)
Windows is special cased in Merlin to have a direct
program execution without any shell so shell redirection
does not work.
This is a narrow, Windows-only fix for
#1722
I don't particularly like this one since it is based on heuristics. And it does seem like there is a lot of unfixed code in other packages that is required to get
-as-pp
working on Windows. Perhaps someone more knowledgeable about Merlin can make this cleaner.