CGLIB, ASM, Java8 & Guice

1,068 views
Skip to first unread message

Sam Berlin

unread,
Dec 6, 2013, 6:11:05 PM12/6/13
to google...@googlegroups.com, Stuart McCulloch
I want to make sure I understand the state & various options here.  AFAICT, the relevant issues are:

Issue 757 -- Using Java8 lambdas makes Guice throw terrible error messages
Issue 759 -- Use ASM4.2 (or, if we want lambda support, 5.0_BETA)

Please correct me where I'm wrong here --

 1) Switching to ASM4.1 or 4.2 by itself would just be a performance boost, but has no other practical gains.  Switching to ASM 5.0 would fix make Guice work with Java8 lambdas.

 2) Switching to a newer ASM requires a one-line change in CGLIB (as described in comment #2 in issue 759).

 3) If we want to drop the asm-util dependency, CGLIB also needs an additional patch as described in comment #3 in issue 759.

 4) Both proposed CGLIB patches will work with any of the following: ASM4.1, ASM4.2 & ASM5.0.

 5) The only way to get Guice to *work* with Java8 lambdas is to use ASM5.0 BETA.  If we instead switch to ASM4.1 or ASM4.2, that will improve the error message we see, but it won't let lambdas work.

Does anyone have an ETA on when ASM5.0 will be non-beta?

Thanks!

 sam


Stuart McCulloch

unread,
Dec 6, 2013, 6:27:58 PM12/6/13
to google...@googlegroups.com
Yes, that sums up the current situation.

Does anyone have an ETA on when ASM5.0 will be non-beta?

According to http://mail.ow2.org/wws/arc/asm/2013-11/msg00005.html and http://mail.ow2.org/wws/arc/asm/2013-11/msg00023.html they are targeting March 2014, and may release a second beta before then.

Thanks!

 sam

Sam Berlin

unread,
Dec 6, 2013, 6:30:34 PM12/6/13
to google...@googlegroups.com
OK, great -- so what I propose is this:  we (I) fix the CGLIB issues, upgrade to ASM 4.2, and release a new beta (and hopefully a final release too).  Concurrently, we also put a jar out that's built with ASM5 and offer it as an experimental version for people who want to use lambdas.

WDYT?

sam


--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Stuart McCulloch

unread,
Dec 6, 2013, 6:37:54 PM12/6/13
to google...@googlegroups.com
Sounds like a plan to me

Sam Berlin

unread,
Dec 7, 2013, 2:04:09 PM12/7/13
to google...@googlegroups.com
Ok, I:

 * Committed the fixes in cglib & pushed out a cglib 3.1 release there.  I have no idea how to do the cglib maven stuff, so someone else will need to stage that in maven somehow. 
 * Updated Guice to refer to ASM 4.2 & cglib 3.1, and removed the asm-util dependency.
 * Pushed out a new Guice 4.0-beta2 
 * Updated the api-diffs & latest-javdoc for the new beta2 release.

I haven't yet:
  * Done anything with ASM 5.0... but it should be relatively easy if anyone wants to hack locally: you just need to swap asm-4.2 with asm-5.0, change the references in the build files, and 'ant dist'. 
  * Updated the Guice POMs, because they'd require cglib 3.1 which doesn't exist anywhere in maven yet.

sam

Christian Gruber

unread,
Dec 7, 2013, 6:56:55 PM12/7/13
to google...@googlegroups.com
Isn't chrisn involved with glib? Can we rope him in to discuss how to
get this pushed to sonatype?

c.
>>> <https://code.google.com/p/google-guice/issues/detail?id=757>--
>>> Using Java8 lambdas makes Guice throw terrible error messages
>>> Issue 759
>>> <https://code.google.com/p/google-guice/issues/detail?id=759> --
>>> Use ASM4.2 (or, if we want lambda support, 5.0_BETA)
>>>
>>> Please correct me where I'm wrong here --
>>>
>>> 1) Switching to ASM4.1 or 4.2 by itself would just be a performance
>>> boost, but has no other practical gains. Switching to ASM 5.0 would
>>> fix
>>> make Guice work with Java8 lambdas.
>>>
>>> 2) Switching to a newer ASM requires a one-line change in CGLIB (as
>>> described in comment
>>> #2<https://code.google.com/p/google-guice/issues/detail?id=759#c2>in
>>> issue 759).
>>>
>>> 3) If we want to drop the asm-util dependency, CGLIB also needs an
>>> additional patch as described in comment
>>> #3<https://code.google.com/p/google-guice/issues/detail?id=759#c3>
Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

Sam Berlin

unread,
Dec 7, 2013, 7:47:43 PM12/7/13
to google...@googlegroups.com

He's not very actively involved in it now (though it is mostly all his code).  The last release (3.0) was by Jeremy to get it working with ASM 4.0, and I let him know yesterday that I'd be fixing these two issues and cutting a 3.1 with the fixes.

...so, someone else with the expertise of pushing it to Maven is probably best.

sam


To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscribe@googlegroups.com.

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscribe@googlegroups.com.

Christian Gruber

unread,
Dec 7, 2013, 8:13:36 PM12/7/13
to google...@googlegroups.com
I can comfortably push to maven - the issue is, I may not have
permissions to push to the groupId. It's published under the "glib"
groupId, so it would need someone with permissions to that group on
oss.sonatype.org. I can request it, but I have no idea how to validate
that I should have such permissions, unless they take Chris's word for
it. Did Jeremy push the last one? If you want, I'll submit a ticket at
sonatype to get myself added to the cglib group for deployment reasons
and I can cut the release once that comes through.

c.
>>>>> email to google-guice...@googlegroups.com.
>>>>> To post to this group, send email to
>>>>> google...@googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/google-guice.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "google-guice" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>> send an
>>>> email to google-guice...@googlegroups.com.
>>>> To post to this group, send email to google...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/google-guice.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "google-guice" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>> send an
>>>> email to google-guice...@googlegroups.com.
>>>> To post to this group, send email to google...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/google-guice.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "google-guice" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an
>>> email to google-guice...@googlegroups.com.
>>> To post to this group, send email to google...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/google-guice.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>> Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
>> Injection
>> email: cgr...@google.com :::: mobile: +1 (646) 807-9839
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups
>> "google-guice" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an
>> email to google-guice...@googlegroups.com.
>> To post to this group, send email to google...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/google-guice.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "google-guice" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to google-guice...@googlegroups.com.

Sam Berlin

unread,
Dec 8, 2013, 11:51:45 AM12/8/13
to google...@googlegroups.com

Stuart, I think you helped package up the 2.2.2 cglib release (which was also a similar situation -- making a fix for Guice and cutting a new version).

Could you help out here again?

Thanks!

sam


To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.



Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscribe@googlegroups.com.

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscribe@googlegroups.com.

Stuart McCulloch

unread,
Dec 8, 2013, 4:42:12 PM12/8/13
to google...@googlegroups.com
On 8 Dec 2013, at 16:51, Sam Berlin <sbe...@gmail.com> wrote:

Stuart, I think you helped package up the 2.2.2 cglib release (which was also a similar situation -- making a fix for Guice and cutting a new version).

Could you help out here again?

Sure, no problem - I’ll sort it out when I get into the office tomorrow.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.

Stuart McCulloch

unread,
Dec 9, 2013, 8:07:51 AM12/9/13
to google...@googlegroups.com
Hi Sam,

I’ve staged the cglib 3.1 release as:



I’ll release it to central once you’ve verified the content is correct.

Cheers, Stuart

Brice Dutheil

unread,
Mar 25, 2014, 9:15:25 AM3/25/14
to google...@googlegroups.com
Hey,

Interesting topic, it seems some people have access to the CGLIB source code among this mailing-list. The source code is still on CVS, maybe we can move it to git, and eventually on github. This way the community could be better involved in the project by providing PRs.

A few years ago I had successfully moved the CGLIB project from CVS to GIT (via SVN). However I couldn't spend much time on it so I deleted the result. Still I think this could be achieved at some point.
Maybe we can create a google mailing as well as the SF project seems kind of dead.


Thoughts ?

Thanks!

sam

Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.
Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency Injection
email: cgr...@google.com :::: mobile: +1 (646) 807-9839

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Sam Berlin

unread,
Mar 25, 2014, 9:29:02 AM3/25/14
to google...@googlegroups.com
Anyone know how to get the CVS comma-v files off sourceforge?  If it's possible, I'll try doing a cvs-to-git push and re-hosting it on github.  I think Chris N was supportive of that last I talked to him.

 sam


For more options, visit https://groups.google.com/d/optout.

Sam Berlin

unread,
Mar 25, 2014, 9:40:42 AM3/25/14
to google...@googlegroups.com
OK, nevermind, looks like a quick google search showed up some ways to do it.  I'll experiment over the weekend.

Sam Berlin

unread,
Mar 29, 2014, 11:37:28 AM3/29/14
to google...@googlegroups.com
FYI, I've mirrored a version @ https://github.com/sameb/cglib, and sent an email to chrisn about what he wants to do with the sourceforge pages.

 sam

Christian Gruber

unread,
Mar 29, 2014, 4:35:15 PM3/29/14
to google...@googlegroups.com
Cool! Last time I did CVS -> git/mercurial, I did CVS -> SVN, then SVN
-> DVCS. -c.

On 29 Mar 2014, at 8:37, Sam Berlin wrote:

> FYI, I've mirrored a version @ https://github.com/sameb/cglib, and
> sent an
> email to chrisn about what he wants to do with the sourceforge pages.

Brice Dutheil

unread,
Apr 9, 2014, 6:16:51 PM4/9/14
to google...@googlegroups.com
Hey sorry for the late reply I was kinda off-the-grid for the time being.

Anyway, thanks Sam, that's very good news.
About the repository what do you think of transferring it to some opensource CGLIB organization on github (It would probably mean to create one, just like I did for mockito).

Sam Berlin

unread,
Apr 9, 2014, 6:24:26 PM4/9/14
to google...@googlegroups.com
Chris N was OK with transferring the sourceforge site over to github.   I guess I'll create a one-off cglib organization & transfer ownership to it, and add the appropriate people as committers.  I'm not terribly familiar with the "right" way to host projects on github, so offer any and all suggestions please!

 sam


--

Brice Dutheil

unread,
Apr 9, 2014, 6:55:09 PM4/9/14
to google...@googlegroups.com
Cool. Wiki and gh-pages are much more user friendly than those on SF.

Yes first you could create an organization following the screens there
You may need to create a CGLIB team in this organization anyway where you'll have admin rights to accept the transfer.

Then in the settings page of the CGLIB repository, you'll see inside the "Danger Zone" a button to transfer the repo to another user or organization.

Another option is to just create the organization, create the team, and create an empty CGLIB repo, then on your machine you would change the remote and push all the branches there. Finally you may remove the original repo on your account. And fork it from the new cglib/cglib repo if wanted.

HTH

Sam Berlin

unread,
Apr 26, 2014, 1:07:22 PM4/26/14
to google...@googlegroups.com
I think cglib on github should be good to go now -- I've set it up @ https://github.com/cglib/cglib, and changed the sourceforge site to point to it as much as possible.
Reply all
Reply to author
Forward
0 new messages