-
Notifications
You must be signed in to change notification settings - Fork 121
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
Mitigate ocaml/ocaml#11737 (windows-only) #935
Mitigate ocaml/ocaml#11737 (windows-only) #935
Conversation
Alternatively, maintainers could chose to close this PR without merging. |
Thanks for the fix. I do try to keep windows support working. I don't have time to test things thoroughly so your help is much appreciated. |
57c779c
to
ca809dc
Compare
commit ca809dc is an alternative way to avoid triggering the seg fault and will still allow to make dune watch work when it will be available ! |
ca809dc
to
b2113f1
Compare
Thanks. I see you guys have already merged it to the 4.14 branch so I tightened the condition to disable it only for 4.14.0 |
CHANGES: ## Fixes - Fix document syncing for ranges that span an entire line (ocaml/ocaml-lsp#927) - Respect the client's completion item resolve and preSelect capabilities (ocaml/ocaml-lsp#925, ocaml/ocaml-lsp#936) - Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (ocaml/ocaml-lsp#935) ## Features - Semantic highlighting support is enabled by default (ocaml/ocaml-lsp#933) - Re-enable `ocamlformat-rpc` for formatting code snippets (but not files) (ocaml/ocaml-lsp#920, ocaml/ocaml-lsp#939) One needs to have either `ocamlformat` version > 0.21.0 or, otherwise, `ocamlformat-rpc` package installed. - Add custom ocamllsp/hoverExtended request (ocaml/ocaml-lsp#561) - Support utf-8 position encoding clients (ocaml/ocaml-lsp#919) - Upgrade to merlin 4.7 and use merlin's `verbosity=smart` by default, which allows unwrapping module alias types (ocaml/ocaml-lsp#942) ## Fixes - Fix semantic highlighting of "long identifiers," e.g., `Foo.Bar.x` (ocaml/ocaml-lsp#932)
CHANGES: ## Fixes - Fix document syncing for ranges that span an entire line (ocaml/ocaml-lsp#927) - Respect the client's completion item resolve and preSelect capabilities (ocaml/ocaml-lsp#925, ocaml/ocaml-lsp#936) - Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (ocaml/ocaml-lsp#935) ## Features - Semantic highlighting support is enabled by default (ocaml/ocaml-lsp#933) - Re-enable `ocamlformat-rpc` for formatting code snippets (but not files) (ocaml/ocaml-lsp#920, ocaml/ocaml-lsp#939) One needs to have either `ocamlformat` version > 0.21.0 or, otherwise, `ocamlformat-rpc` package installed. - Add custom ocamllsp/hoverExtended request (ocaml/ocaml-lsp#561) - Support utf-8 position encoding clients (ocaml/ocaml-lsp#919) - Upgrade to merlin 4.7 and use merlin's `verbosity=smart` by default, which allows unwrapping module alias types (ocaml/ocaml-lsp#942) ## Fixes - Fix semantic highlighting of "long identifiers," e.g., `Foo.Bar.x` (ocaml/ocaml-lsp#932)
CHANGES: ## Features - Add support for OCaml 5.0 - Semantic highlighting support is enabled by default (ocaml/ocaml-lsp#933) - Re-enable `ocamlformat-rpc` for formatting code snippets (but not files) (ocaml/ocaml-lsp#920, ocaml/ocaml-lsp#939) One needs to have either `ocamlformat` version > 0.21.0 or, otherwise, `ocamlformat-rpc` package installed. - Add custom ocamllsp/hoverExtended request (ocaml/ocaml-lsp#561) - Support utf-8 position encoding clients (ocaml/ocaml-lsp#919) - Upgrade to merlin 4.7 and use merlin's `verbosity=smart` by default, which allows unwrapping module alias types (ocaml/ocaml-lsp#942) ## Fixes - Fix document syncing for ranges that span an entire line (ocaml/ocaml-lsp#927) - Respect the client's completion item resolve and preSelect capabilities (ocaml/ocaml-lsp#925, ocaml/ocaml-lsp#936) - Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (ocaml/ocaml-lsp#935) - Fix semantic highlighting of "long identifiers," e.g., `Foo.Bar.x` (ocaml/ocaml-lsp#932)
CHANGES: ## Features - Enable [semantic highlighting](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens) support by default (ocaml/ocaml-lsp#933) - Support connecting over pipes and socket. Pipes on Windows aren't yet supported (ocaml/ocaml-lsp#946) [More](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#implementationConsiderations) about communication channels in LSP specification. - Re-enable `ocamlformat-rpc` for formatting code snippets (but not files and not on Windows) (ocaml/ocaml-lsp#920, ocaml/ocaml-lsp#939) One needs to have installed either `ocamlformat` package version > 0.21.0 or, otherwise, `ocamlformat-rpc` package. Note that previously `ocamlformat-rpc` came in a standalone OPAM package, but since `ocamlformat` version > 0.21.0, it comes within `ocamlformat` package. - Add custom [`ocamllsp/hoverExtended`](https://github.com/ocaml/ocaml-lsp/blob/e165f6a3962c356adc7364b9ca71788e93489dd0/ocaml-lsp-server/docs/ocamllsp/hoverExtended-spec.md#L1) request (ocaml/ocaml-lsp#561) - Support utf-8 position encoding clients (ocaml/ocaml-lsp#919) [More](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) about position encoding in LSP specification. - Show unwrapped module alias types on hovering over module names. This is due to upgrading to merlin 4.7 and using merlin's `verbosity=smart` by default (ocaml/ocaml-lsp#942) ## Fixes - Respect the client's completion item resolve and preSelect capabilities (ocaml/ocaml-lsp#925, ocaml/ocaml-lsp#936) - Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (ocaml/ocaml-lsp#935) - Fix semantic highlighting of "long identifiers," e.g., `Foo.Bar.x` (ocaml/ocaml-lsp#932) - Fix syncing of document contents: - For ranges that span an entire line (ocaml/ocaml-lsp#927) - Previously, whole line edits would incorrectly eat the newline characters (ocaml/ocaml-lsp#971)
CHANGES: ## Features - Add support for OCaml 5.0 - Enable [semantic highlighting](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens) support by default (ocaml/ocaml-lsp#933) - Support connecting over pipes and socket. Pipes on Windows aren't yet supported (ocaml/ocaml-lsp#946) [More](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#implementationConsiderations) about communication channels in LSP specification. - Re-enable `ocamlformat-rpc` for formatting code snippets (but not files and not on Windows) (ocaml/ocaml-lsp#920, ocaml/ocaml-lsp#939) One needs to have installed either `ocamlformat` package version > 0.21.0 or, otherwise, `ocamlformat-rpc` package. Note that previously `ocamlformat-rpc` came in a standalone OPAM package, but since `ocamlformat` version > 0.21.0, it comes within `ocamlformat` package. - Add custom [`ocamllsp/hoverExtended`](https://github.com/ocaml/ocaml-lsp/blob/e165f6a3962c356adc7364b9ca71788e93489dd0/ocaml-lsp-server/docs/ocamllsp/hoverExtended-spec.md#L1) request (ocaml/ocaml-lsp#561) - Support utf-8 position encoding clients (ocaml/ocaml-lsp#919) [More](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) about position encoding in LSP specification. - Show unwrapped module alias types on hovering over module names. This is due to upgrading to merlin 4.7 and using merlin's `verbosity=smart` by default (ocaml/ocaml-lsp#942) ## Fixes - Respect the client's completion item resolve and preSelect capabilities (ocaml/ocaml-lsp#925, ocaml/ocaml-lsp#936) - Disable polling for dune's watch mode on Windows and OCaml 4.14.0 (ocaml/ocaml-lsp#935) - Fix semantic highlighting of "long identifiers," e.g., `Foo.Bar.x` (ocaml/ocaml-lsp#932) - Fix syncing of document contents: - For ranges that span an entire line (ocaml/ocaml-lsp#927) - Previously, whole line edits would incorrectly eat the newline characters (ocaml/ocaml-lsp#971)
Description
See #929.
With this PR, we do not start the inifinite loop that is watching the "dune/rpc" file on windows.
This loop exists to communicate with dune in watch mode... which is not yet supported on windows (although it should be supported "soonish" when ocaml/dune#6087 will be merged). So, in practice, on windows, this loop is basically an infinite thread doing nothing but failing calls to
Unix.stat
. That is exactly what's needed to trigger ocaml/ocaml#11737.Note: even with this PR, the ocaml bug could still lead to a segfault each time we do a Unix.stat on non-existing file. But
with this PR, it should be harder to trigger.
This PR should be reverted as soon as all supported compilers have ocaml/ocaml#11737 (> 4.14.0 ?) which, hopefully, should happen before #6087 is merged (or we will need another way to avoid this problem).