ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siberski, Wolf" <Wolf.Siber...@tui.de>
Subject RE: [RESULT] multithrading
Date Fri, 18 May 2001 08:04:05 GMT
Diane Holt wrote:
[snip]
> As an example case: The build-file for Ant has a target "run-single-test".
> Now, I wanted to run that target so I could test a change I'd made. But I
> certainly didn't want all of Ant built before I could do that (I just
> wanted to run a flippin test!) -- but that's the way it's set up, because

But to bring Your change into effect, didn't You need to rebuild Ant?

> the way it is, "run-single-test" depends on "compile-tests" (which was
> fine) and "compile-tests" depends on "build" (which wasn't fine -- because
> a) I didn't want to compile all those files, and b) it's not really true).
> I'd much rather see a target (eg., "all", "full", whatever) that you could
> run when you -wanted- to build both Ant and the test-cases. And for that
> target, I'd list both "build" and "compile-tests" for the dependencies,
> and I'd list them in that order, and I'd expect that order to be followed.
> And I don't see that as "hiding" anything at all. Is the compiling of the
> test-cases *dependent* on the compiling of the Ant source? Nope. Is the
> full build of Ant, including both the source and the test-cases, dependent
> on building first the Ant source then the test-cases? Yep. So it's much
> more correct to -not- have "compile-tests" depend on "build" (since it
> doesn't really), and instead have a target that specifies the dependency
> that exists only when you really are building both, by listing both those
> targets, in the order in which they need to be run.

I think the difference between our views stems from the fact that You
see the targets as a kind of activities while I see them as kind of
products (correct me if I'm wrong). The product 'runnable test cases' 
has the product 'runnable Ant' as precondition. While You can compile 
the test cases without compiling Ant (if Ant source is available), 
You can't deliver the product 'test cases' until Ant is delivered. 
Therefore I would argument that 'test cases' is dependent on 'Ant', 
although 'compile-test-cases' is not dependent on 'build-ant'.

I understand that You don't want the activity 'build-ant' executed
for running a test case, because You know that the product 'Ant' 
is already up to date, but a decent build tool would find this out 
in a very short time period, too. On the other hand obviously
having the product 'Ant' built is a precondition for running the
test, so it shouldn't be omitted from the dependencies.

To solve this specific problem pragmatically, my suggestion
would be to introduce a command line option which allows
to build a target ignoring the specified dependencies.
This would be a much cleaner solution than removing dependencies
in the build file just to be able to run it stand-alone.

Wolf

Mime
View raw message