-
Notifications
You must be signed in to change notification settings - Fork 93
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
ark: readline()
at startup causes unstability
#2070
Comments
The problem is that StdIn is a As designed in the Jupyter protocol, an Positron does send a Edit: I'll also try sending a dummy execute-request from positron-r right away at startup. |
To be a little fair to ark, the experience in RStudio is weird at best. You don't see an updated prompt, so you can't see what the choices are either! But you are in a "selection" readline state! ![]() My minimum reprex for this is to create a fully clean clone of: Then open it in RStudio for the very first time |
@kevinushey Could renv output some clickable setup command that the user would run manually instead of running the setup at startup? Then the readline would be scoped within an execute-request and this would solve the problem at hand. @DavisVaughan found out that running |
|
@kevinushey ah, but that never fires here! This repo (https://github.com/ryjohnson09/posit-user-training/) has an So the load hook is not delayed, and instead continues to execute immediately, and you end up calling this Which results in the weird screenshot I posted here: |
I think this is also what is experienced in this Slack thread: https://positpbc.slack.com/archives/C05M2EZCPGR/p1709356630210799 I'm going to move this to RC since -- even though renv is somewhat advanced -- it seems like pretty much everyone who does use renv is going to hit it. |
Another user just hit this: https://positpbc.slack.com/archives/C05M2EZCPGR/p1711471678176579 |
We think this is related to this beta user's issues once they got on an ARM version of R https://github.com/posit-dev/positron-beta/issues/179 |
I am clearing this milestone so that we can re-triage this. My thoughts are that we should at least give a shot at trying to fix this soon-ish, even though we are unsure of exactly how it can be fixed. It essentially makes it so that anyone who uses renv will be dead in the water, which is pretty bad. And right now we don't have a good recommendation of how to even work around this (maybe we can at least avoid renv emitting a message during startup by having the user do something renv related in a terminal R session first?). I think we need some kind of plan for this for public beta. |
Is there any downsides to the proposal in #2070 (comment)?
|
renv doesn't have any hard deps. It does suggest cli but I'm not entirely sure why. That might be a good approach though if we can convince Kevin |
Hitting this again, I believe: https://positpbc.slack.com/archives/C05M2EZCPGR/p1716565623908479 |
Noting this for easy access, in
And |
I'm happy to fix this in |
Summary of what we're going to do here:
|
In Positron 2024.06.0 (Universal) build 50, I no longer see crashes in these situations. With Opening up a fresh clone of https://github.com/ryjohnson09/posit-user-training/: My console is fully functional in both of these cases and there is no crash. |
Reported by @ryjohnson09 at https://positpbc.slack.com/archives/C05M2EZCPGR/p1705066238618889
To reproduce, insert
readline("foo> ")
in your Rprofile. A question is asked on startup and, if answered, causes a crash.This also prevents renv-based workflows from working because:
The text was updated successfully, but these errors were encountered: