Skip to content

Conversation

@darvld
Copy link
Member

@darvld darvld commented Sep 26, 2025

Draft Powered by Pull Request Badge

Summary

This PR fixes #1670 and restores minimal functionality to Elide's HTTP server intrinsics:

  • New GraalVM Context instances are now correctly attached to an Engine. This behavior is disabled by default when acquiring a new context from a CLI command using resolvePolyglotContext(), to avoid breaking existing code; it can be enabled by passing detached = false.
  • The NettyHttpResponse.from(...) builder function now returns a new empty mutable response; it was previously unimplemented.

In general, the serve command should now work again, though some features are still unimplemented (coming soon).

Important

The old express intrinsics are no longer available, Elide.http should be used instead. Support for express-like APIs and a drop-in express.js replacement may be added in the near future.

@darvld darvld self-assigned this Sep 26, 2025
@darvld darvld added bug Something isn't working module:graalvm Modules, changes, and issues relating to GraalVM module:server Modules, changes, and issues relating to Elide for servers module:cli CLI module issues and features P0 labels Sep 26, 2025
@darvld darvld marked this pull request as ready for review September 26, 2025 20:33
@darvld darvld requested a review from sgammon as a code owner September 26, 2025 20:33
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 38.46154% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.62%. Comparing base (b297182) to head (1c6db1f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../intrinsics/server/http/internal/PipelineRouter.kt 0.00% 3 Missing ⚠️
...c/main/kotlin/elide/tool/cli/AbstractSubcommand.kt 75.00% 1 Missing ⚠️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 0.00% 1 Missing ⚠️
...c/main/kotlin/elide/runtime/core/PolyglotEngine.kt 50.00% 1 Missing ⚠️
...de/runtime/core/internals/graalvm/GraalVMEngine.kt 50.00% 0 Missing and 1 partial ⚠️
.../intrinsics/server/http/netty/NettyHttpResponse.kt 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1671   +/-   ##
=======================================
  Coverage   40.62%   40.62%           
=======================================
  Files         798      798           
  Lines       37774    37769    -5     
  Branches     5385     5382    -3     
=======================================
+ Hits        15344    15345    +1     
+ Misses      20606    20600    -6     
  Partials     1824     1824           
Flag Coverage Δ
jvm 40.62% <38.46%> (+<0.01%) ⬆️
lib 40.62% <38.46%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...c/main/kotlin/elide/tool/cli/cmd/dev/LspCommand.kt 1.54% <ø> (ø)
...c/main/kotlin/elide/tool/cli/AbstractSubcommand.kt 57.39% <75.00%> (-0.06%) ⬇️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 30.51% <0.00%> (ø)
...c/main/kotlin/elide/runtime/core/PolyglotEngine.kt 66.66% <50.00%> (ø)
...de/runtime/core/internals/graalvm/GraalVMEngine.kt 50.35% <50.00%> (ø)
.../intrinsics/server/http/netty/NettyHttpResponse.kt 0.00% <0.00%> (ø)
.../intrinsics/server/http/internal/PipelineRouter.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b297182...1c6db1f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
@sgammon sgammon merged commit 19b71ed into main Sep 26, 2025
17 checks passed
darvld added a commit that referenced this pull request Sep 26, 2025
@sgammon sgammon mentioned this pull request Oct 30, 2025
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working module:cli CLI module issues and features module:graalvm Modules, changes, and issues relating to GraalVM module:server Modules, changes, and issues relating to Elide for servers P0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WSL 1.0.0-beta9: elide serve --code throws NullPointerException (Graal PolyglotContextImpl)

3 participants