Skip to content

Fix headless --import crash (Unknown global command type)#2537

Open
dcwhite wants to merge 3 commits into
masterfrom
fix-headless-import-network-command
Open

Fix headless --import crash (Unknown global command type)#2537
dcwhite wants to merge 3 commits into
masterfrom
fix-headless-import-network-command

Conversation

@dcwhite

@dcwhite dcwhite commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • The console (headless) global command factory had no case for GlobalCommands::ImportNetworkFile, so --import crashed immediately with Unhandled exception: Unknown global command type. on any headless build (mac/linux/windows-headless).
  • This was invisible until Upgrade GoogleTest to v1.17.0 and fix Windows unit test infrastructure #2535 wired up ctest in CI, at which point it caused ~90% of unit/regression tests to fail identically on headless jobs (every .Test.ImportNetwork.* test uses --import), while GUI builds passed at 97%.
  • Adds ImportFileCommandConsole, sharing filename-resolution/parse/load/regression-exit logic with LoadFileCommandConsole via a new NetworkFileProcessCommandConsole base class, mirroring the existing GUI FileImportCommand/NetworkFileProcessCommand split.

Test plan

  • windows-build and windows-build-script CI runs pass on this branch
  • linux-build CI run passes on this branch (linux-headless, linux-gui, linux-gui-nonpython all green)
  • mac CI (only runs on PR) — pending this PR's checks
  • Confirm ctest -R ImportNetwork pass rate on headless builds jumps from ~10% to matching the GUI build's ~97%

🤖 Generated with Claude Code

dcwhite added 3 commits July 1, 2026 11:44
The console (headless) global command factory had no case for
GlobalCommands::ImportNetworkFile, so --import crashed immediately with
"Unknown global command type." on any headless build (mac/linux/windows
headless CI jobs). This was invisible until PR #2535 wired up ctest in
CI, at which point it caused ~90% of unit/regression tests to fail
identically (all ImportNetwork.* tests use --import).

Add ImportFileCommandConsole, sharing filename resolution/parse/load/
regression-exit logic with LoadFileCommandConsole via a new
NetworkFileProcessCommandConsole base class, mirroring the existing
GUI FileImportCommand/NetworkFileProcessCommand split.
… bug

Xcode 15.4 on the mac-headless-14-arm(-slim) runners fails to resolve
std::quick_exit via libc++'s using-declaration shim. The global C symbol
is unconditionally declared regardless of deployment target, so calling
it unqualified sidesteps the toolchain bug.
@dcwhite dcwhite requested a review from jessdtate July 4, 2026 05:08
@dcwhite dcwhite self-assigned this Jul 4, 2026
@dcwhite dcwhite added this to the 5.0.0 milestone Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant