Skip to content
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

Update .rs.api.versionInfo() #531

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

juliasilge
Copy link
Contributor

@juliasilge juliasilge commented Sep 17, 2024

Addresses posit-dev/positron#4081
Addresses posit-dev/positron#4706
Goes together with posit-dev/positron#4703

There are a few differences between what I have in this draft and what .rs.api.versionInfo() returns for RStudio, especially on Workbench.

  • Currently mode will be "web" rather than "server" for non-desktop use. I did this because it is what VS Code uses internally throughout. Is it a problem for us to have something different here? See https://github.com/posit-dev/positron/pull/4703/files#r1764143168 We will have mode be "server", for consistency with RStudio.
  • There is no edition or release_name, since Positron doesn't have those. The desktop version of RStudio also doesn't have edition.

QA Notes

In the R console, you should see these types of results:

.rs.api.versionInfo()
#> $citation
#> To cite Positron in publications use:
#> 
#>   Posit team (2024). Positron: A next generation data science IDE.
#>   Posit Software, PBC, Boston, MA. URL https://www.posit.co/.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {Positron: A next generation data science IDE},
#>     author = {{Posit team}},
#>     organization = {Posit Software, PBC},
#>     address = {Boston, MA},
#>     year = {2024},
#>     url = {https://www.posit.co/},
#>   }
#> 
#> $mode
#> [1] "desktop"
#> 
#> $version
#> [1] '2024.9.0'
#> 
#> $long_version
#> [1] "2024.09.0+0"
#> 
#> $ark_version
#>                                              branch 
#>                                              "main" 
#>                                              commit 
#>                                          "8f5040d6" 
#>                                                date 
#>                           "2024-09-17 16:28:06 MDT" 
#>                                              flavor 
#>                                             "debug" 
#>                                                path 
#> "/Users/juliasilge/Work/posit/ark/target/debug/ark" 
#>                                             version 
#>                                           "0.1.136"

mode = Sys.getenv("POSITRON_MODE"),
version = package_version(Sys.getenv("POSITRON_VERSION")),
long_version = Sys.getenv("POSITRON_LONG_VERSION"),
ark_version = .ps.ark.version()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it might be nice to include the ark version here. Thoughts?

# info <- list()

current_year <- format(Sys.Date(), "%Y")
positron_citation <-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, do you think RStudio should have used https://posit.co/?

# https://github.com/rstudio/rstudio/blob/bb729e14867f6f95e26600d8b38e4551402cf7de/src/cpp/r/R/Api.R#L135-L145
# info <- list()

current_year <- format(Sys.Date(), "%Y")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

@juliasilge juliasilge merged commit 25a8c5f into main Sep 19, 2024
3 checks passed
@juliasilge juliasilge deleted the rstudioapi-version-info-env-vars branch September 19, 2024 15:24
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants