-
Notifications
You must be signed in to change notification settings - Fork 7
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
Dependency cycle for clj-pdf - Curive 1.8.0 IntelliJ 2018.2 and 2018.3 #2094
Comments
I've got the same problem, and I figured out how it was happening for me, so perhaps it will help solve this other issue as well: I was working on a library, that had a dependency on another library, which itself used the library I was working on. This caused the source of the library and the jar of the library to both be on the classpath. The namespaces that had the problem did the I fixed it by running:
with the proper aliases, and adding exclusions to keep the extra version from coming in. |
+1 for allowing this issue to be reported (as it was previously) but still allow the code to be loaded into the REPL. Whilst I agree that it would be nice to prevent these types of things happening ( usually only found when recompiling or restarting the repl) the previous warning only at least allowed me to carry on regardless. The new version prevents any REPL reload. clj-pdf seem to use some hooky method to get around the circular dependency to allow it to compile but it seems that Cursive is finding this. section.clj has two requires statements - one at the end of the file preceded by a rather nice comment stating Not sure how legitimate this is but that it can work suggests others may do the same |
@alin-posorovaschi-otm how did you downgrade? Thx |
FWIW - with clj-pdf, as it is only core/pdf I was using I dynamically linked like so
I had to use (symbol "...") to prevent cursive from detecting anything Then
works fine |
@ism-ssw |
Thanks for the comments everyone. I think a better solution is actually for Cursive to understand when a require will cause the dependency cycle error in Clojure, and only prevent loading when that would happen anyway, and give a warning otherwise. This has actually come up in the past with one of ztellman's projects, but I can't find the issue right now. |
Here's the relevant discussion in the Clojure mailing list: https://groups.google.com/d/topic/clojure/wrVFuCjf0_Y/discussion |
Thanks for the update. To be honest, I am quite surprised that the workaround in clj-pdf actually did work. |
@cursive-ide Are you referring to the following issue: As for what happens in clj-pdf, as @ism-ssw already mentioned,
And
So, without looking to manifold's code, it seems to me this is related to it, in that the cyclic dependency does not appear in the |
What version of Cursive doesn't have this issue? I need to downgrade, pronto! |
@hlship |
Do we know if IJ 2019.1.2 fixes this problem? |
I have a Leiningen project that uses clj-pdf version
[clj-pdf "2.2.33"]
. Everything worked fine with Cursive version (1.7.x) but when I upgraded to 1.8.x the same project stopped compiling in Cursive with aDependency cycle
error (i.e. cannot load any file that depends on clj-pdf into the REPL). I experienced this issue with IntelliJ Community Edition versions 2018.2.x and 2018.3.x. I had to downgrade Cursive to continue my work.I'm using the paid version of Cursive.
The text was updated successfully, but these errors were encountered: