Hum... well, the dependencies normally specify the extent of the AOT, in 
the sense that the AOT follows your code `require chain`. Which is why say 
:dev dependencies or test dependencies normally wouldn't be included in 
your AOT. That said, Clojure is required to AOT, and so it would be on the 
classpath and it will be an implicit require of any namespace, so it will 
get AOTed no matter what. I think that reasoning makes sense.

Still, a Clojure library shouldn't include a dependency on Clojure in my 
opinion, as Clojure will always be provided by the container in those 
cases, unless it is meant to be consumed from Java. The best is to use the 
type of dependency that's like: use the parent specified one, unless there 
is none, then use this one. Can't quite remember all the different dm, but 
I believe lein, maven, etc. all have something like this.

On Monday, 2 September 2019 06:56:50 UTC-7, atdixon wrote:
>
> I was responding to this:
>
> > I'm still torn on whether to actually add Clojure as a proper dependency
>
> The question to have Clojure as a proper dependency doesn't seem to change 
> whether you AOT or not. I take "proper dependency" to mean a Maven/Lein 
> dependency that ships with the dependency list in your library's POM.
>
> I agree that you that you shouldn't ship classes AOT'd outside of your 
> library/its namespaces.  
>
> On Sunday, September 1, 2019 at 10:31:46 PM UTC-5, Didier wrote:
>>
>> AOT does matter, because AOT is transitive. Effectively, all AOT builds 
>> are like Uberjars. They compile your code and the code of your dependencies 
>> and theirs as well into .class files putting everything in the build 
>> folder. Then the package will take all the classes and put them in the Jar.
>>
>> Any library that does that does it wrong. Don't AOT your libraries for 
>> that reason. Or make sure if you do, you are only including .class of your 
>> library code, not any of its dependencies. And even ideally, like I said, 
>> only include the bare minimum, so only .classes required for interop. The 
>> rest package as source.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/30ecd9df-79c6-4272-ba34-99de339dee88%40googlegroups.com.

Reply via email to