Open Hixie opened 6 years ago
When we're ready to roll a major release of matcher + test, we'll make this change!
dart-lang/matcher#110 didn't solve this. It used a different name that won't allow us to unfork.
Will leave open until we can remove isInstanceOf
with a breaking change version bump.
Discussed offline - flutter_test
will keep it's own isInstanceOf
unless they decide to do a breaking change, or forever, which can be handled independently from anything test. We will not keep isInstanceOf
in matcher
or test
once we have other compelling reasons for a breaking version bump.
I'm not sure what the current intention is, but currently the documentation for isInstanceOf
says:
DEPRECATED Use TypeMatcher instead.
but also:
Annotations @Deprecated('Use
isA<MyType>()
instead.')
which seems inconsistent.
It's also confusing to recommend using TypeMatcher
because Flutter has its own copy of the package:matcher
docs, but in a Flutter context, package:matcher
's TypeMatcher
is hidden and TypeMatcher
is something different.
FYI: Flutter TypeMatcher is now marked as deprecated.
We shipped isA<T>
, which can be pointed to by Flutters isInstanceOf
function.
Can we close this out?
@kevmoo @natebosch Based on our meeting today, Flutter is hiding
TypeMatcher
andisInstanceOf
fromtest
in all our tests (and in theflutter_test
package that we export to our users), and instead just exporting a function calledisInstanceOf
. This is ugly and we would prefer if we could just have anisInstanceOf
method so that we didn't need to have these hacks.