Skip to content

Commit

Permalink
[setup-r]: macOS: unlink pre-installed pkg-config (#953)
Browse files Browse the repository at this point in the history
* Add debug to R-devel workflow

[ci skip]

* Include brew output

[ci skip]

* macOS: try to unlink pre-installed pkg-config

It conflicts with the new pkgconf version that
we are trying to install, and which should be
the default going forward.

#948

* Update NEWS

* Update npm deps for setup-r

Removed source map, for CodeQL.
I can't please it otherwise...

* Still need older ncc

Hopefully this'll be enough.

* Patch generated file manually

Wow.

* Hand-edit generated file for CodeQL
  • Loading branch information
gaborcsardi authored Nov 25, 2024
1 parent e8c6069 commit 473c681
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 79 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/r-devel-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-14, r: 'devel'}
- {os: macos-15, r: 'devel'}
- {os: macos-latest, r: 'devel'}
- {os: windows-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
Expand All @@ -36,6 +36,8 @@ jobs:
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- uses: r-hub/actions/debug-shell@v1

- uses: ./setup-pandoc

- uses: ./setup-r
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# `v2.11.1` (2024-11-25)

* `[setup-r]` now unlinks the pre-installed pkg-config brew package
to fix a clash with the new pkgconf package (#948).

# `v2.11.0` (2024-11-09)

* `[setup-r-dependencies]` parameter `pak-version` can now be `repo` or
Expand Down
7 changes: 3 additions & 4 deletions setup-r/dist/index.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion setup-r/dist/index.js.map

This file was deleted.

1 change: 0 additions & 1 deletion setup-r/dist/sourcemap-register.js

This file was deleted.

114 changes: 45 additions & 69 deletions setup-r/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions setup-r/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "R setup action",
"main": "src/setup-r.ts",
"scripts": {
"build": "ncc build --source-map --minify",
"build": "ncc build --minify",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts"
},
Expand Down Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@types/node": "^20.12.10",
"prettier": "^3.2.5",
"@vercel/ncc": "^0.38.1",
"@vercel/ncc": "^0.37.x",
"typescript": "^5.4.5"
}
}
13 changes: 12 additions & 1 deletion setup-r/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ async function acquireFortranMacOSOld(): Promise<string> {

async function acquireUtilsMacOS() {
// qpdf is needed by `--as-cran`
// https://github.com/r-lib/actions/issues/948
try {
process.env.HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK = "true";
await exec.exec(
"brew",
[ "unlink", "[email protected]" ],
{ silent: false }
);
} catch (error) {
// ignore error, in case it is not pre-installed in the future
}
try {
process.env.HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK = "true";
await exec.exec("brew", [
Expand All @@ -258,7 +269,7 @@ async function acquireUtilsMacOS() {
"pkgconfig",
"checkbashisms",
"ghostscript",
], { silent: true });
], { silent: false });
} catch (error) {
core.debug(`${error}`);

Expand Down

0 comments on commit 473c681

Please sign in to comment.