lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Call for help: moving from ant build to gradle
Date Tue, 07 May 2019 16:37:18 GMT
bq. Just curious, what motivates "*I’ve also disabled transitive
dependencies and found a way to easily make modules transitive in the face
of that (fingers crossed)*"

Well, our community is a bit religious about transitive dependencies, so
it's unlikely we get by without objection to allowing them now. If you take
a look at Dawid's issue investing Gradle in like 2014, this is one of the
first things to come up. It's why we have them disabled with Ivy.

Now of course you can enable them and just exclude certain transitive deps,
but this is often done lazily and right now we are pretty tight with what
we bring in. Turning on transitive will have ZooKeeper bring in spotbugs
and netty stuff for example. As people add dependencies, it's much more
likely with transitive off that they won't think they need to accept those
unnecessary deps and they won't have to trial and error to exclude them
(won't often happen).

Okay, great, so Gradle let's you turn off transitive deps. Unfortunately,
this is only easy to do universally, including the other modules/projects
you import. So every module not only has to import lucene-test-framework,
but also junit and carrot stuff. Not only do you have to pull in
solr-server, but you have to specify and get right every jetty dep, in
every module that uses it. User consumers are prob put in the same
position. With ant+ivy now we actually get module transitivity, but not 3rd
party dep transitivity.

Gradle let's you be selective, but it's completely rigged to want you to
selectively turn off transitivity, not turn it on. This is a bit of a
problem in terms of enforcement over time, and is a cumbersome config to
apply to every dep we add.

So I've worked out a way to make it easy to specify a transitive project,
eg testImplementationTran project(':lucene:test-framework'). Now that was a
bit painful to get working, though a small amount of code. And then a bit
more painful to get working in a way that the project gives you it's deps,
but then *they* are not transitive. I've done something that appears to
work, but I'm still vetting it. I'm not sure my eclipse ide is as happy as
cmd line gradle is about it.

May have to abandon, but I'm doing my best to match the current accepted
situation in an enforcement and convenient way.

- Mark



On Tue, May 7, 2019 at 11:10 AM Gus Heck <gus.heck@gmail.com> wrote:

> Just curious, what motivates "*I’ve also disabled transitive dependencies
> and found a way to easily make modules transitive in the face of that
> (fingers crossed)*"
>
>
> On Mon, May 6, 2019 at 10:31 PM Mark Miller <markrmiller@gmail.com> wrote:
>
>> I finally got a go ahead from Uwe on Twitter, so looks like we can start
>> in earnest.
>>
>> Give me a day or two to get my experimentación branch in order and I’ll
>> share.
>>
>> Like I said, I grabbed Dat’s buildSrc module which has the forbidden apis
>> and project checkout checks.
>>
>> Then I integrated in a way that you don’t have to move src or test
>> resource files - ideal in general, but also critical for keeping things up
>> to date during dev.
>>
>> I also grabbed Palantirs versión consistency plugin that ensures
>> consistent version resolution across modules and has better version locking
>> than Gradle, with a root dependency/version lock file with one dependency
>> per line that gets written out.
>>
>> I’m also almost done moving version specifications to a root properties
>> file as that plugin expects.
>>
>> I’ve also disabled transitive dependencies and found a way to easily make
>> modules transitive in the face of that (fingers crossed)
>>
>> I’ve also started adding some of the regenerate stuff, automata and what
>> not, still have to do jflex and do some testing.
>>
>> Currently everything is building and tests are passing, but there is a
>> bit around dependencies and versioning I want to clean up before sharing
>> for collaboration.
>>
>> Mark
>>
>>
>> --
>> - Mark
>>
>> http://about.me/markrmiller
>>
>
>
> --
> http://www.needhamsoftware.com (work)
> http://www.the111shift.com (play)
>


-- 
- Mark

http://about.me/markrmiller

Mime
View raw message