Closed paulo-ferraz-oliveira closed 3 years ago
Do you think there could be further steps to getting rid of hamcrest
completely? Or is it not something you'd like to see happen?
@paulo-ferraz-oliveira I for sure would like to get rid of Hamcrest as a dependency. The problem can be solved in a few different ways:
Just remove Hamcrest and still "be compatible" without any tests to confirm
This is part of the issue, for me. hamcrest
is not actually a dependency. It's just an expectation in certain parts of the code, namely in meck.erl
and meck_matcher.erl
. I guess the solution to this (from the top of my head) could be to isolate the function calls in a new function and dialyzer
-ignore it. Types (or any other kind of static element) would simply be "imported" from hamcrest
.
Remove compatibility (maybe not explicitly in code, but at least not caring about it in the long run)
I don't understand what you mean by this.
Somehow make it optional (which is how it is now, but not really satisfactory obviously)
Touches what I've said before about function isolation and type importing.
Let me see if I can cook something up.
[Fix #218]
It started with me wanting to get rid of
hamcrest
-related warnings, since it's "used" but not imported bymeck
. And I write "used" because there is code to make sure it's there, before it's being used (and evencatch
clauses, at times), but thedialyzer
doesn't care about that and complains in any way.I guess I'll have to import
hamcrest
in thedeps
profile (on my lib.) just to force a correct analysis.Though I did not get rid of all the warnings I wanted to get rid of, I still ended up doing a bit of clean-up, which you might want to merge.