-
Notifications
You must be signed in to change notification settings - Fork 5
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
Disable unexpected compilation exceptions caching #40
Conversation
Side questions:
|
|
Code LGTM, but I would love some unit tests for this new option. |
I've decided to extend the solution of disabling caching to all unexpected exceptions (not only NPE) that occur during compilation. This should minimize the probability that any other unexpected exception will block the cache infinitely. @freddie713 please check the code one more time, now it was easier to unit test it, as I no longer had to rely on the filesystem. |
scex-core/src/main/scala/com/avsystem/scex/compiler/ScexSettings.scala
Outdated
Show resolved
Hide resolved
scex-core/src/main/scala/com/avsystem/scex/compiler/CachingScexCompiler.scala
Outdated
Show resolved
Hide resolved
scex-core/src/main/scala/com/avsystem/scex/compiler/ScexSettings.scala
Outdated
Show resolved
Hide resolved
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.
LGTM
PR summary:
|
Since expression compilation can sometimes throw an unexpected
java.lang.NullPointerException: Cannot read the array length because "a" is null
due to I/O errors, it would be helpful to have the option to disable such error caching. Otherwise, the cached error is returned every time, paralyzing normal scex usage.