-
Notifications
You must be signed in to change notification settings - Fork 100
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
Including both the library jar and the sources jar on the classpath results in an exception #190
Comments
As we've talked about elsewhere, I'm unconvinced that putting the sources jar on the classpath is a sensible thing to do in the first place. In other sources jars that we publish on Maven central, we do a variety of things (empty jar, only java source, java and clojure source, etc - there is no real "standard" here). Maven central has rules that you must include the sources jar and might have rules about non-empty source jars (can't remember), and I think you can ask for these rule to be turned off for non-Java projects, but I can't remember all the details now. Seems like you would run into this same kind of problem with data_readers.clj too? |
Recap'ing that conversation, over the last 8 months I've worked with this approach over a variety of large real-world projects. This is the only ever experienced instance of a problem. Said instance being an intentional failure. My approach is sensible/unobstrusive because it places source artifacts at the tail of the classpath.
TIL, thanks for sharing this nuance.
With data_readers it's kind of the opposite situation: Clojure intentionally encourages us to have multiple identically-named resources in the classpath, and accordingly throws no exception whatsoever. |
I've just run into the same problem. |
@vemv is there a way to exclude a specific artifact in the enrich-classpath's configuration? |
I think the same. In the aws-api source there's this TODO:
That could be a "neutral" fix; one can observe that reading config from the classpath is a little too implicit. It is quite common to build config programatically, for dev/test matters.
DMing you over Slack |
Hi,
this library also provides a
"sources"
artifact. When said artifact is also in the classpath along with the main library, the following will fail:aws-api/src/cognitect/aws/http.clj
Line 76 in 1de65bd
I think this error doesn't make sense in face of the "sources" artifact. Why would you provide such an artifact when it can't coexist with the main one? Tooling (or users, by hand) can always be inclined to put both under the classpath, which is useful for the CIDER family of tools.
There's probably a few possible solutions:
"sources"
after the main artifacts. The classpath is order-sensitive so there's no ambiguity whatsoever.WDYT?
Thanks - V
The text was updated successfully, but these errors were encountered: