Skip to content

Add Node.js 22+ support with Debian Forky#622

Draft
josead wants to merge 10 commits into
developfrom
feature/nodejs-22-support
Draft

Add Node.js 22+ support with Debian Forky#622
josead wants to merge 10 commits into
developfrom
feature/nodejs-22-support

Conversation

@josead

@josead josead commented Feb 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Change default base image from debian:trixie-slim to debian:forky-slim which provides Node.js 22+
  • Add ICU 75.1 version mapping for Node.js 22+ in CMake configuration (for building Node.js from source)
  • Update documentation to reflect supported Node.js versions (>= 18.x.x)
  • Add debian:forky-slim to CI test matrix for both regular and sanitizer tests
  • Remove discontinued Alpine Linux support from comments

Test plan

  • Run ./docker-compose.sh build with METACALL_BASE_IMAGE=debian:forky-slim
  • Run ./docker-compose.sh test to verify all tests pass
  • Verify Node.js version is 22+ in the container
  • Check that LLVM/C loader works (Vicente mentioned potential issues)

Files changed

  • .env - Default base image updated
  • cmake/FindNodeJS.cmake - ICU version for Node.js 22+
  • docs/README.md - Updated version documentation
  • .github/workflows/linux-test.yml - CI matrix updated

Notes

  • macOS already supports Node.js 22 via Homebrew and pre-built libnode binaries
  • Windows support remains at Node.js 14.18.2 (out of scope for this PR)
  • Alpine Linux support is discontinued

🤖 Generated with Claude Code

josead and others added 3 commits February 4, 2026 19:34
- Change default base image from debian:trixie-slim to debian:forky-slim
  which provides Node.js 22+
- Add ICU 75.1 version mapping for Node.js 22+ in CMake configuration
- Update documentation to reflect supported Node.js versions (>= 18.x.x)
- Add debian:forky-slim to CI test matrix
- Remove discontinued Alpine Linux support from comments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add forky codename to libcurl4t64 package check in metacall-runtime.sh
- Add forky codename to libdw1t64/libelf1t64 package check in metacall-runtime.sh
- Add forky codename to LLVM repository URL selection in metacall-environment.sh
  (uses unstable repo since apt.llvm.org doesn't have forky-specific packages yet)

These changes ensure Debian Forky (which provides Node.js 22+) can properly
install runtime dependencies with the correct package names that changed
in newer Debian versions (t64 suffix for 64-bit time_t transition).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Revert LLVM forky changes (will be done in separate PR)
- Restore Alpine comment in .env (support planned for future)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@josead josead requested a review from viferga February 4, 2026 23:26
josead and others added 2 commits February 4, 2026 20:52
- Use native Debian packages for libclang/clang-format on trixie/forky
  instead of LLVM apt repo (LLVM GPG key uses SHA1 which is rejected
  by newer Debian versions as of 2026-02-01)
- Enable CMAKE_POSITION_INDEPENDENT_CODE for backward-cpp to fix
  linking error when building backtrace_plugin shared library

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Debian forky ships with LLVM 21 as the default, and trixie ships with
LLVM 17-19. Update the search version list to find these newer versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@josead josead force-pushed the feature/nodejs-22-support branch from f83792d to 999d78f Compare February 5, 2026 11:50
The C loader has type resolution bugs with libclang 17+ where typedef
types (e.g., `typedef int yeet;`) are not correctly resolved, causing
function returns to be interpreted as THROWABLE instead of INT.

This affects both libclang-18 and libclang-19 on Debian trixie/forky.
The C loader previously worked with libclang-14 from the LLVM apt repo,
but that repository's GPG key uses SHA1 which is now rejected.

Temporarily skip C loader installation on trixie/forky until the
underlying compatibility issue is resolved.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@josead josead force-pushed the feature/nodejs-22-support branch from 999d78f to 789b684 Compare February 5, 2026 16:15
josead and others added 4 commits February 5, 2026 13:51
Change SEND_ERROR to WARNING for LibFFI, LibClang, and LibTCC
dependency checks. This allows the build to continue when these
dependencies are not available (e.g., on Debian trixie/forky where
we skip libclang installation due to compatibility issues).

Also reorder checks to check LibClang before LibTCC, since LibTCC
installation takes time and there's no point installing it if
LibClang is missing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… crash

Install libclang-dev alongside libffi-dev on trixie/forky so Rust
bindgen can find libclang (the C loader is still skipped). Add
PASS_REGULAR_EXPRESSION workaround for metacall-python-port-test
under address sanitizer, matching the pattern used by other tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The clang type-to-metacall type mapping in c_loader_impl_clang_type()
was missing cases for CXType_Long, CXType_ULong, CXType_LongLong,
CXType_ULongLong, CXType_Float, CXType_Double, and CXType_LongDouble.
These types fell through to default returning TYPE_INVALID, causing
functions returning long/float/double to produce wrong values at runtime.
This was the root cause of metacall-c-test failures on Debian trixie/forky
where libclang 19 resolves int return types as CXType_Long (type id 18).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Debian trixie/forky, the C loader has type resolution bugs with
libclang 17+ that cause test failures. The previous fix (01bfc86)
restored libclang-dev in sub_c()'s trixie/forky block, which caused
find_package(LibClang) to succeed and the C loader to be built.

Move libclang-dev installation to sub_rust() so that:
- Rust bindgen can still find libclang headers
- The C loader's CMake find_package(LibClang) fails in sub_c()
- The C loader gracefully skips (per commit 68720ce)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant