Skip to content

fix(macos): seal stdin on POSIX toolchain install (first-run Enter-press hang)#163

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/macos-seal-stdin-install
Jun 24, 2026
Merged

fix(macos): seal stdin on POSIX toolchain install (first-run Enter-press hang)#163
Sunrisepeak merged 1 commit into
mainfrom
fix/macos-seal-stdin-install

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

First-run toolchain install (llvm@20.1.7) pauses waiting for Enter on macOS — the "需要回车才能继续" report.

The direct xlings install -y path sealed stdin only on Windows; POSIX "kept stdin open to stay conservative", so xlings or a grandchild (curl/git/xcode-select/brew prompt) can block on a terminal read. The earlier comment even noted Windows had the same Enter-spam before its seal — macOS now reproduces it. -y already makes the install non-interactive, so the seal only removes spurious blocking.

Seal stdin on POSIX too (</dev/null; Windows keeps <NUL) on both the direct path and the NDJSON interface fallback (NDJSON-over-stdout + yes:true, never needs the terminal).

Build: clean self-host.

…ess hang)

First-run toolchain install (e.g. llvm@20.1.7) paused waiting for the user to
press Enter on macOS — the '需要回车才能继续' report. The direct `xlings
install -y` path sealed stdin only on Windows; POSIX 'kept stdin open to stay
conservative', so xlings or a grandchild (curl/git/xcode-select/brew prompt)
could block on a terminal read. `-y` already makes it non-interactive, so the
seal only removes spurious blocking.

Seal stdin on POSIX too (</dev/null; Windows keeps <NUL) on both the direct
path and the NDJSON interface fallback. Build: clean self-host.
@Sunrisepeak Sunrisepeak merged commit 20a1942 into main Jun 24, 2026
5 checks passed
@Sunrisepeak Sunrisepeak deleted the fix/macos-seal-stdin-install branch June 24, 2026 02:15
Sunrisepeak added a commit that referenced this pull request Jun 24, 2026
Maps each symptom reported in #43 to its root cause, fix/status and the
PR/doc that handles it:
- headline -lSystem link failure -> #162 (-isysroot + sdk_path hardening)
- first-run stdin hang -> #163
- ninja 145s / sub-index 404 -> tracked in #164 todo (non-blocking)
- VS Code xattr / config-hook fail -> xlings recipe side (non-mcpp)

The cross-platform CDB e2e in this PR (76) doubles as the macOS link
regression guard: mcpp build links, so a -lSystem regression turns it red.
CI-verified that 76 actually runs+passes on linux/macos/windows.

Closes #43
Sunrisepeak added a commit that referenced this pull request Jun 24, 2026
…#165)

* test(e2e): assert compile_commands.json is generated on all platforms

Add a dedicated e2e (no requires → runs Linux/macOS/Windows) that builds a
minimal `mcpp new` project and verifies the Clang compilation database is
emitted at the project root: file exists + non-empty, top-level JSON array,
required keys (directory/file + command|arguments), an entry for src/main.cpp,
and a deeper python json parse where available.

CDB generation is unconditional in the ninja backend (write_compile_commands),
so this guards the IDE/clangd contract directly. Existing CDB tests cover
specifics (47 prebuilt-module-path abs, 59 std flag, gcc-only); this is the
plain cross-platform existence+validity guarantee. Verified: 47 already passes
on Windows/macOS CI, confirming the build path works there.

* docs(issue43): consolidated macOS first-run triage + close-out record

Maps each symptom reported in #43 to its root cause, fix/status and the
PR/doc that handles it:
- headline -lSystem link failure -> #162 (-isysroot + sdk_path hardening)
- first-run stdin hang -> #163
- ninja 145s / sub-index 404 -> tracked in #164 todo (non-blocking)
- VS Code xattr / config-hook fail -> xlings recipe side (non-mcpp)

The cross-platform CDB e2e in this PR (76) doubles as the macOS link
regression guard: mcpp build links, so a -lSystem regression turns it red.
CI-verified that 76 actually runs+passes on linux/macos/windows.

Closes #43
Sunrisepeak added a commit that referenced this pull request Jun 24, 2026
Ships the macOS first-run fixes:
- #162 macOS link 'library not found for -lSystem' (-isysroot + sdk_path hardening) — closes #43
- #163 first-run stdin hang on POSIX toolchain install
- #165 cross-platform compile_commands.json e2e (doubles as the -lSystem link regression guard)
@Sunrisepeak Sunrisepeak mentioned this pull request Jun 24, 2026
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant