-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
matcher: should be their own pkg #10238
Comments
I felt that way too but I think there was some pushback. If nothing else separating them out would mean they actually show up in API docs! |
This comment was originally written by [email protected] Issue #3717 is of historical significance here. |
I'm fine with splitting them up. I think at the time our package reuse story wasn't quite as mature. We were still using SDK packages and the version solver wasn't as smart. Today, it should be easier to split these up while still being easy for users to consume them. Would unittest.dart will export matchers.dart, or would users have to import both in their tests? |
I'd be happy to split them up, but I'd prefer if unittest reexports them by default. |
My assumption was that if we split them up, unittest would not import matcher, and so users would import both if they wanted to use out matchers and expect(). OTOH they could use a different matcher library if they want. |
We do have a different issue, which is asking for unittest to be renamed unit_test to be consistent with the style guide. So an option - although it's kinda hokey - would be to move unittest to unit_test, and have unittest be a shell that imports and reexports unit_test and matcher. That would mean we don't break any existing tests. |
The renaming issue is https://code.google.com/p/dart/issues/detail?id=10120 |
Not sure. I'd do the unittest exports unit_test + matchers just as a transition, maybe include a deprecation message so that users start switching their imports. If people already have to rewrite their imports because we rename the package to 'unit_test', then that would be a great point to do a few other things like:
I personally prefer that matchers is included because the great majority out there just wants to use it together with unittest, so there is less set up to do. If we don't it with unittest.dart, do people need to also add a pub dependency to get matchers? |
I'm hesitant to do this because I worry it means people will couple their unit tests to a single configuration even when the code under test can run on multiple configs.
I believe unittest is and will be coupled to matcher, it's just that matcher is not coupled to unittest.
No, unittest depends on it, so you will get it transitively automatically. |
Removed the owner. |
This comment was originally written by @seaneagan Any updates on this? I have some use cases for matchers outside of unit testing, and it's weird to have to include unittest to get to them. It also seems error prone, as unittest is often a dev_dependency, so it would work in development, but fail in production when unittest no longer appears in the "packages" dir. |
Added Pkg-matcher label. |
matcher has been its own package for a month+ now Closing now that unittest no longer exports it: r35954 Added Fixed label. |
This issue has been moved to dart-lang/test#2331. |
I don't think matchers depend on unittest. Presumably they should not be in the unittest pkg?
The text was updated successfully, but these errors were encountered: