You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
native: make inspect_macho resilient when vtool is unavailable #187
inspectNativeMacho currently aborts the whole native Mach-O inspection if any command in its fixed command list fails.
The native Mach-O command list is:
file -b
lipo -detailed_info
otool -l
nm -gjU
dyld_info -imports
dyld_info -exports
dwarfdump --uuid
vtool -show-build
The normalized schema does not require vtool output (src/native/NativeMachoInspection.ts:88-92); vtool is currently only retained as provenance.
If vtool is missing from the resolved xcrun toolchain (for example in partial CLI setups), inspect_macho fails with a capability/adapter error even though the rest of the analysis commands are available.
Evidence
Early-return on any command failure: if (!captured.ok) return err(captured.error) in inspectNativeMacho (src/native/NativeMachoInspection.ts:57).
vtool result is used only for provenance text, not required schema fields (src/native/NativeMachoInspection.ts:91).
Reproduction
Run native Mach-O inspection on an environment where xcrun --find vtool fails.
Observe inspect_macho fails despite other required tools being present.
Expected
inspect_macho should degrade gracefully when optional tools are unavailable:
keep the best-effort Mach-O result from required commands
add a limitation explaining that vtool was unavailable
include provenance for attempted commands
Impact
This blocks Mach-O inspection on valid environments with partial Xcode toolchains.
Suggested fix
Split Mach-O command execution into required and optional groups. Treat vtool as optional and convert its failure into a non-fatal limitation.
Activity