I failed to elaborate on the cleanup suggestions... - At a minimum, we can make macros for the distinct types, and enforce a depends= ban that way. I don't know a pretty way to enforce correlation to content, though (i.e. to say "no gwt.ant in this macro body"). - We don't actually have THAT many "action" rules; we could just have the subdirectory targets only for building, allow dependencies on them, and instead of using call-subproject for lateral calls from actions, have them use gwt.ant directly, after depending on the subproject, and never reference $target at all. That is:
... <target name="test" depends="dist-dev"> <!-- dist-dev => buildtools, dev-one, jni-one, user, servlet --> ... <gwt.ant dir="user" target="test"/> <gwt.ant dir="servlet" target="test"/> ... </target> <target name="servlet" depends="user"> <gwt.ant dir="servlet" target="build"/> </target> <target name="user" depends="dev-one"> <gwt.ant dir="user" target="build"/> </target>... On Thu, Jun 18, 2009 at 12:52 AM, <fabb...@google.com> wrote: > Reviewers: bobv, > > Description: > This is build-timeout surgery... I have some suggestions for cleanup > later. > > The real problem is that in r5557 I caused target "test" to > call-subproject into to top-level "servlet" for subtarget "test"... and > servlet depends on user, which uses gwt.ant (sensitive to $target) to > descend into user and... test it. Ditto for tools. > > I find the use of $target mildly confusing, but the big issue is that > while we want "action" rules like test to descend with some other target > (e.g. test), we want "subdirectory" rules to build their dependencies > with build and then descend with whatever $target is... but those > dependencies can't figure out whether they were called from an action > like test or from another subdirectory like servlet or tools. > > Since ant's "if" constructs are all nasty, I opted to make the > action/subdirectory distinction explicit, and to ban "depends" from > subdirectories. > > Please review this at http://gwt-code-reviews.appspot.com/43801 > > Affected files: > build.xml > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---