-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test::Stream UI discussion #76
Comments
Oops. Forgot another goal/morivation. The bundle system helps avoid lock-in while allowing a path forward. what I mean is that if we decide something in a set of tools is a bad idea we can deprecate the bundle and recommend a replacement. this means nothing breaks, we are not killing backcompat, but also we are able to put out something new and different for people to use from now on. This is something that can't be done with Test::More which is now more or less locked as it is because of back compat concerns. |
I think the bundles are a decent idea, I just don't like Test::Stream functioning as a loader interface. It adds an extra layer of indirection, making it less obvious where code is coming from. If I look at a test and see Test::Stream::Bundle is also a more natural place for the bundle handling to live than in Test::Stream. The The The lower case options appear to just end up loading plugins. Again this seems to offer no advantages over loading the plugins directly. |
And the You see You then find out "Compare" is a "plugin" and you have to understand what that means and how it works, and how Test::Stream is calling it and why. When comparatively: use Test::Stream::Bundle::V1;
use Test::Stream::Plugin::SRand; Is perfectly obvious, you're requiring some modules and calling their Which is easy, because Exporting/Importing is basic perl knowledge. The only reason Plugins are different from just any old Perl module, is that due to the bundle system needing a way to re-export things their plugins export, you have to have some kind of layer the bundler can call into to make that happen, and But the user really doesn't have to care about that. That's knowledge that is only relevant to people writing bundles. |
This ticket is for discussion of the Test::Stream UI.
Right now Test::Stream is a loader. -Foo means load a bundle named Foo. Foo without a dash means load a plugin named Foo. :Foo means load a bundle from t/lib. Lowercase args are reserved by the loader. There are no defaults.
There were a couple reasons/goals in doing it this way:
I knew some people would not like the toolset I do (the V1 bundle) and I wanted it to be clear to all that ot was not the only way, and that they were not forced to use it. Before the current UI Test::Stream was what the V1 bundle is now.
The loader is inheritable if you want a custom test tool with defaults, or behavior specified for the lowercase options. this is something particularly useful for companies with complex testing needs.
The plugin/bundle system will hopefully prevent the kind of problems we hae with Test::Class which both adds behavior, and forces you to use Test::More a specific way.
bundles basically boil down to a list of arguments to the Test::Stream loader. This adds consistency.
I realized that it would not be hard to make it so that plugins and bundles could work without using the loader, that is make it work if they are used directly. I also realized some people would not like to use a loader. As a result I took some time and did it. As a result the loader is optional from a user perspective. However the loader is not truly optional since bundles still use it under the hood, users just don't see it.
The text was updated successfully, but these errors were encountered: