Further clarifying after face-to-face with John: I'm proposing, for all modules touching a given java package, *union over modules of (<includes/> - <excludes/>)*
it'd be nice to find an optimized expression that reduced the list away, but the obvious *union(<includes/>) - intersection(<excludes/>)* doesn't do that. On Mon, Apr 12, 2010 at 1:53 PM, Freeland Abbott <[email protected]> wrote: > > > On Mon, Apr 12, 2010 at 12:10 PM, John Tamplin <[email protected]> wrote: > >> >> > How would you handle the following: >> >> A: include foo*.java, exclude b*.java >> B: include bar*.java, exclude foobaz.java >> >> I am assuming your union would be the following: >> >> - all foo*.java >> - all bar*.java >> >> Is that correct? >> > > Close, but it'd actually include all foo*.java and all b*.java, not just > bar*.java. But you probably knew that and just typo'ed.... > > > It seems like maybe you would want to merge in the excludes as well so that >> the most specific rule applies, which would remove foobaz.java from the >> list. >> > > No, I think that's wrong. A wants foobaz.java, so if B takes it away, then > it breaks A, which my app needed. So either I should remove the inherits of > A (in which case the problem goes away 'cause I didn't need A after all), or > I need GWT to see the union of anything passed by *either* A *or* B. B > can't yank the rug out from under A. > > This also means I don't believe in the "foobaz is toxic to me, keep it away > at all costs" storyline for <excludes/>. I instead read <source > ...><excludes/></source> as "I need ... but don't care about ...," which > leaves the option for some other module A to pull in the files that it needs > but B didn't care about. > > Find me a counter-example and I'll change my mind, but I think the "toxic" > interpretation of <excludes/> introduces a new error case (B removing what A > wants) without solving an actual problem (if foobaz is toxic, it's toxic to > everybody, not just B, and A can have no legitimate usecase for it). > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
