lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: Contrib tests fail if core jar is not up to date
Date Fri, 19 Mar 2010 14:28:20 GMT
Sorry Uwe, I didn't have access to a computer all day :).

I'll take a look at the patch later though (if you'll wait) as even now I
have brief access to a computer, w/ no code on it :).

Shai

On Fri, Mar 19, 2010 at 12:25 PM, Uwe Schindler <uwe@thetaphi.de> wrote:

>  I opened an issue:
>
> https://issues.apache.org/jira/browse/LUCENE-2333
>
>
>
> -----
>
> Uwe Schindler
>
> H.-H.-Meier-Allee 63, D-28213 Bremen
>
> http://www.thetaphi.de
>
> eMail: uwe@thetaphi.de
>
>
>
> *From:* Uwe Schindler [mailto:uwe@thetaphi.de]
> *Sent:* Friday, March 19, 2010 9:19 AM
>
> *To:* java-dev@lucene.apache.org
> *Subject:* RE: Contrib tests fail if core jar is not up to date
>
>
>
> Hi Shai,
>
>
>
> attached is a patch hat fixes your issue, as described in the previous
> mail. It now does not do any “short-circuit” checks for the core.jar
> available, instead solely uses a property that is set by the parent.
>
>
>
> This works good, now always when you compile a contrib solely (inside its
> folder), the core is compiled. If you run from top-level build.xml the
> top-level build compiles the core as dependency and passes the
> “core.compiled” property down to the contrib-crawl.
>
>
>
> In contrib are still other short-circuits like this. E.g. The benchmark
> contrib checks, if the jar files of other contribs it depends on are
> available and only if not recompiles. This leads to the same problem is you
> change one of the depends-on contribs source code. In this case there is no
> way around a top-level clean, sorry.
>
>
>
> Please still open an issue J
>
>
>
> Uwe
>
>
>
> -----
>
> Uwe Schindler
>
> H.-H.-Meier-Allee 63, D-28213 Bremen
>
> http://www.thetaphi.de
>
> eMail: uwe@thetaphi.de
>
>
>
> *From:* Uwe Schindler [mailto:uwe@thetaphi.de]
> *Sent:* Friday, March 19, 2010 8:47 AM
> *To:* java-dev@lucene.apache.org
> *Subject:* RE: Contrib tests fail if core jar is not up to date
>
>
>
> Hi Shai again,
>
>
>
> the whole thing is more complicated, sorry; on the first insight it seemed
> simple, but: I had this problem, too. But I didn’t care as I simply did “ant
> clean” and all was fine. Adding “jar-core” to the build-contrib task would
> principally work, but only for build-contrib. During my failures, I had the
> problem, that I was inside a contrib module and changed something in core,
> and tried ant compile or ant test. Both of then were probably fail. The
> problem here is that contrib. does not depend on the compilation/jarify of
> the top-level build, it just checks if the folders/jars are there. This
> explains, why the updates in core are not cause a contrib to update its
> core.
>
>
>
> To fix this, the easiest is to change in contrib/common-build.xml both
> “unless”-attributes in “build-lucene” and “build-lucene-test”. We did not
do
> this for speed reasons (as far as I know), because for each contrib (also
> during top-level build contrib.), the jar compilation would be triggered
> (and that’s very often, even if javac only recompiled changed files, but jar
> building is heavy, too)
>
>
>
> An idea how to  fix this would be to change the “unless” to some check like
> that:
>
> -          If the task is solely started from a contrib folder, the
> build-core tasks are run (as no special property is set, e.g.
> “build.from.core”. The “unless” would contain this undefined property, so it
> would always run)
>
> -          If the task is started from main build.xml
> (build/test-contrib), the main build sets the above property on calling
> subant, that would be checked by the unless part. The core build.xml would
> compile the core one time, sets the property. “build.from.core” and the
> contrib’s check for unless would simply leave out.
>
>
>
> That sounds like a solution. I am currently hacking that. Can you still
> open an issue?
>
>
>
> Uwe
>
>
>
> -----
>
> Uwe Schindler
>
> H.-H.-Meier-Allee 63, D-28213 Bremen
>
> http://www.thetaphi.de
>
> eMail: uwe@thetaphi.de
>
>
>
> *From:* Uwe Schindler [mailto:uwe@thetaphi.de]
> *Sent:* Friday, March 19, 2010 8:27 AM
> *To:* java-dev@lucene.apache.org
> *Subject:* RE: Contrib tests fail if core jar is not up to date
>
>
>
> Hi Shai,
>
>
>
> Good morning!
>
>
>
> (1)    if you add the dependency to jar-core to the task, the jar is
> rebuild (everytime, as ANT has no idea if something changed, no need to
> delete). Jar-core depends also on compile-core, so the core compilation is
> always updates.
>
> (2)    In this case we simply need compile-core instead of jar-core as
> dependency.
>
>
>
> I will take care and will check all variants of calling when fixing the
> problem.
>
>
>
> Can you open an issue, I’ll attach a patch there?
>
>
>
> Uwe
>
>
>
> -----
>
> Uwe Schindler
>
> H.-H.-Meier-Allee 63, D-28213 Bremen
>
> http://www.thetaphi.de
>
> eMail: uwe@thetaphi.de
>
>
>
> *From:* Shai Erera [mailto:serera@gmail.com]
> *Sent:* Friday, March 19, 2010 5:25 AM
> *To:* java-dev@lucene.apache.org
> *Subject:* Re: Contrib tests fail if core jar is not up to date
>
>
>
> Uwe,
>
> (1) the problem is not the missing dependency, but rather the use of
> lucene.jar.present. So you'll need to remove it as well.
> (2) Adding build/classes/java is not enough - you'll need to add a target
> dependency on compile-core or something.
>
> I guess you already know that. Just pointing it out :).
>
> Thanks for taking care of this,
>
> Shai
>
> On Thu, Mar 18, 2010 at 11:51 PM, Robert Muir <rcmuir@gmail.com> wrote:
>
> On Thu, Mar 18, 2010 at 5:50 PM, Chris Hostetter
> <hossman_lucene@fucit.org> wrote:
>
> >
> > It's a hack, but it's a useful hack for getting nightly builds that can
> > report on the tests for all contribs, even if the first one fails (it's
> > less useful when one contrib depends on another, but that's a more
> complex
> > issue)
> >
> > -Hoss
> >
>
> Hoss, thanks, that makes sense.
>
>
>
>
> --
> Robert Muir
> rcmuir@gmail.com
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
>

Mime
View raw message