fix: Restore backward compatibility down to macOS 11.0#2368
Open
dividedmind wants to merge 2 commits into
Open
fix: Restore backward compatibility down to macOS 11.0#2368dividedmind wants to merge 2 commits into
dividedmind wants to merge 2 commits into
Conversation
Downgrade the pkg target from Node 24 to Node 22 to prevent dynamic linking failures on older macOS versions due to missing libc++ symbols (specifically `__libcpp_verbose_abort` introduced in Node 24's toolchain). Also configure MACOSX_DEPLOYMENT_TARGET to 11.0 in GHA build-native workflows to guarantee that compiled native modules (like better-sqlite3) are fully compatible with older macOS environments down to Big Sur.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores macOS backward compatibility for the packaged CLI/scanner binaries by downgrading the pkg runtime target from Node 24 to Node 22 and ensuring macOS builds compile with a Big Sur (11.0) deployment target in GitHub Actions.
Changes:
- Downgrade
pkgtargets fromnode24-*tonode22-*for@appmap/scannerand@appmap/cli. - Update the native build wrapper script to build Node 22
pkgtargets. - Set
MACOSX_DEPLOYMENT_TARGET=11.0in macOS build-native workflow jobs.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/scanner/package.json | Switch pkg.targets from Node 24 to Node 22 for scanner binaries. |
| packages/cli/package.json | Switch pkg.targets from Node 24 to Node 22 for CLI binaries. |
| packages/cli/bin/build-native | Update pkg target selection to Node 22 for native builds. |
| .github/workflows/build-native.yml | Export MACOSX_DEPLOYMENT_TARGET=11.0 for macOS build jobs to improve compatibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.github/workflows/main.yml:32
- This workflow still uses the deprecated
::set-outputcommand to set step outputs. GitHub Actions has moved to$GITHUB_OUTPUT, and continued use of::set-outputrisks breaking this step as the runner deprecations progress.
node-version: 22
- name: Detect Yarn cache dir
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Update GitHub Actions setup-node configurations from `lts/*` to `22` across main.yml, build-native.yml, and the setup-node composite action. This aligns the build-time host environment with the target packaged Node 22 runtime, preventing native addon ABI mismatches (NODE_MODULE_VERSION 137 vs 127) when loading better-sqlite3 during native binary tests. Also, sdd explicit inline comments across build-native scripts, GHA setup-node actions, and workflows detailing the requirement that the host build Node version must remain synchronized with the target packaged Node version. This ensures future Node version upgrades do not accidentally introduce native addon ABI version mismatches (e.g., with better-sqlite3). Also document the purpose of configuring MACOSX_DEPLOYMENT_TARGET to 11.0 to maintain backward compatibility with older macOS libc++ versions.
b290ae4 to
6f26f51
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Downgrade the pkg target from Node 24 to Node 22 to prevent dynamic linking failures on older macOS versions due to missing libc++ symbols (specifically
__libcpp_verbose_abortintroduced in Node 24's toolchain).Also configure MACOSX_DEPLOYMENT_TARGET to 11.0 in GHA build-native workflows to guarantee that compiled native modules (like better-sqlite3) are fully compatible with older macOS environments down to Big Sur.