Affects Version/s: Release 1.5, Release 1.6
Fix Version/s: Release 1.9
Suppose you have a lib that causes some errors during loading, like the following:
And then, if you require the lib, it would be added into loaded-libs in spite of the reader error, which makes require succeed silently after that.
Things get worse if you have another namespace that requires a broken lib (say here broken-lib.core):
Although you'll get the actual error the first time you load the depending namespace, after that you'll find a wrong compiler exception thrown every time you try to reload it. The situation will last even after you actually do fix the code causing the original error.
The patch for
CLJ-1116 made the ns macro blindly add the lib being defined into loaded-libs even if an error occurs during loading.
Modify clojure.core/load-lib so that it removes the lib from loaded-libs on error.