Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Separate forking subsystem into its own distribution? #72

Open schwernbot opened 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Monday May 13, 2013 at 00:38 GMT Orig: https://github.com/Test-More/test-more/issues/380

The forking subsystem, specifically TB2::SyncStore::File, is being problematic. It's the first time Test::Builder has ever needed to touch the filesystem and that brings a myriad of portability problems. It not only touches the filesystem, it has to lock files which is an even bigger portability problem. And fork isn't terribly stable on Windows.

Because Test::Builder underpins everything, I'm nervous about bringing this instability in. It's also a major time suck away from getting a stable release.

Fortunately, in the current design the SyncStore subsystem only touches the rest in three places, all inside TB2::TestState. Two are to initialize the subsystem when coordinated_forks is turned on, and one is basically a wrapper around post_event to make sure the synching and storing happens on each event.

My thought is to separate TB2::SyncStore::File into its own distribution, possibly with a better name, which will be used when coordinated forks are requested. One possibility is to roll it into Test::SharedFork for forward compatibility.

Another argument for separating it is we can always put it in later. But once it's shipped with the main distribution it's stuck there.

Opinions?