feat(options): add --no-plugins to disable auto-plugin discovery#441
feat(options): add --no-plugins to disable auto-plugin discovery#441troglodyne wants to merge 3 commits intoTest-More:2.0from
Conversation
Adds a --no-plugins Bool option to App::Yath2::Options::Yath. When set, the auto-loading loop in App::Yath2::process_args skips any module that is an App::Yath2::Plugin subclass discovered through STATE_MODULES (environment scan, option files, etc.). Plugins explicitly requested via -p are still loaded normally since they are processed separately in run(). This is useful in tests like stamps.t where ambient plugin configuration must not interfere with the explicitly specified -pTestPlugin. Note: --log-dir / -L are already implemented in Options::Logging and wired in Command::test; log_dir.t already runs without a skip guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The plugins Map option auto-generates --no-plugins as its negation form. Adding option no_plugins with alt no-plugins created a duplicate --no-plugins form, causing "Option form '--no-plugins' defined twice" at load time. Rename no_plugins to no_plugin_scan (dropping the conflicting alt) and update the corresponding accessor in App::Yath2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR Test-More#437 brought back a live replay.t on 2.0. Our branch still had plan skip_all, causing the GitHub merge commit to pick up upstream's unpatched version, which fails on Perl 5.24/5.28 due to event ordering differences between live and replay renderers. Update replay.t to match the upstream 2.0 version exactly, then apply PR Test-More#443's fix: sort ALL consecutive `job N`-prefixed lines (not just PASSED/FAILED status lines). Diag/Reason/Fail lines also carry `job N` and can interleave differently between live and replay, so the narrower sort was insufficient. Also adds the missing `Wrote archive:` strip and `job N` normalisation that upstream 2.0 introduced in PR Test-More#437. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI note: Perl 5.24/5.28 failures on replay.tThe Our This is pre-existing — the test was behind |
|
Solved by other work actually :) |
What
Add
--no-pluginsBool option toApp::Yath2::Options::Yath; wire it into the auto-plugin discovery loop inApp::Yath2::process_args.Why
stamps.tuses--no-plugins -pTestPluginto load only one specific plugin without ambient auto-discovered plugins interfering. Without this flag there is no way to isolate plugin loading in tests. Note:stamps.tremains blocked by a separate issue ($log->poll()JSONL API), but--no-pluginsis independently useful for test isolation in any context.--log-dir/-Lwere already implemented inOptions::Loggingand wired inCommand::test(PR #434 merged it);log_dir.talready runs without a skip guard. No work needed there.How
Options::Yath.pm: addno_plugins => Booloption withalt => ['no-plugins'], default 0Yath2.pmprocess_args: read$settings->yath->no_plugins(wrapped in eval for safety); in theSTATE_MODULESloop, skip anyApp::Yath2::Pluginsubclass when the flag is set. Renderers and resources are unaffected.-p Foo) are processed separately inrun()and are not affected.Testing
Unit test: pass
--no-pluginstoyath testalongside-pSomePlugin; confirm only the explicit plugin is active.Full integration:
stamps.twill exercise this once the$log->poll()API issue is resolved.