Here's some maven-specific discussion: 
https://stackoverflow.com/questions/793054/maven-classpath-order-issue.
They have a defined order since 2.0.9. and declaration order is considered 
for transitive dependencies conflict.

Intellij's Dependencies tab in Module settings: You can re-order the 
dependencies and they reflect in the classpath.

lein classpath -> local paths added first, JARs afterwards

Please consider returning to a :paths first, then :deps in a stable order.

I know it is not pretty and it is not desirable for code to be dependent on 
that, but resource-loading uses the CLASSPATH and that makes the order of 
dependencies intrinsically linked to locating resources.

I'd also rather fighweel-main behave differently, but it relies on 
(io/resource "public/index.html")

Thanks,
 Jochen



On Tuesday, August 11, 2020 at 11:55:07 AM UTC-7 Alex Miller wrote:

> Just to beat the horse...
>
> On Tue, Aug 11, 2020 at 1:05 PM 'bed...@yahoo.com' via Clojure <
> clo...@googlegroups.com> wrote:
>
>> Changing the order of classpath entry and not having paths be at the 
>> beginning of the CLASSPATH will break existing code that uses `(io/resource 
>> ...)` to load resources from the CLASSPATH.
>> While in theory the order of the classpath should not matter, in practice 
>> it does, often involuntarily.
>>
>
> Just to reiterate so it's clear, this is bad, at least for deps and 
> usually for most other uses. That's why we provide features in deps.edn to 
> encourage you to be specific when you are overriding something that exists 
> in the classpath rather than relying on an ordering mechanism. If there is 
> a use case where shadowing is a feature and not a bug that is not already 
> covered, I'd be interested in hearing about it.
>  
>
>> Fighweel-main's default behavior is to load `public/index.html` which 
>> works fine if the local paths come first, but will fail if any other JAR 
>> has a `public/index.html` resource.
>>
>> And as we learned, they do!
>>
>
> This is bad, and we should loudly complain about it to whoever is doing 
> it, not just accept it. (It's probably accidental, not intentional.)
>  
>
>> Please consider going back to the old, defined behavior.
>>
>
> I am considering options. 
>  
>
>> All other build tools I know have - for good or bad - a defined CLASSPATH 
>> order.
>>
>
> Do they? I'm not aware of documentation about or guarantees for this with 
> either lein or Maven but would love to be pointed at those docs if you're 
> aware of something. Both Maven and lein have considered how to make builds 
> repeatable/reproducible, but I'm actually not aware that the order is well 
> defined and documented (and I have looked).
>
>  
>

-- 
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/f773ded2-f44e-4222-9d10-07b1c5a9caf2n%40googlegroups.com.

Reply via email to