Skip to content

os.constants.UV_UDP_REUSEADDR missing (follow-up to #649) #682

Description

@proggeramlug

Repro

import * as os from "node:os";
console.log("UV_UDP_REUSEADDR:", os.constants.UV_UDP_REUSEADDR);
console.log("signals.SIGINT:", os.constants.signals?.SIGINT);
console.log("dlopen.RTLD_LAZY:", os.constants.dlopen?.RTLD_LAZY);
console.log("priority.PRIORITY_NORMAL:", os.constants.priority?.PRIORITY_NORMAL);

Actual (Perry)

UV_UDP_REUSEADDR: undefined
signals.SIGINT: 2
dlopen.RTLD_LAZY: 1
priority.PRIORITY_NORMAL: 0

Expected (Node)

UV_UDP_REUSEADDR: 4
signals.SIGINT: 2
dlopen.RTLD_LAZY: 1
priority.PRIORITY_NORMAL: 0

Impact

Tiny standalone gap left over from #649. The three nested-namespace tables (signals, errno, priority, dlopen) were populated correctly, but os.constants.UV_UDP_REUSEADDR (a top-level constant directly on constants, not inside a nested table) was missed.

Used by code that constructs UDP sockets with SO_REUSEADDR opt — dgram.createSocket({ type: 'udp4', reuseAddr: true }) is the high-level form, but lower-level libraries inline os.constants.UV_UDP_REUSEADDR into option bags.

This is the ONLY remaining os.constants divergence in test-files/test_parity_os.ts — the parity diff is otherwise 1 line off Node. Fix this and test_parity_os reaches full byte-for-byte parity.

Acceptance

The 5-line repro prints UV_UDP_REUSEADDR: 4 matching Node.

Related

Follow-up to #649 (closed). Surfaced via test-files/test_parity_os.ts (diff size = 2, second-smallest in the parity suite).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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