[wildfly-dev] Smoothing the move from JDK 6 to 7

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[wildfly-dev] Smoothing the move from JDK 6 to 7

David Lloyd-2
At this point in time, I'd say just about everyone wants to move ahead
with Java 7 syntax because let's face it: there's a lot of nice stuff in
there.  But until now, doing so meant that projects which rely on
running on JDK 6 until the heat-death of the universe are on a fast road
to pain and suffering.

Well, all that ends today... introducing "seven2six" [1], a tiny tool
(only two source files) which losslessly converts version 51.0 (1.7)
class files to version 50.0 (1.6).

With this tool in your build, you can switch your language level to 1.7
without alienating your 1.6 users.  I've already got this integrated
with JBoss Modules (it's quite simple to do as the README describes).

This could end Brian's major pet peeve of rooting out diamond operator
usage in new WildFly files, among other issues.  I want to know what you
guys think of bringing this in to WildFly (maybe even in to
jboss-parent, honestly).  The initial version is released to Maven
already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
with it and suggest improvements (just use the GH bug tracker for now I
guess).

Thanks to Kabir Khan for the original idea and implementation/POC (I
just polished it up with ASM), and James Perkins for the Maven
integration code.

[1] https://github.com/dmlloyd/seven2six
--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

jtgreene
Administrator
The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.

On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:

> At this point in time, I'd say just about everyone wants to move ahead
> with Java 7 syntax because let's face it: there's a lot of nice stuff in
> there.  But until now, doing so meant that projects which rely on
> running on JDK 6 until the heat-death of the universe are on a fast road
> to pain and suffering.
>
> Well, all that ends today... introducing "seven2six" [1], a tiny tool
> (only two source files) which losslessly converts version 51.0 (1.7)
> class files to version 50.0 (1.6).
>
> With this tool in your build, you can switch your language level to 1.7
> without alienating your 1.6 users.  I've already got this integrated
> with JBoss Modules (it's quite simple to do as the README describes).
>
> This could end Brian's major pet peeve of rooting out diamond operator
> usage in new WildFly files, among other issues.  I want to know what you
> guys think of bringing this in to WildFly (maybe even in to
> jboss-parent, honestly).  The initial version is released to Maven
> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
> with it and suggest improvements (just use the GH bug tracker for now I
> guess).
>
> Thanks to Kabir Khan for the original idea and implementation/POC (I
> just polished it up with ASM), and James Perkins for the Maven
> integration code.
>
> [1] https://github.com/dmlloyd/seven2six
> --
> - DML
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

Bill Burke
BTW, are there any EE7 specs that use Java 7 syntax/apis?  I know we
avoided this in JAx-Rs although it would have been nice to use Closeable.

On 8/30/2013 6:01 PM, Jason Greene wrote:

> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>
> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>
>> At this point in time, I'd say just about everyone wants to move ahead
>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>> there.  But until now, doing so meant that projects which rely on
>> running on JDK 6 until the heat-death of the universe are on a fast road
>> to pain and suffering.
>>
>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>> (only two source files) which losslessly converts version 51.0 (1.7)
>> class files to version 50.0 (1.6).
>>
>> With this tool in your build, you can switch your language level to 1.7
>> without alienating your 1.6 users.  I've already got this integrated
>> with JBoss Modules (it's quite simple to do as the README describes).
>>
>> This could end Brian's major pet peeve of rooting out diamond operator
>> usage in new WildFly files, among other issues.  I want to know what you
>> guys think of bringing this in to WildFly (maybe even in to
>> jboss-parent, honestly).  The initial version is released to Maven
>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>> with it and suggest improvements (just use the GH bug tracker for now I
>> guess).
>>
>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>> just polished it up with ASM), and James Perkins for the Maven
>> integration code.
>>
>> [1] https://github.com/dmlloyd/seven2six
>> --
>> - DML
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
> --
> Jason T. Greene
> WildFly Lead / JBoss EAP Platform Architect
> JBoss, a division of Red Hat
>
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

David Lloyd-2
Closeable is in 1.6; I guess you mean AutoCloseable?

On 08/30/2013 05:13 PM, Bill Burke wrote:

> BTW, are there any EE7 specs that use Java 7 syntax/apis?  I know we
> avoided this in JAx-Rs although it would have been nice to use Closeable.
>
> On 8/30/2013 6:01 PM, Jason Greene wrote:
>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>>
>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>>
>>> At this point in time, I'd say just about everyone wants to move ahead
>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>>> there.  But until now, doing so meant that projects which rely on
>>> running on JDK 6 until the heat-death of the universe are on a fast road
>>> to pain and suffering.
>>>
>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>>> (only two source files) which losslessly converts version 51.0 (1.7)
>>> class files to version 50.0 (1.6).
>>>
>>> With this tool in your build, you can switch your language level to 1.7
>>> without alienating your 1.6 users.  I've already got this integrated
>>> with JBoss Modules (it's quite simple to do as the README describes).
>>>
>>> This could end Brian's major pet peeve of rooting out diamond operator
>>> usage in new WildFly files, among other issues.  I want to know what you
>>> guys think of bringing this in to WildFly (maybe even in to
>>> jboss-parent, honestly).  The initial version is released to Maven
>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>>> with it and suggest improvements (just use the GH bug tracker for now I
>>> guess).
>>>
>>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>>> just polished it up with ASM), and James Perkins for the Maven
>>> integration code.
>>>
>>> [1] https://github.com/dmlloyd/seven2six
>>> --
>>> - DML
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>> --
>> Jason T. Greene
>> WildFly Lead / JBoss EAP Platform Architect
>> JBoss, a division of Red Hat
>>
>>
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>


--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

David Lloyd-2
In reply to this post by jtgreene
(Forgot to send to list!)

This lets us compile EAP with JDK 7 syntax though, that's the point.  We
can backport 1.7 syntax patches.

On 08/30/2013 05:01 PM, Jason Greene wrote:

> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>
> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>
>> At this point in time, I'd say just about everyone wants to move ahead
>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>> there.  But until now, doing so meant that projects which rely on
>> running on JDK 6 until the heat-death of the universe are on a fast road
>> to pain and suffering.
>>
>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>> (only two source files) which losslessly converts version 51.0 (1.7)
>> class files to version 50.0 (1.6).
>>
>> With this tool in your build, you can switch your language level to 1.7
>> without alienating your 1.6 users.  I've already got this integrated
>> with JBoss Modules (it's quite simple to do as the README describes).
>>
>> This could end Brian's major pet peeve of rooting out diamond operator
>> usage in new WildFly files, among other issues.  I want to know what you
>> guys think of bringing this in to WildFly (maybe even in to
>> jboss-parent, honestly).  The initial version is released to Maven
>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>> with it and suggest improvements (just use the GH bug tracker for now I
>> guess).
>>
>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>> just polished it up with ASM), and James Perkins for the Maven
>> integration code.
>>
>> [1] https://github.com/dmlloyd/seven2six
>> --
>> - DML
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
> --
> Jason T. Greene
> WildFly Lead / JBoss EAP Platform Architect
> JBoss, a division of Red Hat
>


--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

Bill Burke
In reply to this post by David Lloyd-2
Ya, whatever...I haven't used any JDK 7 features.  Last year I still had
users complaining I switched Resteasy to build on JDK 6.

On 8/30/2013 6:17 PM, David M. Lloyd wrote:

> Closeable is in 1.6; I guess you mean AutoCloseable?
>
> On 08/30/2013 05:13 PM, Bill Burke wrote:
>> BTW, are there any EE7 specs that use Java 7 syntax/apis?  I know we
>> avoided this in JAx-Rs although it would have been nice to use Closeable.
>>
>> On 8/30/2013 6:01 PM, Jason Greene wrote:
>>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>>>
>>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>>>
>>>> At this point in time, I'd say just about everyone wants to move ahead
>>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>>>> there.  But until now, doing so meant that projects which rely on
>>>> running on JDK 6 until the heat-death of the universe are on a fast road
>>>> to pain and suffering.
>>>>
>>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>>>> (only two source files) which losslessly converts version 51.0 (1.7)
>>>> class files to version 50.0 (1.6).
>>>>
>>>> With this tool in your build, you can switch your language level to 1.7
>>>> without alienating your 1.6 users.  I've already got this integrated
>>>> with JBoss Modules (it's quite simple to do as the README describes).
>>>>
>>>> This could end Brian's major pet peeve of rooting out diamond operator
>>>> usage in new WildFly files, among other issues.  I want to know what you
>>>> guys think of bringing this in to WildFly (maybe even in to
>>>> jboss-parent, honestly).  The initial version is released to Maven
>>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>>>> with it and suggest improvements (just use the GH bug tracker for now I
>>>> guess).
>>>>
>>>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>>>> just polished it up with ASM), and James Perkins for the Maven
>>>> integration code.
>>>>
>>>> [1] https://github.com/dmlloyd/seven2six
>>>> --
>>>> - DML
>>>> _______________________________________________
>>>> wildfly-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>>
>>> --
>>> Jason T. Greene
>>> WildFly Lead / JBoss EAP Platform Architect
>>> JBoss, a division of Red Hat
>>>
>>>
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>>
>>
>
>

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

Brian Stansberry
In reply to this post by David Lloyd-2
Has anyone tried Intellij and Eclipse builds with this? That is, non
command line builds. It's a maven plugin so you'd think it would Just
Work, but you never know.

I feel guilty asking a question like this about something that AIUI was
first conceived of 7.5 hours ago. ;)

On 8/30/13 4:46 PM, David M. Lloyd wrote:

> At this point in time, I'd say just about everyone wants to move ahead
> with Java 7 syntax because let's face it: there's a lot of nice stuff in
> there.  But until now, doing so meant that projects which rely on
> running on JDK 6 until the heat-death of the universe are on a fast road
> to pain and suffering.
>
> Well, all that ends today... introducing "seven2six" [1], a tiny tool
> (only two source files) which losslessly converts version 51.0 (1.7)
> class files to version 50.0 (1.6).
>
> With this tool in your build, you can switch your language level to 1.7
> without alienating your 1.6 users.  I've already got this integrated
> with JBoss Modules (it's quite simple to do as the README describes).
>
> This could end Brian's major pet peeve of rooting out diamond operator
> usage in new WildFly files, among other issues.  I want to know what you
> guys think of bringing this in to WildFly (maybe even in to
> jboss-parent, honestly).  The initial version is released to Maven
> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
> with it and suggest improvements (just use the GH bug tracker for now I
> guess).
>
> Thanks to Kabir Khan for the original idea and implementation/POC (I
> just polished it up with ASM), and James Perkins for the Maven
> integration code.
>
> [1] https://github.com/dmlloyd/seven2six
>


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

jtgreene
Administrator
In reply to this post by David Lloyd-2
If EAP diverges due to a patch, and then later we merge upstream after someone updates the entire file to use diamonds, then we get huge deltas referring to a ton of differences that have no practical value, and potentially conflicts.

Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.


On Aug 30, 2013, at 5:18 PM, David M. Lloyd <[hidden email]> wrote:

> (Forgot to send to list!)
>
> This lets us compile EAP with JDK 7 syntax though, that's the point.  We
> can backport 1.7 syntax patches.
>
> On 08/30/2013 05:01 PM, Jason Greene wrote:
>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>>
>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>>
>>> At this point in time, I'd say just about everyone wants to move ahead
>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>>> there.  But until now, doing so meant that projects which rely on
>>> running on JDK 6 until the heat-death of the universe are on a fast road
>>> to pain and suffering.
>>>
>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>>> (only two source files) which losslessly converts version 51.0 (1.7)
>>> class files to version 50.0 (1.6).
>>>
>>> With this tool in your build, you can switch your language level to 1.7
>>> without alienating your 1.6 users.  I've already got this integrated
>>> with JBoss Modules (it's quite simple to do as the README describes).
>>>
>>> This could end Brian's major pet peeve of rooting out diamond operator
>>> usage in new WildFly files, among other issues.  I want to know what you
>>> guys think of bringing this in to WildFly (maybe even in to
>>> jboss-parent, honestly).  The initial version is released to Maven
>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>>> with it and suggest improvements (just use the GH bug tracker for now I
>>> guess).
>>>
>>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>>> just polished it up with ASM), and James Perkins for the Maven
>>> integration code.
>>>
>>> [1] https://github.com/dmlloyd/seven2six
>>> --
>>> - DML
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>> --
>> Jason T. Greene
>> WildFly Lead / JBoss EAP Platform Architect
>> JBoss, a division of Red Hat
>>
>
>
> --
> - DML
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

kkhan
I think it is fine for projects outside the WF source tree, but for now due to backporting to EAP 6.x we should continue keeping the WF codebase as 1.6 compatible as possible.
On 30 Aug 2013, at 23:29, Jason Greene wrote:

> If EAP diverges due to a patch, and then later we merge upstream after someone updates the entire file to use diamonds, then we get huge deltas referring to a ton of differences that have no practical value, and potentially conflicts.
>
> Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.
>
>
> On Aug 30, 2013, at 5:18 PM, David M. Lloyd <[hidden email]> wrote:
>
>> (Forgot to send to list!)
>>
>> This lets us compile EAP with JDK 7 syntax though, that's the point.  We
>> can backport 1.7 syntax patches.
>>
>> On 08/30/2013 05:01 PM, Jason Greene wrote:
>>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>>>
>>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>>>
>>>> At this point in time, I'd say just about everyone wants to move ahead
>>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>>>> there.  But until now, doing so meant that projects which rely on
>>>> running on JDK 6 until the heat-death of the universe are on a fast road
>>>> to pain and suffering.
>>>>
>>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>>>> (only two source files) which losslessly converts version 51.0 (1.7)
>>>> class files to version 50.0 (1.6).
>>>>
>>>> With this tool in your build, you can switch your language level to 1.7
>>>> without alienating your 1.6 users.  I've already got this integrated
>>>> with JBoss Modules (it's quite simple to do as the README describes).
>>>>
>>>> This could end Brian's major pet peeve of rooting out diamond operator
>>>> usage in new WildFly files, among other issues.  I want to know what you
>>>> guys think of bringing this in to WildFly (maybe even in to
>>>> jboss-parent, honestly).  The initial version is released to Maven
>>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>>>> with it and suggest improvements (just use the GH bug tracker for now I
>>>> guess).
>>>>
>>>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>>>> just polished it up with ASM), and James Perkins for the Maven
>>>> integration code.
>>>>
>>>> [1] https://github.com/dmlloyd/seven2six
>>>> --
>>>> - DML
>>>> _______________________________________________
>>>> wildfly-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>>
>>> --
>>> Jason T. Greene
>>> WildFly Lead / JBoss EAP Platform Architect
>>> JBoss, a division of Red Hat
>>>
>>
>>
>> --
>> - DML
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
> --
> Jason T. Greene
> WildFly Lead / JBoss EAP Platform Architect
> JBoss, a division of Red Hat
>
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev

signature.asc (507 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

David Lloyd-2
In reply to this post by Brian Stansberry
Well, in IDEA at least, it builds both directly and via the Maven
integration, as one might expect.  If you don't run with Maven then no
plugins are run, of course.  If you do, then they are.  So no surprises
really.

On 08/30/2013 05:29 PM, Brian Stansberry wrote:

> Has anyone tried Intellij and Eclipse builds with this? That is, non
> command line builds. It's a maven plugin so you'd think it would Just
> Work, but you never know.
>
> I feel guilty asking a question like this about something that AIUI was
> first conceived of 7.5 hours ago. ;)
>
> On 8/30/13 4:46 PM, David M. Lloyd wrote:
>> At this point in time, I'd say just about everyone wants to move ahead
>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>> there.  But until now, doing so meant that projects which rely on
>> running on JDK 6 until the heat-death of the universe are on a fast road
>> to pain and suffering.
>>
>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>> (only two source files) which losslessly converts version 51.0 (1.7)
>> class files to version 50.0 (1.6).
>>
>> With this tool in your build, you can switch your language level to 1.7
>> without alienating your 1.6 users.  I've already got this integrated
>> with JBoss Modules (it's quite simple to do as the README describes).
>>
>> This could end Brian's major pet peeve of rooting out diamond operator
>> usage in new WildFly files, among other issues.  I want to know what you
>> guys think of bringing this in to WildFly (maybe even in to
>> jboss-parent, honestly).  The initial version is released to Maven
>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>> with it and suggest improvements (just use the GH bug tracker for now I
>> guess).
>>
>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>> just polished it up with ASM), and James Perkins for the Maven
>> integration code.
>>
>> [1] https://github.com/dmlloyd/seven2six
>>
>
>


--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

Gunnar Morling
In reply to this post by jtgreene
Hi,

> Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.

You could use Animal Sniffer [1] to make sure no Java 7 APIs are referenced.

We're doing the same in several Hibernate projects which need to use Java 7 for compilation but have Java 6 as target runtime. Animal Sniffer provides a Maven plug-in, Ant task etc. which fail the build if APIs are used which don't exist in a configured target baseline.

--Gunnar




2013/8/31 Jason Greene <[hidden email]>
If EAP diverges due to a patch, and then later we merge upstream after someone updates the entire file to use diamonds, then we get huge deltas referring to a ton of differences that have no practical value, and potentially conflicts.

Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.


On Aug 30, 2013, at 5:18 PM, David M. Lloyd <[hidden email]> wrote:

> (Forgot to send to list!)
>
> This lets us compile EAP with JDK 7 syntax though, that's the point.  We
> can backport 1.7 syntax patches.
>
> On 08/30/2013 05:01 PM, Jason Greene wrote:
>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.
>>
>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <[hidden email]> wrote:
>>
>>> At this point in time, I'd say just about everyone wants to move ahead
>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in
>>> there.  But until now, doing so meant that projects which rely on
>>> running on JDK 6 until the heat-death of the universe are on a fast road
>>> to pain and suffering.
>>>
>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool
>>> (only two source files) which losslessly converts version 51.0 (1.7)
>>> class files to version 50.0 (1.6).
>>>
>>> With this tool in your build, you can switch your language level to 1.7
>>> without alienating your 1.6 users.  I've already got this integrated
>>> with JBoss Modules (it's quite simple to do as the README describes).
>>>
>>> This could end Brian's major pet peeve of rooting out diamond operator
>>> usage in new WildFly files, among other issues.  I want to know what you
>>> guys think of bringing this in to WildFly (maybe even in to
>>> jboss-parent, honestly).  The initial version is released to Maven
>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess
>>> with it and suggest improvements (just use the GH bug tracker for now I
>>> guess).
>>>
>>> Thanks to Kabir Khan for the original idea and implementation/POC (I
>>> just polished it up with ASM), and James Perkins for the Maven
>>> integration code.
>>>
>>> [1] https://github.com/dmlloyd/seven2six
>>> --
>>> - DML
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>> --
>> Jason T. Greene
>> WildFly Lead / JBoss EAP Platform Architect
>> JBoss, a division of Red Hat
>>
>
>
> --
> - DML
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

Ales Justin
In reply to this post by David Lloyd-2
James Perkins for the Maven integration code.

Uh, we (almost) have a dup. :-)

-Ales


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: [wildfly-dev] Smoothing the move from JDK 6 to 7

David Lloyd-2
On 09/03/2013 03:30 AM, Ales Justin wrote:
>> James Perkins for the Maven integration code.
>
> Uh, we (almost) have a dup. :-)
> * https://github.com/alesj/maven-transformer-plugin

Given that the main Translator class in seven2six implements
ClassFileTransformer, you could use it with this plugin as well.  Either
way works.


--
- DML
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev