You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Michael Stockton <mi...@gmail.com> on 2009/04/11 01:27:23 UTC

building java libs with log4j

I tried to build thrift this afternoon and failed because I don't have  
log4j on my machine.  This seems to be a bit unfriendly at the moment  
and to me feels like a 0.1 blocker-type issue.  How many people will  
give up on thrift if make fails? Can we bundle log4j with thrift or  
find a better way to fail?

Michael

Re: building java libs with log4j

Posted by Chad Walters <Ch...@microsoft.com>.
I suggest we get the first release out and include the jar in the release. I agree with David that this may take away a lot of the issues of user and developer convenience. If it doesn't, we should revisit.

Chad

On 4/10/09 9:13 PM, "David Reiss" <dr...@facebook.com> wrote:

> Why do you object so strongly to having binaries in the source tree?
- It bloats the size of the repository, making checkouts slower.
- The source is not available for users to inspect.
- It requires that the Thrift developers keep the jar up to date,
  weigh the benefits and drawbacks of upgrading, etc.

These are just the ones I have thought of off the top of my head.
I suppose it is the same reason we don't include boost, libevent,
or even a JDK.

> It's not going to suck up that much size,
The log4j jar is 50% the size of a tar.gz of the Thrift source.

> and it greatly simplifies things.
apt-get install liblog4j1.2-java
problem solved.

> For casual developers or users,
I am less opposed to putting the jar in the release tarballs or
instant releases. (I hope you saw my other reply.  Sorry the thread
got forked.  Users should probably be using these instead of svn.

> or those who don't use the
> java libraries, it'll mean "make check" actually passes simply.
I can extend ax_javac_and_java.m4 to be able to check for a specific class.
We can just disable java if log4j isn't available.

> An alternative would be to use maven to fulfill the dependencies,
I think we should start buy updating this page
<http://wiki.apache.org/thrift/ThriftRequirements>
so that users will at least know how to build Thrift
if they do not have Maven.

> but
> I don't really have any personal experience with that. If someone
> wanted to contribute to that approach, I'd be pretty pumped.
+1.  There was an issue about this filed by someone who presumably
knows what they are doing.  Maybe we should follow up with him.

--David


Re: building java libs with log4j

Posted by David Reiss <dr...@facebook.com>.
> Why do you object so strongly to having binaries in the source tree?  
- It bloats the size of the repository, making checkouts slower.
- The source is not available for users to inspect.
- It requires that the Thrift developers keep the jar up to date,
  weigh the benefits and drawbacks of upgrading, etc.

These are just the ones I have thought of off the top of my head.
I suppose it is the same reason we don't include boost, libevent,
or even a JDK.

> It's not going to suck up that much size,
The log4j jar is 50% the size of a tar.gz of the Thrift source.

> and it greatly simplifies things.
apt-get install liblog4j1.2-java
problem solved.

> For casual developers or users,
I am less opposed to putting the jar in the release tarballs or
instant releases. (I hope you saw my other reply.  Sorry the thread
got forked.  Users should probably be using these instead of svn.

> or those who don't use the 
> java libraries, it'll mean "make check" actually passes simply.
I can extend ax_javac_and_java.m4 to be able to check for a specific class.
We can just disable java if log4j isn't available.

> An alternative would be to use maven to fulfill the dependencies,
I think we should start buy updating this page
<http://wiki.apache.org/thrift/ThriftRequirements>
so that users will at least know how to build Thrift
if they do not have Maven.

> but  
> I don't really have any personal experience with that. If someone  
> wanted to contribute to that approach, I'd be pretty pumped.
+1.  There was an issue about this filed by someone who presumably
knows what they are doing.  Maybe we should follow up with him.

--David

Re: building java libs with log4j

Posted by Bryan Duxbury <br...@rapleaf.com>.
Why do you object so strongly to having binaries in the source tree?  
It's not going to suck up that much size, and it greatly simplifies  
things. For casual developers or users, or those who don't use the  
java libraries, it'll mean "make check" actually passes simply.

An alternative would be to use maven to fulfill the dependencies, but  
I don't really have any personal experience with that. If someone  
wanted to contribute to that approach, I'd be pretty pumped.

-Bryan

On Apr 10, 2009, at 4:51 PM, David Reiss wrote:

> Yes, I object to adding external binaries to our source tree.
> If we want to add them to release tarballs, that is fine.
>
> --David
>
> Bryan Duxbury wrote:
>> I tend to agree here. Other Java projects that have jars as
>> dependencies tend to put the jars in source control in a lib
>> directory. This would make our build file a lot simpler and the whole
>> project a lot easier to operate.
>>
>> Does anyone object to adding the jars to the project? If not, I'll
>> add the needed jars and update the build file.
>>
>> -Bryan
>>
>> On Apr 10, 2009, at 4:27 PM, Michael Stockton wrote:
>>
>>> I tried to build thrift this afternoon and failed because I don't
>>> have log4j on my machine.  This seems to be a bit unfriendly at the
>>> moment and to me feels like a 0.1 blocker-type issue.  How many
>>> people will give up on thrift if make fails? Can we bundle log4j
>>> with thrift or find a better way to fail?
>>>
>>> Michael
>>


Re: building java libs with log4j

Posted by David Reiss <dr...@facebook.com>.
Yes, I object to adding external binaries to our source tree.
If we want to add them to release tarballs, that is fine.

--David

Bryan Duxbury wrote:
> I tend to agree here. Other Java projects that have jars as  
> dependencies tend to put the jars in source control in a lib  
> directory. This would make our build file a lot simpler and the whole  
> project a lot easier to operate.
> 
> Does anyone object to adding the jars to the project? If not, I'll  
> add the needed jars and update the build file.
> 
> -Bryan
> 
> On Apr 10, 2009, at 4:27 PM, Michael Stockton wrote:
> 
>> I tried to build thrift this afternoon and failed because I don't  
>> have log4j on my machine.  This seems to be a bit unfriendly at the  
>> moment and to me feels like a 0.1 blocker-type issue.  How many  
>> people will give up on thrift if make fails? Can we bundle log4j  
>> with thrift or find a better way to fail?
>>
>> Michael
> 

Re: building java libs with log4j

Posted by Bryan Duxbury <br...@rapleaf.com>.
I tend to agree here. Other Java projects that have jars as  
dependencies tend to put the jars in source control in a lib  
directory. This would make our build file a lot simpler and the whole  
project a lot easier to operate.

Does anyone object to adding the jars to the project? If not, I'll  
add the needed jars and update the build file.

-Bryan

On Apr 10, 2009, at 4:27 PM, Michael Stockton wrote:

>
> I tried to build thrift this afternoon and failed because I don't  
> have log4j on my machine.  This seems to be a bit unfriendly at the  
> moment and to me feels like a 0.1 blocker-type issue.  How many  
> people will give up on thrift if make fails? Can we bundle log4j  
> with thrift or find a better way to fail?
>
> Michael


Re: building java libs with log4j

Posted by David Reiss <dr...@facebook.com>.
Wow.  I expected people to complain about this, but I didn't think it
would be in less than a day.  See https://issues.apache.org/jira/browse/THRIFT-416
for some context.

Java doesn't support a preprocessor, so I don't think there is any way
to optionally eliminate the log4j dependency.

We could use slf4j, but that would just create the same problem.

We could switch back to java.util.logging.

I don't think it makes sense to put log4j into our source repository,
but we could possibly put it into the release tarball (and instant
releases) if the Java guys can come up with a plan for it.

--David

Michael Stockton wrote:
> I tried to build thrift this afternoon and failed because I don't have  
> log4j on my machine.  This seems to be a bit unfriendly at the moment  
> and to me feels like a 0.1 blocker-type issue.  How many people will  
> give up on thrift if make fails? Can we bundle log4j with thrift or  
> find a better way to fail?
> 
> Michael