Skip to content

node:http radar (#800) under PERRY_NO_AUTO_OPTIMIZE strips ext-http-server; symbol stubs mask real failures #2156

Closed

Description

@proggeramlug

Summary

scripts/node_core_subset.py runs every test with PERRY_NO_AUTO_OPTIMIZE=1 (set unconditionally at script line ~262). That disables build_optimized_libs, which is what triggers the well-known-bindings flip that pulls perry-ext-http-server (and friends) onto the link line.

Without the flip, symbols like js_node_http_create_server / js_node_http_server_listen / js_node_http_server_address_json fall to the symbol-stub-generator in compile.rs, which emits a stub that returns undefined. The compile succeeds, the test runs, and http.createServer().listen(...) fails at runtime with undefined.listen.

This is partly why #2129's radar attributes 15 failures to the server-listen cluster — many of those programs would compile and run normally with --auto-optimize enabled.

Options

  1. Drop PERRY_NO_AUTO_OPTIMIZE=1 from the runner. Trade-off: per-test rebuilds are 10–30s on a cold cache, so the http subset would go from ~5 min to ~1 hr without the flag. Realistic if scoped to specific APIs.
  2. Pre-warm target/perry-auto-<hash> for each API's required feature set before the loop, then drop the flag for that API only.
  3. Pre-link the ext crates into libperry_stdlib.a so the flag becomes safe even without auto-optimize (would inflate the prebuilt stdlib size considerably).

Probably (2) is the right trade-off — it preserves the radar's wall-time goal while not lying about which features are reachable.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions