-
Notifications
You must be signed in to change notification settings - Fork 410
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
AOT issues with clj_http.headers.HeaderMap #638
Comments
BTW uberjars work fine - the issue happens only when AOT-compiling for development |
After some investigations, here's what I learned: • Part of the problem seems to be loading namespaces in user.clj. After stopping to load stuff in user.clj, the problem went away for me (this explains why • Generally what seems to be happening is this: I'm loading clj-http and then compiling it. "Something is loading clj-http before you do the aot compilation, and on the second loading (for aot) potemkins type definition stuff no-ops, so the class doesn't get written to disk" More discussion here: https://clojurians.slack.com/archives/C03S1KBA2/p1697468125926469 This still seems like a wrinkle in clj-http, though maybe not a bug (maybe in potemkin?) |
Could this be something internal to leiningen itself that's loading clj-http? |
I'm using tools.deps for this report. I'm pretty sure the problem is
because the lib was loaded in user.clj, then compiled
…On Tue 24. Oct 2023 at 01:10, Lee Hinman ***@***.***> wrote:
Something is loading clj-http before you do the aot compilation
Could this be something internal to leiningen itself that's loading
clj-http?
—
Reply to this email directly, view it on GitHub
<#638 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ6WEHT3YVQEWFYEVZ6IDYA32N3AVCNFSM6AAAAAA6CKWF62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGE3DONZTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm following the guide for using AOT. This works ... except for clj-http.
The error I'm getting is not when compiling but when loading the compiled classes (rather than clj files):
When I
rm -rf classes/clj_http
, it works again.Unfortunately I couldn't come up with a simple repro case - when I tried it outside of the main app, it worked. Not sure why - race condition?
I suspect (but cannot prove) that the AOT incompatibility is due to the use of potemkin.
There's an earlier report from 2016, but I'm not using Leiningen https://clojurians.slack.com/archives/C0AB48493/p1469153573000034
The text was updated successfully, but these errors were encountered: