Skip to content

Support bisect in spec opts

Created by: urbanautomaton

I'm breaking out a new PR to fix #2231 (closed), based on discussion in #2259.

To summarise progress: the infinite looping problem is solved by modifying the environment given to the child processes, so that only the parent process starts a bisection.

However, the existing invocation of Bisect::Runner from within OptionParser is problematic, because OptionParser is invoked twice: once for CLI args, and once for args set in the environment. We need to invoke the bisection only once all args have been parsed, so that the correct commands can be issued to the child processes.

@myronmarston has suggested we refactor the OptionParser so it no longer invokes any actions directly, but instead returns a callable that the main runner can invoke. The current diff contains a sketch implementation of what I understand this to mean.

@myronmarston - is this sort of thing what you envisaged? (Obviously there'd be further refactoring to do, I just wanted to check I've got the right general idea...)

Merge request reports