-
Notifications
You must be signed in to change notification settings - Fork 39
fix: static native linux build (musl) #1568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dae32de to
86f567a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1568 +/- ##
==========================================
- Coverage 39.84% 39.82% -0.02%
==========================================
Files 769 769
Lines 37010 37011 +1
Branches 5230 5232 +2
==========================================
- Hits 14745 14740 -5
- Misses 20499 20503 +4
- Partials 1766 1768 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Fixes: #1439 Signed-off-by: Sam Gammon <sam@elide.dev>
86f567a to
35fa343
Compare
There was a problem hiding this comment.
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 fixes the static native Linux build targeting musl by addressing JNI library loading compatibility issues. The changes ensure that static builds can properly handle native library dependencies without attempting to dynamically load libraries that aren't available in the static context.
- Adds conditional logic to skip JNI library loading when running in static mode
- Updates native library resolution to respect the
elide.staticJnisystem property - Prevents web and media builder features from attempting library loads during static builds
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| NativeLibraries.kt | Adds static JNI detection and conditional library loading logic |
| WebBuilderFeature.kt | Adds early return for static JNI builds to skip library loading |
| MediaBuilderFeature.kt | Adds early return for static JNI builds to skip library loading |
| WebBuilder.kt | Removes unnecessary synchronization around library loading |
packages/engine/src/main/kotlin/elide/runtime/core/lib/NativeLibraries.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Summary
At one point our musl-targeted Linux build was broken by upstream stuff; in the intervening time, we made changes which made us further incompatible with a static target. Upstream fixed their thing, and now we need to propagate fixes downstream to re-enable the static Linux native build.
As a result, this PR is small, because it only accounts for our own errors on that path. Between this and the GVM update in the last PR, our static musl build works smoothly again.