Fix headless --import crash (Unknown global command type)#2537
Conversation
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.
|
Blocked on #2564 — same root cause. The
So #2564 sidesteps this with Plan once #2564 lands: rebase onto master, revert Worth doing independently of the build failure: against the 15 SDK the bare The remaining red on this PR is unrelated — those jobs hit the 24h Actions queue timeout and were cancelled without building. |
Summary
GlobalCommands::ImportNetworkFile, so--importcrashed immediately withUnhandled exception: Unknown global command type.on any headless build (mac/linux/windows-headless).ctestin 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%.ImportFileCommandConsole, sharing filename-resolution/parse/load/regression-exit logic withLoadFileCommandConsolevia a newNetworkFileProcessCommandConsolebase class, mirroring the existing GUIFileImportCommand/NetworkFileProcessCommandsplit.Test plan
windows-buildandwindows-build-scriptCI runs pass on this branchlinux-buildCI run passes on this branch (linux-headless, linux-gui, linux-gui-nonpython all green)ctest -R ImportNetworkpass rate on headless builds jumps from ~10% to matching the GUI build's ~97%🤖 Generated with Claude Code