Skip to content

fix: Do not treat installed packages as dev packages - #452

Merged
schloerke merged 7 commits into
mainfrom
issue-451
Oct 21, 2026
Merged

schloerke merged 7 commits into
mainfrom
issue-451

Conversation

@schloerke

@schloerke schloerke commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #451.

dev_pkg_path() used pkgload::pkg_path(), which also matches installed packages because they have a DESCRIPTION file. When tests run via testthat::test_package(), the working directory is inside the installed package, so AppDriver replaced library(<pkg>) with pkgload::load_all() on the installed folder and got an empty namespace.

dev_pkg_path() now returns NULL when Meta/package.rds exists (only installed packages have it), and dev_pkg_name() follows dev_pkg_path(). The reprex from the issue fails before this change and passes after; new tests are in tests/testthat/test-pkg.R.

CI: Linux jobs were failing because pak added the ppa:xtradeb/apps Launchpad PPA to install Chromium, and the PPA often returns 503. rstudio/r-system-requirements#270 skips that install when Chrome is already present, but pak reads its rules from r-hub/r-system-requirements, which doesn't have it yet. .github/shiny-workflows/package-install.sh and test-actions.yaml set R_PKG_SYSREQS_GIT_REPO_URL so pak reads the upstream rules. TODO: remove both once r-hub/r-system-requirements#4 is merged.

…g them

pak reads rules from r-hub/r-system-requirements, which doesn't have
rstudio/r-system-requirements#270 yet. Read them from upstream, so pak
skips the Launchpad Chromium install when Chrome is already on the runner.
@schloerke
schloerke disabled auto-merge October 21, 2026 19:21
@schloerke
schloerke merged commit ffc9a48 into main Oct 21, 2026
18 checks passed
@schloerke
schloerke deleted the issue-451 branch October 21, 2026 19:31
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.

AppDriver runs pkgload::load_all() on the installed package when tests run via testthat::test_package()

1 participant