-
Notifications
You must be signed in to change notification settings - Fork 211
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
Issue #119: Guarantee executing popOperand() in popUninitializedVariableOperand() via moving popOperand() out of "assert" #120
Conversation
…nitializedVariableOperand() via moving popOperand() out of "assert"
It would be ideal if we run the entire tests twice via assert option on and off; not sure Janino build does that. |
#121 to enable Travis CI build which helps to figure out such case. |
Merged this PR, but (intentionally!) not the unit test, because that unit test may have side effects (setting / resetting assertion status). |
Strictly speaking, you're right. However this bug is a singleton, and the very small risk that "it will occur again" does not justify the effort/time to run the regression tests twice. Alas, what is much more critical, is to run all the tests agains several JREs (at least 6, 7, 8 and 11), which is extremely difficult because JUNIT doesn't support that. I once wrote a JUNIT TestClassRunner that attempts to implement that , but it is terribly slow and clumsy. So the unit tests that are executed by maven are only regarded as "sanity testing", while I do the really careful regression testing manually with ECLIPSE. Maybe I should open a to-do issue for extending the UTs with the MultipleJresTestClassRunner. |
Thanks for reviewing and merging!
That's OK, as it turned out other unit tests were failing based on the assertion status.
While the bug was a singleton, we had no idea what is happening, even there're a couple of 3.1.x versions released already. That's the matter of "stability" - given Janino is more likely used as a library, the users would expect more stability; showing the efforts of striving to guarantee stability has been already the first class priority in most of open source projects, and that's why other projects have been adopted various integration tools like CI, test coverage, etc.
...and which is very trivial to add in Travis CI build with running in parallel.
(Not fully parallel though - looks like 5 parallel builds allowed per a trigger, so two groups of builds happen. If you reduce the JDK to 2 flavors, they would be grouped with one group, but can't we wait for just 10 mins?) (OpenJDK 11 seems to fail due to Javadoc issue which I'm not aware of - that can be fixed or applied workaround once we have a plan to adopt it.) OpenJDK 10 build failure was from:
Unless the class can "detect" the path of JREs, this change would make others (including me) stop to contribute Janino or stuck to 3.0.x - I'm MacOS/IntelliJ user, and most of Spark contributors are also Linux/MacOS users. It even seems to be sensitive to bugfix version as well - if you upgrade JRE you'll be going to fix the code. Why not let the existing great tools do it for you instead? |
Oh, However I fear that I don’t get the MJTCR running... the JUNIT APIs are more complex than you'd expect. So I'll definitely look into TRAVIS. |
There's a bug discovered in #119 which seems to execute "stateful" operation into "assert". The execution is not guaranteed, and leads to inconsistent stack map.
This patch adds new UT to reproduce #119 - it fails on latest master branch, and passes with this PR.