Skip to content

[Java] Add darwin-x64 native runtime support - #2429

Merged
edburns merged 2 commits into
edburns/java-add-darwin-x64from
copilot/edburnsjava-add-darwin-x64
Aug 27, 2026
Merged

[Java] Add darwin-x64 native runtime support#2429
edburns merged 2 commits into
edburns/java-add-darwin-x64from
copilot/edburnsjava-add-darwin-x64

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Adds Intel macOS support to Java native runtime packaging and in-process testing, following the existing per-platform classifier model.

  • Packaging

    • Add host-activated darwin-x64 Maven profiles.
    • Package and attach the @github/copilot-darwin-x64 runtime classifier.
    • Include darwin-x64 in publication assembly and completeness validation.
  • Validation

    • Validate Intel macOS hosts and reject architecture mismatches.
    • Cover native fetching, artifact contents, and local publication.
  • CI and documentation

    • Add darwin-x64 to the java-sdk-inprocess matrix using macos-15-intel.
    • Build and verify the classifier in the native publication workflow.
    • Document Intel and Apple Silicon macOS support.

Copilot AI linked an issue Aug 27, 2026 that may be closed by this pull request
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for darwin-x64 in Java [Java] Add darwin-x64 native runtime support Aug 27, 2026
Copilot AI requested a review from edburns August 27, 2026 18:24
@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds Intel macOS (darwin-x64) native runtime support to the Java SDK only. After reviewing the changes, no cross-SDK consistency issues were found.

Why no other SDKs need updating:

The changes are entirely Java-specific infrastructure:

  • Maven profiles and packaging for darwin-x64 native binaries
  • Native artifact validation and CI matrix expansion
  • Documentation updates scoped to Java

The Java SDK's native runtime bundling model (using platform classifiers and Maven profiles to ship the Copilot CLI binary) is unique to the JVM ecosystem. The other SDKs (Node.js, Python, Go, .NET, Rust) use different mechanisms to locate the CLI and do not have an equivalent "native bundling" layer that would need a matching darwin-x64 addition.

No action needed in other SDK implementations.

Generated by SDK Consistency Review Agent for #2429 · sonnet46 17.2 AIC · ⌖ 8.2 AIC · ⊞ 6.6K ·

@edburns
edburns marked this pull request as ready for review August 27, 2026 21:38
@edburns
edburns requested a review from a team as a code owner August 27, 2026 21:38
Copilot AI balanced review requested due to automatic review settings August 27, 2026 21:38
@edburns
edburns merged commit 89097c8 into edburns/java-add-darwin-x64 Aug 27, 2026
38 checks passed
@edburns
edburns deleted the copilot/edburnsjava-add-darwin-x64 branch August 27, 2026 21:39

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

Adds Intel macOS native runtime support to the Java SDK.

Changes:

  • Adds darwin-x64 packaging, host validation, and tests.
  • Extends CI and local publication validation.
  • Documents Intel macOS support.
Show a summary per file
File Description
.github/workflows/java-sdk-tests.yml Adds Intel macOS testing and publication validation.
java/README.md Documents darwin-x64 support.
java/copilot-native/pom.xml Packages and attaches the classifier.
java/copilot-native/scripts/fetch-native.test.mjs Tests fetching behavior.
java/copilot-native/scripts/validate-local-publication.mjs Requires the classifier in local publications.
java/copilot-native/scripts/validate-native-artifact.test.mjs Tests classifier artifacts.
java/copilot-native/scripts/validate-native-host.mjs Validates Intel macOS hosts.
java/copilot-native/scripts/validate-native-host.test.mjs Tests host validation.
java/docs/adr/adr-007-native-bundling-strategy.md Updates platform and publication scope.
java/sdk/pom.xml Selects the classifier on Intel macOS.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Balanced

The platform detector recognizes the 8 classifiers listed in this ADR. The Maven build binds native packaging only for a host matching an implemented classifier. Linux x64 and ARM64 glibc hosts can opt in with `copilot.native.libc=glibc`, while Windows x64, Windows ARM64, Intel macOS, and Apple Silicon macOS hosts package `win32-x64`, `win32-arm64`, `darwin-x64`, or `darwin-arm64` automatically. The `inprocess` test profile selects the matching implemented classifier automatically on all six hosts. Every path validates the host before downloading or packaging native files. Linux musl and other unsupported hosts build only the OS-neutral placeholder, sources, and Javadoc artifacts unless they explicitly request in-process tests, which fail during host validation. Additional classifier artifacts remain follow-up work.

Maven Central release and snapshot workflows build each classifier on its matching native host from the same immutable source. The Linux ARM64, Windows x64, Windows ARM64, and macOS jobs each upload only their verified classifier and checksum manifest. The Ubuntu x64 job verifies and attaches all four, builds `linux-x64` with the glibc opt-in, and performs the only Maven deployment. Release signing therefore covers the neutral artifacts and all five classifiers in one deployment.
Maven Central release and snapshot workflows build each classifier on its matching native host from the same immutable source. The Linux ARM64, Windows x64, Windows ARM64, Intel macOS, and Apple Silicon macOS jobs each upload only their verified classifier and checksum manifest. The Ubuntu x64 job verifies and attaches all five, builds `linux-x64` with the glibc opt-in, and performs the only Maven deployment. Release signing therefore covers the neutral artifacts and all six classifiers in one deployment.
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.

[Java] Add support for darwin-x64

3 participants