ReviewOS

home-lang/home

home-tool: restore Environment compatibility identity in default build

#677
Closed chris opened this 9 days ago ·
9 days ago

Follow-up discovered while validating #676 on current main.

zig build -j1 fails in the separate home-tool target:

packages/runtime/src/jsc/process.zig:48:26: error: root source file struct 'tool_compat' has no member named 'Environment'
const node_version = bun.Environment.reported_nodejs_version;
                         ^~~~~~~~~~~

The runtime-only zig build debug -j1 and zig build release-fast -j1 targets remain green, so this is not caused by the Blob copy changes in #676. process.zig now consumes the centralized runtime compatibility identity, but the reduced packages/runtime/src/jsc/tool_compat.zig root has not exposed the corresponding Environment surface.

Required completion:

  • expose the real shared compatibility version identity to home-tool without duplicating or hard-coding it;
  • restore the default zig build aggregate;
  • keep the reduced tool runtime independent of the full JSC runtime where intended;
  • add or extend a focused home-tool build/smoke gate.
9 days ago

Completed by c14c379.

This restores the reduced repository-tool process contracts without coupling home-tool to the full Bun/WebCore graph:

  • A single build-level Node compatibility version now feeds both the full runtime and reduced tool build options.
  • tool_compat exports the minimal Environment identity required by the shared process implementation.
  • process.version, process.versions.node, and process.release.name now agree on v26.3.0 / 26.3.0 / node.
  • process.umask now reads and mutates the actual POSIX process mask through libc, validates integer and octal-string inputs, and restores the original mask in tests. The prior JS-only shadow value is gone.
  • Shared native coverage and executable smoke coverage assert the identity and real umask behavior.

Validation:

  • Debug home-tool build and both smoke programs passed.
  • ReleaseFast home-tool build and both smoke programs passed.
  • Default zig build -j1 passed.
  • Native home_rt suite: 1,828 passed, 19 skipped, 0 failed.
  • zig fmt --check and git diff --check passed.
  • Scoped pickier: 0 errors; 22 existing warnings (1 tool-smoke quote-style warning and 21 parity-plan Markdown warnings).
  • No skipped assertions, reduced workloads, relaxed deadlines, or compatibility workarounds were added.

Sign in to comment on this issue.