-
Notifications
You must be signed in to change notification settings - Fork 756
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
Adjust to new RStudio version numbering #2410
Conversation
Would appreciate a quick 👀 @romainfrancois and/or @jgutman (I can't officially request a review from you). Do you foresee any negative consequences of this? |
R/sitrep.R
Outdated
# I'll take silent failure here over dev_sitrep() falling over completely | ||
# if this download fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This captures why I've made this function a bit more robust. In general, I think "sitrep" functions should basically never throw an error, because you're often using them to bring clarity to weird, sub-optimal situations.
@jgutman can you give me concrete examples of the different version number forms I need to handle? |
The quoting here is a surprise:
|
It looks like |
I'm under the impression that I can't / really shouldn't use |
An older version A newer release version A preview version A daily version |
Probably right, rstudioapi::versionInfo() will be equivalent! |
Here's how the IDE does this: https://github.com/rstudio/rstudio/blob/main/src/cpp/session/modules/SessionUpdates.R It gets called with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
OK this was more than I bargained for, but I think it's done. |
In the future, this gives us a better chance of detecting if this function has stopped working again and shows the version number it's falling over for.
Closes #2397
As per @jgutman advice:
manual=true
to the URL we use when checking for updates.Also makes this helper much less likely to throw an error, even if it does not succeed.