-
Notifications
You must be signed in to change notification settings - Fork 3.1k
depend on junit from partest, not vice versa. and reduce warnings #7817
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
Conversation
|
also tried out this new "draft pull request" feature. it seems that on a draft PR, Jenkins triggers but Travis-CI does not. (but once you convert it to a regular pull request, Travis does then trigger.) |
37e273f to
fb0e9cb
Compare
|
admittedly the new dependency is still kind of gross (it might be nice to eventually split up the new dependency may be gross, but the old one was considerably grosser IMO |
| private val x = 123 | ||
| // Uncommenting the following line would make the test fail | ||
| () => x | ||
| def fn = () => x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked using the 2.11.12 REPL, this alternate form of the test does still fail in 2.11.x
520c3a9 to
f8b7837
Compare
This comment has been minimized.
This comment has been minimized.
|
there seems to be a problem with t6411a intermittently failing. very difficult for me to see what it might have to do with the changes in this PR the failures look like which seems like a JVM-level problem |
som-snytt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partest was a baggy monster when it used actors as in scala.actor. More like, "tis an unweeded garden that grows to seed: things rank and gross in nature possess it merely."
IIRC, I recently copied some testing code for a partest test. If I can find it, I'll retrofit it.
This comment has been minimized.
This comment has been minimized.
|
gah well this test (6411a) is now very flaky on CI, it fails most of the time locally, it's the opposite: the test nearly always passes when run in isolation, but I did see it fail once that way I'll have to dig deeper into this 😞 |
|
The I haven't drilled into how the message in the class cast exception could be unset. Or, the test is testing that reflective invocation fails at Actually, some poor slob on SO also saw this behavior. Maybe it's just something that happens in Hotspot and you're not guaranteed to see the message. With a test class, I can retain the exception message by avoiding compilation with Edit: fork with exclusion from compilation at #7819 |
f8b7837 to
e8572a0
Compare
|
the CLA checker is confused, I've opened a ticket on it: scala/scabot#103 |
e8572a0 to
2ef0924
Compare
|
@sjrd might this mess with Scala.js's use of partest? (like because the partest JAR will be missing the classes from the junit subproject, something like that?) |
|
We use fixed versions of partest itself, so at least it's not going to break Scala.js right now. It might make it more difficult for us to upgrade our partest later, but I don't think so. |
the dependency the other way just seemed wrong to me. partest is a big hairy legacy mess, other things should not depend on it but also, it's convenient in partests to be able to: * use JUnit assertions * use utility code in scala.tools.testing in making this change, I only turned up one case where the dependency of junit on partest was being used, namely ASMConverters. this was easy to fix by relocating it to scala.tools.testing
there were a bunch of compiler warnings when compiling this test so, two motivations for the change: * reduce build-time noise * actually test that the warnings we want (or don't want) emitted for this code are (or aren't emitted) as a bonus, it demonstrates the utility of having our partest subproject depend on our junit subproject, rather than vice versa
not touching the 680 deprecation warnings right now, but this commit eliminates the others the MethodSymbol one is as per 2014 Som at https://stackoverflow.com/a/23274960/86485
2ef0924 to
d25f845
Compare
|
I'll merge tomorrow if there's no further feedback by then. In the |
sequel to scala#7817 this is needed in order to avoid using "compile->test" which we can't replicate in the IntelliJ project (we don't think) it's better this way anyway, the old partest->junit dependency was unnecessarily thick, this replaces it with a thin dependency. I had strongly considered doing this anyway as part of scala#7817
didn't take long for the need to arise. sequel in #7847 |
sequel to scala#7817 this is needed in order to avoid using "compile->test" which we can't replicate in the IntelliJ project (we don't think) it's better this way anyway, the old partest->junit dependency was unnecessarily thick, this replaces it with a thin dependency. I had strongly considered doing this anyway as part of scala#7817
thanks Martijn for catching it and Som for digging in a bit: scala@d25f845#r38613066
three commits:
junitandpartestsubprojectsjunitsubprojectthe unifying theme here is warning elimination. the second commit converts some warnings from build noise to something that actually gets tested. the first commit started as just something the second commit needed, but then it turned out to be the nicest part.