Releases: oakes/Nightcode
2.3.6
This release fixes a few more editor bugs. Firstly, the first character was being lost when inputting something in the build pane when using read-line
or equivalent. Secondly, some regular expressions were being incorrectly marked as errors (because the editor was treating them as JS regexes rather than Java regexes). Thank you to Github user NathanSmutz for reporting both issues!
2.3.5
2.3.4
2.3.3
This release fixes a bug that caused the REPL (and build pane in general) to randomly freeze. It actually is caused by what I previously termed the mother of all bugs. Unfortunately, I only applied my fix to the editor pane, and forgot to apply it to the build pane.
2.3.2
Sorry for the quick succession of releases, but a small regression appeared in the previous release. When selecting text with shift+arrows, the selection would disappear after letting go of shift. This was annoying enough to me that I decided to cut a new release.
2.3.1
This release fixes a bad REPL bug caused by my own stupidity. In certain circumstances, old REPL history could prevent any new REPL inputs. Thanks to Github user jamesnvc for the bug report.
Additionally, I added a "Test" button for Leiningen projects, just like the old Nightcode.
2.3.0
This release adds auto-indentation similar to aggressive-indent-mode and updates some templates.
2.2.2
2.2.1
Any good programmer knows to start a debug session by blaming yourself, because chances are, it's a mistake you made. Imagine, though, that the bug actually originated somewhere in the bowels of the JDK. Imagine that the bug is so obscure that it was neither reported nor fixed for 8 months (and counting). Welcome to my world.
Many months ago, I installed the latest update to JDK 8. After testing Nightcode with it, I noticed something strange: After opening a file and editing it for 15-30 seconds, the save/undo/redo buttons would all stop working! After reverting to the previous JDK version (8u92) the problem went away. It was mystifying.
I tracked the problem down. The editor, as you may know, is written in ClojureScript and runs inside of a JavaFX WebView pane. For any editing actions to happen, that WebView has to communicate with the JVM side via a special "bridge". For some reason, after briefly opening a file, that bridge would silently stop working!
Believe it or not, my fix up until now was to stick with 8u92, a release that is now about 8 months old. Since the Nightcode installers bundle a copy of the JVM, that would ensure that my users wouldn't face this issue. That is, unless they tried running the JAR version of Nightcode -- which is why I removed that link from the website.
Months went by and every attempt I made to figure out the problem failed. There was no stack trace, just silent failure. And then, today, as I was thinking idly about the problem again, I came up with a new hypothesis: Maybe the bridge object was being accidentally garbage collected! That would explain why it initially worked but eventually stopped working.
To prevent the object from being garbage collected, I made sure to store it in a global atom so there is always at least one reference to it. After testing it out, the problem went away! This suggests that after 8u92, the code relating to the JavaFX WebView was changed such that it didn't hold a reference to the bridge object.
This release finally updates the bundled JVM to the latest version, 8u121. I am also restoring the JAR file link on the website. Given the complete lack of information to go off of (such as a stack trace), the length of time that passed, the fact that it originated in a widely-distributed platform and yet nobody else apparently ran into it, and the fact that I could only fix it through a priori reasoning, I'll go ahead and label this the most difficult bug I have ever fixed.