librelist archives

« back to archive

Cannot use search function with lein2

Cannot use search function with lein2

From:
Date:
2012-09-07 @ 15:56
Hi,
I'm having issues with Leiningen2. I installed as per guide, but I'm 
having difficulties.

I can't use the search functionality, every time I do "lein2 search x" 
it returns nothing (leiningen 1.x continues to work well).
Then I tried the search functionality in a project directory and lein2 
became unresponsive (whilst downloading maven indices).
It started consuming disk space at a rapid pace. I let it continue 
until it had consumed about 1 GB worth of disk space before I killed it 
with ctrl-c.

After doing a quick "find . -cmin -1" I discovered that 
~/.lein/indices/* was being filled up with maven incremental index 
files.

How much disk space does lein2 require (or is this a bug) and how could 
I potentially switch this behaviour off.
I'm using Leiningen 1.7.1 for lein1 and Leiningen 2.0.0-preview10 for lein2.

Thanks in advance.

Greetings,
Alex

Re: [leiningen] Cannot use search function with lein2

From:
Phil Hagelberg
Date:
2012-09-07 @ 16:19
enterprise@zonnet.nl writes:

> I can't use the search functionality, every time I do "lein2 search x" 
> it returns nothing (leiningen 1.x continues to work well).

There was a known bug where search in preview10 is broken when run
outside a project directory. It's been fixed on master.

Leiningen 1 works, but only because you have the old indices cached in
~/.lein. If you cleared them, it would fail because the remote index
format has changed.

> How much disk space does lein2 require (or is this a bug) and how could 
> I potentially switch this behaviour off.
> I'm using Leiningen 1.7.1 for lein1 and Leiningen 2.0.0-preview10 for lein2.

The incremental indices are temporarily more disk-hungry, but they get
compacted once they are all downloaded; I believe Central's indices end
up around 300MB though they take more than 1GB during download. There is
currently no partial compaction.

I'm not sure how much control we have over this process; since the index
format is no longer just a plain Lucene index we have to use the
maven-indexer library which handles the incremental downloads and merges
for us.

Discussion of the implementation is here: 
https://github.com/technomancy/leiningen/issues/683

-Phil

Re: [leiningen] Cannot use search function with lein2

From:
Date:
2012-09-08 @ 13:39
Hi Phil,
Thanks for your response.
Everything works (or it worked to begin with).

My main issue was that there is no visual indicator on what's going on 
during the download of the indices, I just saw that my disk space was 
being reduced and that got me worried a little bit.

Anyway, thanks for your time.

Greetings,
Alex

Re: [leiningen] Cannot use search function with lein2

From:
Phil Hagelberg
Date:
2012-09-09 @ 21:42
enterprise@zonnet.nl writes:

> My main issue was that there is no visual indicator on what's going on 
> during the download of the indices, I just saw that my disk space was 
> being reduced and that got me worried a little bit.

Yeah, we had a download indicator in the old version where we could
directly download the indices, but now that we have to use the Maven
index library that implementation had to be dumped.

I believe there's a working implementation of progress reporting on the
experimental repo from #243. I've created an issue for it here:

    https://github.com/technomancy/leiningen/issues/775

-Phil