randy3k / radian

A 21 century R console
MIT License
1.96k stars 73 forks source link

Quartz plotting on macOS broken in radian >= 0.6.0 #448

Open a-hurst opened 7 months ago

a-hurst commented 7 months ago

Hi there!

Just set up a computer with a fresh install of R + radian and was surprised to find that when I create a plot in ggplot (or base R), the Quartz window it creates is totally frozen (pinwheel) and can't be moved or resized! This doesn't happen when I use regular terminal R, and hasn't happened to be before in Radian. This is on a mac running macOS 12.7.1 (x86) and R 4.3.2 on Python 3.10.

To make sure it's a Radian bug and not some quirk of my setup, I downgraded to rchitect 0.3.40 and radian 0.5.12 (the version on my main computer) and Quartz in radian works fine again! Updating radian to 0.6.0 or above breaks it. I ran a git bisect and found this specific commit is the point the bug was added: https://github.com/randy3k/radian/commit/5e9d13ff254545070eb935a436cffd2e022087a5

I'd take a look into fixing this myself, but there's a lot going on in that commit to sift through. Do you have any ideas what might have caused the regression? If you can point me in the right direction, I'll try to fix it locally and send a pull request.

Thanks in advance!

MuggleJinx commented 7 months ago

I ran into the same issue in macOS 13.5. I cannot create the plot in radian terminal. The problem was gone when I downgraded to 0.5.12.

randy3k commented 7 months ago

There is an issue with the new version of prompt-toolkit. A workround for now is to downgrade prompt-toolkit

pip install --force-reinstall prompt-toolkit==3.0.39

A patch is on the way https://github.com/randy3k/radian/pull/451 to make radian work again.

randy3k commented 7 months ago

v0.6.9 is out, will be on pypi soon.