RProvider
RProvider copied to clipboard
R outputs to standard out, which breaks FsAutoComplete
Ref: https://github.com/fsharp/emacs-fsharp-mode/issues/33
The R output on standard out is interleaved with the JSON messages being sent to the editors. I'd like to explore whether we can prevent these spurious messages from being printed here.
Example of output:
[[425]]
[[425]]$name
[1] "findPackageEnv"
[[425]]$type
[1] "closure"
[[425]]$params
[[425]]$params[[1]]
[1] "info"
This is mysterious - we must just be accidentally printing this somewhere - e.g. a leftover of some debugging attempts!
As documented here, the R provider starts a separate process (see here) that actually runs R and so I don't see how output from R could accidentally get into the output of the console that is calling the main type provider library.
Let me know if I can do something with the AutoPrint behavior. It's been unfortunately an occasional practical stumbling block for users on different fronts whether it defaults to true or false.
@tpetricek The issue is solved.
R sometimes could still break autocomplete by sendng warning messages but it's easy to suppress those warning from R.
Thanks for helps.
@jmp75 I think the AutoPrint
behavior is fine as it is - the fact that we can enable/disable it when creating the engine is really all we need in R provider :-).
It happens again. I have no idea where the output comes from so I can't suppress it: Error: F# completion process produced malformed JSON (Loading required package: spd). Loading any packages causes this. I tried several R packages: Rcpp, spatial, spd.
Reopening. Is there a good way of getting a log of what gets sent to the FsAutoComplete so that I can more easily reproduce this?
@tpetricek the easiest way I found to reproduce it was with FsAutoComplete standalone, see this comment: https://github.com/fsharp/emacs-fsharp-mode/issues/33#issuecomment-156422321
I am really interested to know if there is some way FsAutoComplete can just suppress subprocesses from outputting, as otherwise this could keep happening.