Skip to content

Commit 3993c72

Browse files
schloerkecpsievert
authored andcommitted
Revert Windows pak adjustments; Add debug step (#305)
1 parent 3d0d96c commit 3993c72

File tree

5 files changed

+33
-32
lines changed

5 files changed

+33
-32
lines changed

.github/internal/install-shinyverse/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ runs:
4848
http-user-agent: ${{ inputs.http-user-agent }}
4949
pandoc-version: ${{ inputs.pandoc-version }}
5050
extra-packages: ${{ inputs.extra-packages }}
51+
pak-version: "devel"
5152

5253
- name: Get packages for macOS system dependencies
5354
if: runner.os == 'macOS'

.github/workflows/apps-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
value: "ubuntu-latest"
2020
cache-version:
2121
description: cache-version to be used when pulling library cache
22-
value: "8"
22+
value: "13"
2323
devel:
2424
description: Resolved r devel version
2525
# When R 4.3 was released, R version 4.4.0 was not recognized.

.github/workflows/apps-test-os.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
- name: Set up JDK 11
5151
uses: actions/setup-java@v3
5252
with:
53-
distribution: 'temurin'
54-
java-version: '11'
53+
distribution: "temurin"
54+
java-version: "11"
5555

5656
- name: Windows git setup
5757
if: runner.os == 'Windows'
@@ -135,7 +135,7 @@ jobs:
135135
cat("name=gha-", '${{ steps.failed_branch.outputs.name }}', '-', '${{ steps.short.outputs.r-version }}', '-', '${{ runner.os }}', "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
136136
137137
- name: Use chrome-headless-shell@latest-stable
138-
id: setup_chromote
138+
id: setup_chromote
139139
shell: Rscript {0}
140140
run: |
141141
path <- chromote::chrome_versions_add("latest-stable", binary = "chrome-headless-shell")
@@ -193,6 +193,11 @@ jobs:
193193
)
194194
shinycoreci::assert_test_output(test_output)
195195
196+
# > If the workflow run is a re-run, with debugging enabled, then it opens a tmate shell that you can ssh into for interactive debugging.
197+
- uses: r-hub/actions/debug-shell@v1
198+
if: always()
199+
with:
200+
connect-timeout-seconds: "300"
196201
- name: Remove R options file
197202
if: always()
198203
shell: bash

R/install-path.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on_ci <- function() {
77
#' @keywords internal
88
resolve_libpath <- function(..., local_pkgs = FALSE) {
99
stopifnot(length(list(...)) == 0)
10+
11+
# If running on CI, use the default libpath.
12+
# No need to keep a separate library for local testing
13+
if (on_ci()) {
14+
return(.libPaths()[1])
15+
}
16+
1017
# If using local_pkgs, use the standard libpath location
1118
libpath <- if (isTRUE(local_pkgs)) .libPaths()[1] else shinycoreci_libpath()
1219
libpath

R/install.R

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -230,41 +230,29 @@ install_pkgs_with_callr <- function(
230230
) {
231231
stopifnot(length(list(...)) == 0)
232232
callr::r(
233-
function(repos_option, packages, upgrade, dependencies, is_windows) {
233+
function(repos_option, packages, upgrade, dependencies) {
234234
options(repos = repos_option)
235235

236-
if (is_windows) {
237-
message(
238-
"Installing packages with install.packages(): ",
239-
paste0(packages, collapse = ", ")
240-
)
241-
# Throw if any installation produces a warning
242-
# Ex: In install.packages(packages) : installation of package 'terra' had non-zero exit status
243-
options(warn = 2)
244-
install.packages(packages)
245-
} else {
246-
# Performing a leap of faith that pak is installed.
247-
# Avoids weird installs when using pak to install shinycoreci
248-
stopifnot(utils::packageVersion("pak") >= "0.3.0")
249-
pak__pkg_install <- utils::getFromNamespace("pkg_install", "pak")
250-
message(
251-
"Installing packages with pak::pkg_install(): ",
252-
paste0(packages, collapse = ", ")
253-
)
254-
pak__pkg_install(
255-
packages,
256-
ask = FALSE, # Not interactive, so don't ask
257-
upgrade = upgrade,
258-
dependencies = dependencies
259-
)
260-
}
236+
# Performing a leap of faith that pak is installed.
237+
# Avoids weird installs when using pak to install shinycoreci
238+
stopifnot(utils::packageVersion("pak") >= "0.3.0")
239+
pak__pkg_install <- utils::getFromNamespace("pkg_install", "pak")
240+
message(
241+
"Installing packages with pak::pkg_install(): ",
242+
paste0(packages, collapse = ", ")
243+
)
244+
pak__pkg_install(
245+
packages,
246+
ask = FALSE, # Not interactive, so don't ask
247+
upgrade = upgrade,
248+
dependencies = dependencies
249+
)
261250
},
262251
list(
263252
repos_option = shinyverse_repos_option(),
264253
packages = packages,
265254
upgrade = upgrade,
266-
dependencies = dependencies,
267-
is_windows = is_windows()
255+
dependencies = dependencies
268256
),
269257
show = TRUE,
270258
libpath = libpath,

0 commit comments

Comments
 (0)