Skip to content

lein doesn't print all tasks in Windows XP #592

Closed
borkdude opened this Issue May 21, 2012 · 10 comments

5 participants

@michaelklishin
Collaborator

Do you have .lein/profile.clj? It may be because some plugin fails to load and it terminates task listing operation

@borkdude

I assume you mean profiles.clj (plural), but with or without doesn't make a difference.

@kumarshantanu
Collaborator

I can reproduce this bug. I have a 32-bit XP on JDK 1.7.0_04 with no %USERPROFILE%/.lein/profiles.clj file created.

@technomancy
Owner

Is XP the only Windows version where this occurs?

@ath
ath commented May 29, 2012

A workmate also sees a very short list under Windows XP. Could it have to do with spaces in the path C:\Documents and Settings\…?
Under Vista and Win7 MS changed this to C:\Users\….

@borkdude
borkdude commented Jun 2, 2012

Discovered the following:

  • this only occurs on windows XP, not on Windows 7
  • When running from a leiningen checkout lein prints all its tasks in XP.
  • When not running from a checkout (inside or outside project) lein prints only the plugins as tasks in XP.

Any clues on where to look next?

@technomancy
Owner

It sounds like a problem with the bultitude library: https://github.com/Raynes/bultitude

The help task uses bultitude's namespaces-on-classpath function.

@borkdude
borkdude commented Jun 6, 2012

I included these lines in leiningen/help.clj to debug a little more and build a standalone jar which I tried on XP:

 (println "-------")
 (println "classpath-files" (b/classpath-files))
 (println "-------")
 (println "namespaces-on-classpath without prefix" (b/namespaces-on-classpath :prefix ""))
 (println "-------")
 (println "namespaces-on-classpath" (b/namespaces-on-classpath :prefix "leiningen"))

The output can be seen here:
https://gist.github.com/2885180

It seems that only paths that are not encoded with %20 for spaces get their namespaces recognized. For some reason the default java libraries and the leiningen standalone are encoded, but plugins (lein newnew) or dependencies (clojure) are not.

Maybe @raynes know something?

PS: The reason why the tasks on Windows 7 -are- printed is probably that the self-install directory doesn't contain any spaces there (output on Windows 7: https://gist.github.com/2885264).

PPS: FWIW, I can manually get at the leiningen self-install "URL" by doing this in a REPL in XP:

https://gist.github.com/2885423

@borkdude
borkdude commented Jun 7, 2012

This fix in bultitude seems to solve it: Raynes/bultitude#9

@borkdude
borkdude commented Jun 9, 2012

Bumping to bultitude version 0.1.6 in project.clj should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.