Directly-linking in Clojure 1.8.0 interferes with load monkey-patching


Clojure 1.8.0's jar contains clojure.core with directly linked vars.

This means our trick of monkey-patching `load` no longer works.

Instead, we must also monkey-patch `require` and `use`, and completely
copy their implementations.

20 November 2015 reopen

clojure.core/compile similarly uses `load`. It's safe to insert core.typed into this pipeline because we pass the results of type checking to anyway, so the results of type checking can be AOT compiled.

End reopen

Future Revert (Completed, see 27th January changes)

Ideally CLJ-1845 fixes the original problem, but it is not clear if it actually does.

This should print "patched" after every `require`.

Pull request: 72
Commit: fe7ae4a
Release: 0.3.15

20 November reopen

Pull request: 87
Commit: 9cd4f720
Release: 0.3.20

End 20 November reopen

27 Jan 2015 Revert

Now Clojure 1.8.0 is released and there are no direct-linking issues, we can revert both patches.

Pull request: 91
Commits: 6b92bb 9eb6c9
Release: 0.3.20

End 27 Jan 2015 Revert




Ambrose Bonnaire-Sergeant
January 27, 2016, 8:51 PM

Reopening as Clojure 1.8.0 fixes the direct-linking issue.

Ambrose Bonnaire-Sergeant
November 20, 2015, 3:02 PM

`clojure.core/compile` also uses `load`, so that must also be monkey-patched.

Ambrose Bonnaire-Sergeant
November 20, 2015, 4:21 AM

No longer needed in 1.8.0-RC1, `load` is declared dynamic.

Your pinned fields
Click on the next to a field label to start pinning.


Ambrose Bonnaire-Sergeant


Ambrose Bonnaire-Sergeant