-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can't have Java code dependent on AOT'd Clojure code #180
Comments
The way other build tools solve this problem is to split the project into modules and have dependencies between those modules. Every module compiles as a unit and together. |
I'm not likely to implement this myself, (projects that need even simplistic javac are edge cases) but if someone wants to take the initiative I can provide guidance. Alternatively arbitrarily complex multi-step compilation could be done easily in a plugin. |
This might be a crazy idea, but what if leiningen compiled things in a loop? The compilation algorithm might look something like this:
At some point, you'll reach a fixed point: either the set of things to compile doesn't change (failed compilation), or everything gets compiled (successful compilation). This won't be as fast as explicit multi-step compilation, but it'll be easier to use. |
Interesting. I think it's got potential; probably worth experimenting with, either in a plugin or possibly in a branch. |
I think you can implement this in the master branch by tweaking the |
In a single project, you can't have a Java class use AOT'd Clojure code. This problem is exacerbated by the fact that a project can have dependencies going both ways between Clojure and Java, so you can't necessarily just change the order of compilation. It would be nice if both Clojure and Java somehow compiled together, or if there were some way to specify partial compilations (e.g., do these 4 Java classes, then all the Clojure, then the rest of the Java).
The text was updated successfully, but these errors were encountered: