jaredly / jaredly/reason-language-server
Spontaneous error "Illegal character (\\r)"
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 649
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
I've been getting the following errors spontaneously during development: `Illegal character (\\r)`. Simply re-saving the file makes the errors go away, but they reappear in (apparently) random files at (apparently) random points of time. I have also made a hexdump of the file before and after re-saving, and there is no change - so I am guessing there is no real issue with the file itself.
I am on Mac OSXMojave (10.14.6) and getting these errors on two different computers.

Not sure how much of the log is relevant, but here is the part with the "Error: Illegal character":
```
<< Replacing lastDefinitions for file:///.../AddResult.re
Sending notification {"jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": {"uri": "file:///.../AddResult.re", "diagnostics": []}}
Read message
{"jsonrpc":"2.0","id":805,"method":"textDocument/codeAction",
"params":{"textDocument":
{"uri":"file:///.../AddResult.re"},
"range":{"start":{"line":165,"character":2},
"end":{"line":165,"character":2}},
"context":{"diagnostics":[
{"range":{"start":
{"line":165,"character":2},
"end":{"line":165,"character":3}},
"message":"Error: Illegal character (\\r)","severity":1}]}}}
[server] Got a method textDocument/codeAction
[server] processing took 0.00619888305664ms
Sending response {"id": 805, "jsonrpc": "2.0", "result": null}
Read message
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file, test, or entry point. Start by reproducing the intermittent `Illegal character (\r)` diagnostic and inspect the logged `textDocument/codeAction` request; done means the cause is identified and the diagnostic no longer appears spuriously.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100