librelist archives

« back to archive

Mysterious lein errors

Mysterious lein errors

From:
Tom Maynard
Date:
2012-10-11 @ 20:37
I've asked about these before -- elsewhere -- and was told (essentially) 
to, "Pay no attention to the man behind the curtain."  And that was fine 
until just now: I'm trying to set the classpath at runtime, and those 
"mysterious errors" are spoiling it:

??tom@venus ~/Projects/tutorial
??$ lein classpath
Could not find artifact org.clojure:clojure:pom:1.+ in central 
(http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars 
(https://clojars.org/repo/)
Could not find artifact org.clojure:clojure:pom:1.+ in 
stuartsierra-releases (http://stuartsierra.com/maven2)

/home/tom/Projects/tutorial/test:/home/tom/Projects/tutorial/src:/home/tom/Projec....

So efforts to set MY_CLASSP=`lein classpath` fail rather miserably.  
It's those "errors", you see.  What was merely a puzzlement before has 
now become a problem:

??tom@venus ~/Projects/tutorial
??$ echo $MY_CLASSP
Could

I do have a workaround (MY_CLASSP=`lein classpath|tail -1`), but I 
confess to a lingering curiosity about why these "errors" continue to 
appear.

Any ideas?
Tom.

Re: [leiningen] Mysterious lein errors

From:
Sean Corfield
Date:
2012-10-11 @ 23:19
On Thu, Oct 11, 2012 at 1:37 PM, Tom Maynard <tom@maynard.com> wrote:

>  I've asked about these before -- elsewhere -- and was told (essentially)
> to, "Pay no attention to the man behind the curtain."  And that was fine
> until just now: I'm trying to set the classpath at runtime, and those
> "mysterious errors" are spoiling it:
>

It's just overly chatty: it's telling you where it's looking for artifacts
(and not finding them). I agree it would be really nice for these to go
away (and only appear perhaps in some debug mode). Perhaps we should open
an issue against Leiningen - but I suspect they're coming from inside some
library that Leiningen uses and it's hard to swallow the output...?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Re: [leiningen] Mysterious lein errors

From:
Tom Maynard
Date:
2012-10-11 @ 23:50
On 10/11/2012 06:19 PM, Sean Corfield wrote:
> It's just overly chatty: it's telling you where it's looking for 
> artifacts (and not finding them). I agree it would be really nice for 
> these to go away (and only appear perhaps in some debug mode).

At least in my case here, they're related to the presence of seesaw in 
the project.clj.  Remove that and they disappear.  Unfortunately, I'm 
calling another dependency that in turns calls seesaw and triggering the 
"errors" (I suppose I should call them "warnings" since everything else 
does work).  At that point it's really out of my control.

Re: [leiningen] Mysterious lein errors

From:
Chas Emerick
Date:
2012-10-12 @ 00:35
On Oct 11, 2012, at 7:50 PM, Tom Maynard wrote:

> On 10/11/2012 06:19 PM, Sean Corfield wrote:
>> It's just overly chatty: it's telling you where it's looking for 
>> artifacts (and not finding them). I agree it would be really nice for 
>> these to go away (and only appear perhaps in some debug mode).
> 
> At least in my case here, they're related to the presence of seesaw in 
> the project.clj.  Remove that and they disappear.  Unfortunately, I'm 
> calling another dependency that in turns calls seesaw and triggering the 
> "errors" (I suppose I should call them "warnings" since everything else 
> does work).  At that point it's really out of my control.

You can track two issues for this:

https://github.com/cemerick/pomegranate/issues/42
https://github.com/technomancy/leiningen/issues/610

In the meantime, you might be able to avoid the spurious warnings by 
running Leiningen in offline mode with `lein -o ...`.

- Chas

Re: [leiningen] Mysterious lein errors

From:
Tom Maynard
Date:
2012-10-12 @ 03:38
On 10/11/2012 07:35 PM, Chas Emerick wrote:
> In the meantime, you might be able to avoid the spurious warnings by 
running Leiningen in offline mode with `lein -o ...`.

My results:

??tom@venus  ~/Projects/tutorial
??$ FOO=`lein -o classpath`
title:8: parse error
??tom@venus  ~/Projects/tutorial
??$ echo $FOO
Performing task 'classpath' with profile(s): 'offline,dev,user,default'

/home/tom/Projects/tutorial/test:/home/tom/Projects/tutorial/src:/home/tom/Proje....

So, while the warnings have disappeared, a new "informational message" 
has taken their place!  So, I'm back with my original workaround 
(FOO=`lein -o classpath | tail -1`).  I suppose I could work around this 
with creative redirection, but running off with my tail between my legs 
works as well and is probably easier to type.

Thanks for the tip, Chas.  I'll keep an eye on those open issues.