Skip to content

os: allow static dispatch for availableParallelism / machine / version / endianness (compile fail in parity suite) #1318

Description

@TheHypnoo

The expanded node-suite from #1315 includes test-parity/node-suite/os/methods/modern-methods.ts, which iterates [\"availableParallelism\", \"machine\", \"version\", \"endianness\"] via dynamic namespace dispatch (os[name]()). Perry intentionally blocks dynamic stdlib namespace dispatch as a safety guard, so the test currently fails to compile.

Options:

  1. Rewrite the test as explicit static calls (os.availableParallelism(), etc.) — keeps the safety guard intact.
  2. Add a narrow allow-list / opt-in pattern for known-safe stdlib namespaces.

Recommendation: option 1, since the other modern methods are already covered statically and the dynamic shape isn't the property under test.

Tracker: part of #793.

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