-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Sync with most recent hamcrest? #36
Comments
I noticed that an attempt to upgrade to hamcrest 1.2 was rolled back. I wonder why that was. |
Hamcrest 1.2 changed the type signatures of its built-in matchers to be incompatible with Hamcrest 1.1, and all versions of JUnit so far. We are investigating a non-hamcrest-based assertThat expression to be used in future versions. |
Hamcrest 1.2 is now in the central maven repository if you wanted junit to depend on it. |
Yes, and the signatures are still incompatible. |
Why doesn't JUnit just re-package the Hamcrest code it wants to use internally with different package names, so that people can use what ever version of Hamcrest they like at the same time? |
dsyer, It's not quite that simple. We use hamcrest very little internally (and I hope to expunge it entirely soon). Since whatever we do is going to break someone, I'd like to just find the quickest path to the least pain that involves a full purge of hamcrest from the JUnit jars entirely. More to come. |
Is there any update on this? We still can't use hamcrest 1.2 with a stable version of junit? Thanks |
yes you can use hamcrest 1.2; you simple have to use the "junit-dep" library (junit without hamcrest") instead of the default "junit"; than you can include the hamcrest 1.2/1.3 library youself. |
You do have to user MatcherAssert.assertThat() if you want the assertion error to make use of the describeMismatch method (i.e method which allows matchers to describe what is wrong, not just state that it is). |
Hey, guys, I am working on updating hamcrest and jUnit in Fedora and as was stated, they don't work together because of the different Matcher signatures. I would like to know what stance and ideas you have on this - we need it in Fedora and we certainly don't want to fork unless necessary, so if we agree on some changes, I can push the update your way. |
We've decided to move ahead with a modified plan of attack. In https://github.com/KentBeck/junit/commit/8c2f7890154618b9409ef2baf7d96ccebec8d1ba At this point, we need someone to volunteer to figure out what further changes would need to be made in JUnit to bring it up to date. |
Well, I think you found your volunteer. I'll look into this and come up with a plan of what to do. |
Thanks, Tomas! |
I have looked into the matter and come up with 2 versions of what can be done. I assume you intend to keep JUnit working as it has been until now, therefore no drammatic changes like JUnit 3 > JUnit 4.
On a related note, may I know what makes you want to remove the dependency on Hamcrest? |
Hi, I was wondering if anyone's looking into this. If you're not happy with my idea, feel free to comment on it. |
Done in #404. |
No description provided.
The text was updated successfully, but these errors were encountered: