On Tue, Aug 2, 2011 at 4:28 AM, Alex Boisvert <[email protected]>wrote:
> Ignoring backward compatibility for a second, I'd be OK to changing
> compile.with such that any referenced project is mapped to both its
> compile.target and test.compile.target. (And for consistency, we would use
> the same rule for test.with, run.with and similar functions.) However, if
> you'd want to use foo's jar then you'd need to write compile.with
> project('foo').package(:jar) instead. But I wouldn't want to get into
> rules that look like "if foo exports a jar, use it, otherwise use its
> compile.target, yaddy-yadda." It's too much to require our users to
> remember these rules and they could easily get confused.
>
> I think this change would align us better which today's IDE defaults and
> people's initial expectations. So my only restraint is that we would need
> to roll this out in a backward-compatibility-breaking major release. It
> couldn't go in a minor release.
>
If at all possible I would prefer not to make this change. In quite a few
projects we post-process classes before they get into a jar or as they go
into a jar or ... And this would be made a bit more difficult under this new
model.
In the Intellij IDE support we actually use the class paths if the
dependency is part of a project. i.e. project('foo') will result
in project('foo')._(:target, :main, :classes) added to the IDE project files
as will project('foo').package(:jar)
--
Cheers,
Peter Donald