shdqcdsn / counterclockwise

Automatically exported from code.google.com/p/counterclockwise
0 stars 0 forks source link

Wrong error reports for dependency resolution #653

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Counterclockwise: 0.27.1
Eclipse: Kepler 4.3.2.M20140221-1700

After updating to CCW 0.27.1, CCW reports a "Leiningen Manged Dependencies 
issue" (prbolems view) per project. When I remove the reported dependencies (or 
their transitive parents) from the project.clj, one of the other (transitive) 
dependencies is reported in a similar error.

"lein deps" and "lein deps :tree" do not report any dependency errors.

Luckily, this error scenario does not prevent working with the project (REPL 
starts and editing with content asist works as well).

Original issue reported on code.google.com by Gunnar.V...@googlemail.com on 9 Sep 2014 at 11:15

GoogleCodeExporter commented 9 years ago
Well, I had incorporated a patch from paxnil wrt to source paths, and he 
submitted a corrective patch 2 days ago for this same feature. Maybe it's 
related.

Do you see more informative errors in the Eclipse log?

Original comment by laurent....@gmail.com on 9 Sep 2014 at 9:48

GoogleCodeExporter commented 9 years ago
No, there are no log entries. I did both "Update Dependencies" and "Reset 
Project Configuration".

Original comment by Gunnar.V...@googlemail.com on 10 Sep 2014 at 8:29

GoogleCodeExporter commented 9 years ago
It seems that only the projects are effected which use alternative repositories 
specified via :repositories in the project.clj or depend on projects that do 
this.
For example to use pallet you need the following:

:repositories 
{"sonatype-snapshots" "https://oss.sonatype.org/content/repositories/snapshots",
 "sonatype" "https://oss.sonatype.org/content/repositories/releases/"}

You can reproduce it with the following minimal project.clj:

(defproject some-lib "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.cloudhoist/pallet "0.7.5"]]

  :repositories
  {"sonatype-snapshots" "https://oss.sonatype.org/content/repositories/snapshots",
   "sonatype" "https://oss.sonatype.org/content/repositories/releases/"})

Original comment by Gunnar.V...@googlemail.com on 16 Sep 2014 at 4:59

GoogleCodeExporter commented 9 years ago
It's great you were able to narrow down and reproduce the issue, thanks!

Original comment by laurent....@gmail.com on 16 Sep 2014 at 7:45

GoogleCodeExporter commented 9 years ago
OK, so this is probably an issue that has existed for a long time. Will try to 
fix it while I upgrade CCW to Leiningen  2.5.0

Original comment by laurent....@gmail.com on 19 Sep 2014 at 3:30

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 25 Sep 2014 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 25 Sep 2014 at 9:26

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 2 Oct 2014 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 20 Oct 2014 at 8:56

GoogleCodeExporter commented 9 years ago
've pushed a tentative fix on the master branch updatesite: 
http://updatesite.ccw-ide.org/branch/maste

Original comment by laurent....@gmail.com on 20 Oct 2014 at 11:12

GoogleCodeExporter commented 9 years ago
I wanted to try the fix via a standalone product from the master branch, but 
the standalone product does not work (see #665).

Original comment by Gunnar.V...@googlemail.com on 21 Oct 2014 at 10:28

GoogleCodeExporter commented 9 years ago
Issue 661 has been merged into this issue.

Original comment by laurent....@gmail.com on 6 Nov 2014 at 1:30

GoogleCodeExporter commented 9 years ago
This error concerning the repositories has gotten worse. Now, it blocks the 
whole Eclipse in the "Initializing Java Tooling" step when "Configuring 
classpath containers". I am not able to do any work in CCW! :(
I'll try to change the project.clj files to resume work.

Original comment by Gunnar.V...@googlemail.com on 10 Nov 2014 at 3:25

GoogleCodeExporter commented 9 years ago
Wow, what kind of mess did I do?

Fortunately, the diffs are small enough that I hope to understand and fix this 
regression. 

Original comment by laurent....@gmail.com on 10 Nov 2014 at 9:47

GoogleCodeExporter commented 9 years ago
Execuse me, I should have been more specific.
That does not refer to your master branch.
The above problems arose with CCW 0.29.0 (stable) with Eclipse Kepler (probably 
SR2) and Eclipse Luna (SR1).

Original comment by Gunnar.V...@googlemail.com on 11 Nov 2014 at 7:17

GoogleCodeExporter commented 9 years ago
I tested the latest commit on master (0.29.1.201411080007).

I copied the existing Eclipse projects to the new workspace for this 
installation.
Import per drag & drop of the plain Leiningen project with "Copy files and 
folders" results in the following:
(1) Error message "Destination folder must be accessible" (It is as far as I 
can tell.)
(2) Dialog: "D&D project creation" with "Find and create projects from ..."
(3a) Project is created - but nothing is copied into the workspace.
(3b) Error message " Could not reset project classpath" with stacktrace [1].

* "Leiningen -> Reset project configuration" fails with the same error message 
and stacktrace [1].
* "Leiningen -> Update dependencies" freezes Eclipse completely for 1-2 
minutes. Either no log output or the same stacktrace [1]. (I didn't refresh the 
log in time to check.)

Stacktrace [1]:

!MESSAGE Could not reset project classpath
!STACK 0
java.lang.ClassCastException: Cannot cast java.lang.String to 
org.eclipse.core.runtime.IPath
    at java.lang.Class.cast(Class.java:3094)
    at clojure.lang.Reflector.boxArg(Reflector.java:427)
    at clojure.lang.Reflector.boxArgs(Reflector.java:460)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:58)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at ccw.jdt$set_default_output_path_BANG_.invoke(jdt.clj:128)
    at ccw.leiningen.nature$reset_project_build_path.doInvoke(nature.clj:139)
    at clojure.lang.RestFn.invoke(RestFn.java:442)
    at ccw.leiningen.nature$factory$reify__4810$fn__4814.invoke(nature.clj:168)
    at ccw.eclipse$workspace_job$fn__3834.invoke(eclipse.clj:501)
    at ccw.eclipse.proxy$org.eclipse.core.resources.WorkspaceJob$ff19274a.runInWorkspace(Unknown Source)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Original comment by Gunnar.V...@googlemail.com on 11 Nov 2014 at 2:11

GoogleCodeExporter commented 9 years ago
I commited the fix yesterday night. Hopefully it gets totally rid of this 
problem.

Original comment by laurent....@gmail.com on 12 Nov 2014 at 10:27

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 13 Nov 2014 at 2:07