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.
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 |
|
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=trueto 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.