Fix headless --import crash (Unknown global command type)#2537
Open
dcwhite wants to merge 3 commits into
Open
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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