Skip to content

Return package URL from .ps.rpc.pkg_list#1261

Open
bricestacey wants to merge 3 commits into
mainfrom
13890/package-url
Open

Return package URL from .ps.rpc.pkg_list#1261
bricestacey wants to merge 3 commits into
mainfrom
13890/package-url

Conversation

@bricestacey

Copy link
Copy Markdown
Contributor

.ps.rpc.pkg_list now returns a url field for each installed package,
taken from the first entry of its DESCRIPTION URL field (conventionally
the package's canonical website). The field is omitted when a package
advertises no URL.

This feeds the new external-link button in Positron's Packages pane, which
validates the scheme before opening. Multiple / labeled links (repository,
issues, etc.) are left for a future change.

See posit-dev/positron#13890

Add a `url` field to each package returned by the packages-pane RPC,
taken from the first entry of the DESCRIPTION URL field (conventionally
the package's canonical website). Positron's Packages pane renders an
external-link button from it and validates the scheme before opening.

See posit-dev/positron#13890

@jennybc jennybc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

I made a minor stylistic suggestion that leans more into letting NA do its job (indicating missing data), but this isn't a big deal.

I would have thought sending back the same shape all the time might be useful (so always sending url even if it's empty), but having an optional url must be better on the other side.

For any package that is on CRAN, if DESCRIPTION doesn't list a URL, you could fallback to https://cran.r-project.org/package={package}, but then you'd have to determine if it's on CRAN or not, which is extra work. But if you already have easy access to this info, this is an idea.

Comment thread crates/ark/src/modules/positron/packages_pane.R Outdated
Comment thread crates/ark/src/modules/positron/packages_pane.R Outdated
bricestacey and others added 2 commits June 10, 2026 14:30
Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants