Open kotatsuyaki opened 1 year ago
i confirm it.
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (99999999999999999999999999999999, 1980-01-01) for Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.13 Chrome/87.0.4280.144 Safari/537.36
"x86_64-linux"
Linux 6.3.5, NixOS, 23.05 (Stoat), 23.05.419.3a70dd92993
yes
yes
nix-env (Nix) 2.13.3
""
"nixos-23.05"
/nix/var/nix/profiles/per-user/root/channels/nixos
@kevinushey, @jgutman, @jmcphers - Hi there! Huge Posit/RStudio fans here :) We've been supporting a version of the open source RStudio in nixpkgs for several years now (desktop and server), but we haven't had any luck getting the Visual Editor to work. Nixpkgs is a unique package manager that handles dependencies all the way down the stack, and we've done a bit of hacking to get it working nicely here. The Visual Editor has been tricky for us to crack, however, because we don't understand the mechanics under the hood. Would any of you be available to answer a few questions? We're happy to do the leg work and heavy lifting, but we could really use a few hints. @Kupac, @jbedo, @b-rodrigues, @cfhammill
I can try to help. The main thing that stands out for this issue -- RStudio now bundles Quarto, and uses the version of Pandoc bundled with Quarto -- hence the new path seen for RSTUDIO_PANDOC
.
Perhaps the key bit is that the default Pandoc path is now read from here:
and also see how the Pandoc path is set here:
Based on that, and given the patch in https://github.com/NixOS/nixpkgs/blob/b3818a46e686f24561a28eaa9fcf35e18b8d8e89/pkgs/applications/editors/rstudio/pandoc-nix-path.patch, I think both of the Pandoc path constants need to be patched.
Hi @kevinushey - thanks so much for your quick reply and for taking a look. This issue has been open awhile, and I should have included a link to the master branch. @Kupac just updated to Rstudio 2023 09 0 463, and I think he addresses some of what you pointed out. @Kupac does your patch adjust for both of the Pandoc path constants? Latest patch from master: here.
We might move this discussion to a branch soon to get some build logs going.
The other thing you might try, to get a bit more information -- if you right click somewhere in the IDE surface, you should get Inspect Element as a menu option; click that to open the RStudio developer tools. If you then try to open the visual editor while those tools are up, you might get some extra information in the console there regarding what's going wrong.
You can also click on the Source tab, and try to stop on exception, to see if you can get some useful backtraces -- unfortunately the JS is likely to be obfuscated so it may be challenging to divine the issue just form that.
Thanks, this is great advice for troubleshooting the issue. Exactly what I was missing. But I'll check the patches first, I don't think I patched the json file, I think we missed that it's referred to in two places
Has any progress been made on this? Ty.
A new Rstudio got released, it'll be a good opportunity to revisit visual mode https://docs.posit.co/ide/news/
Cool. I'm happy to test it or otherwise help if I can.
Get BlueMail for Android
On May 1, 2024, 09:13, at 09:13, Bruno Rodrigues @.***> wrote:
A new Rstudio got released, it'll be a good opportunity to revisit visual mode https://docs.posit.co/ide/news/
-- Reply to this email directly or view it on GitHub: https://github.com/NixOS/nixpkgs/issues/210826#issuecomment-2088612511 You are receiving this because you commented.
Message ID: @.***>
Did someone end up with a solution?
No, and it's really frustrating. I guess people who use R don't use NixOS much. The best thing I've come up with is running it in a Fedora distrobox. I can't seem to do R Markdown documents but Quarto documents work. I haven't been doing anything in R recently, but when I return to it I may just dual-boot :-(
Describe the bug
When trying to switch to the "visual editor" for Quarto markdown files, the editor stays loading with a spinning indicator in the middle forever (20 minutes+), without any error messages both on the GUI and on stdout/stderr. See the screenshot below.
Steps To Reproduce
Steps to reproduce the behavior:
nix run nixpkgs#rstudio
, where mynixpkgs
is pinned to commitb3818a4
.Create a Quarto
.qmd
file by clickingNew Blank File
=>Quarto Doc...
in theFiles
panel, and insert the following Markdown content.Visual
to switch from the source editor to the visual editor.Expected behavior
The visual editor should be able to render the content and provide editing functionalities.
Screenshots
Additional context
rstudio/rstudio#10674 - This closed issue in the RStudio repository suggests that the problem may have something to do with the
RSTUDIO_PANDOC
environment variable. On my RStudio, the value of this environment variable is a path under RStudio in/nix/store
:However, this path does not exist:
This seems odd, since the Nix derivation for RStudio already patches the path to be
"@pandoc@"
and usessubstituteInPlace
to replace@pandoc@
with a path to thepandoc
binary from Nixpkgs.Notify maintainers
@ciil and @cfhammill
Metadata
nixpkgs
pinned in the registry.Information other than
nixpkgs
version (which is inaccurate due to me using Flakes) obtained bynix-info
.