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

[setup-r]: better document 'r-version' parameter #936

Merged
merged 4 commits into from
Nov 9, 2024

Conversation

MichaelChirico
Copy link
Contributor

Related to #935 -- is this helpful? Or guilty of exposing implementation details we'd rather not?

ref:

export async function determineVersion(version: string): Promise<IRVersion> {

(PS didn't compile this to the README yet)

@gaborcsardi
Copy link
Member

Thanks! It definitely makes sense to document this better. We can cite the API, I think. Maybe we could link to https://api.r-hub.io/rversions/#/paths/~1resolve~1:version~1:os~1:arch/get which explicitly lists the possibilities?

@gaborcsardi
Copy link
Member

Although here, in actions more formats are allowed AFAIR. You can probably also write 4.4.x explicitly.

@MichaelChirico
Copy link
Contributor Author

more formats are allowed AFAIR

Is there a big benefit to that flexibility, or it's just for back-compatibility?

@MichaelChirico
Copy link
Contributor Author

https://api.r-hub.io/rversions/#/paths/~1resolve~1:version~1:os~1:arch/get

This URL feels fragile? ~1resolve~1:version~1:os~1:arch/get looks subject to change. Is there a way to make it more permanently anchored, or perhaps we just link to https://api.r-hub.io/rversions and that's enough?

@MichaelChirico
Copy link
Contributor Author

Oh, I see, ~1resolve~1:version~1:os~1:arch/get translates to the endpoint description on the RHS /resolve/:version/:os/:arch. I guess that is more stable than I thought. Still not the most appealing to look at :)

@gaborcsardi gaborcsardi changed the title Cite r-hub API [setup-r]: better document 'r-version' parameter Nov 9, 2024
@gaborcsardi gaborcsardi requested a review from jeroen November 9, 2024 09:10
@gaborcsardi
Copy link
Member

Closes #935.

Copy link
Member

@jeroen jeroen left a comment

Choose a reason for hiding this comment

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

Thanks, great improvement

@gaborcsardi gaborcsardi merged commit 9073210 into r-lib:v2-branch Nov 9, 2024
26 checks passed
@gaborcsardi
Copy link
Member

@jeroen Thanks!

@MichaelChirico MichaelChirico deleted the patch-1 branch November 14, 2024 23:29
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 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