Skip to content

node:http2 no-auto links omit create/connect helper archive #4275

@andrewtdiz

Description

@andrewtdiz

Summary

Current main has a no-auto link gap for emitted node:http2 helper calls. Export-only http2 fixtures compile and run, but fixtures that call http2.createServer() or http2.connect() fail during native linking because the generated object references http2 FFI symbols that are not pulled into the no-auto link.

Evidence

Baseline: current origin/main at bfc4cf622.

Focused no-auto module run:

PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc 'node --version; ./run_parity_tests.sh --suite node-suite --module http2'
node v26.3.0
Parity Pass:   3
Parity Fail:   0
Compile Fail:  5

Compile-failing fixtures:

  • node-suite/http2/plaintext/loopback-streams
  • node-suite/http2/server/empty-secure-options
  • node-suite/http2/server/node-prefix
  • node-suite/http2/session/controls
  • node-suite/http2/settings/settings-helpers

Direct compile of test-parity/node-suite/http2/session/controls.ts shows the missing symbols:

undefined reference to `js_node_http2_connect'
undefined reference to `js_node_http2_create_server'
collect2: error: ld returned 1 exit status
Error: Linking failed

A pure export/value fixture does link and run under the same no-auto setting:

PERRY_NO_AUTO_OPTIMIZE=1 target/release/perry test-parity/node-suite/http2/module-exports.ts -o /tmp/perry_http2_module_exports && /tmp/perry_http2_module_exports
# succeeds and prints the constants/sensitiveHeaders shape

Proposed narrow scope

I am taking this as a focused compile/link slice:

  • ensure emitted js_node_http2_* runtime helper symbols select the owning http2 extension archive in no-auto links;
  • add focused coverage for the owner/link-selection mapping;
  • validate the current http2 compile-failing fixtures no longer fail to link.

Non-goals: HTTP/2 runtime behavior changes, TLS behavior, broader node:http/http/https link handling, or parity output mismatches after the fixtures become measurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions