Skip to content

fix: Restore backward compatibility down to macOS 11.0#2368

Open
dividedmind wants to merge 2 commits into
mainfrom
fix/macos-11-compat
Open

fix: Restore backward compatibility down to macOS 11.0#2368
dividedmind wants to merge 2 commits into
mainfrom
fix/macos-11-compat

Conversation

@dividedmind

Copy link
Copy Markdown
Collaborator

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 pkg targets from node24-* to node22-* for @appmap/scanner and @appmap/cli.
  • Update the native build wrapper script to build Node 22 pkg targets.
  • Set MACOSX_DEPLOYMENT_TARGET=11.0 in 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.

@dividedmind dividedmind added the build native Build and save native packages in the GitHub workflow label Jun 26, 2026
@dividedmind dividedmind requested a review from Copilot June 26, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-output command to set step outputs. GitHub Actions has moved to $GITHUB_OUTPUT, and continued use of ::set-output risks 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)"

Comment thread .github/workflows/build-native.yml Outdated
Comment thread .github/workflows/build-native.yml Outdated
Comment thread .github/actions/setup-node/action.yml
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.
@dividedmind dividedmind force-pushed the fix/macos-11-compat branch from b290ae4 to 6f26f51 Compare June 26, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build native Build and save native packages in the GitHub workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants