Qi4j version 3.0 - PROPOSAL

26 views
Skip to first unread message

Niclas Hedhman

unread,
Oct 4, 2014, 1:50:46 AM10/4/14
to qi4j...@googlegroups.com
Gang,

I have previously suggested that we migrate to Java 8 right away, and embrace a world of lambdas, streaming and many other jolly bits.

So, I have created a 3.0 branch, which currently has the following large changes to it;

   a. Removed Function, Function2 and Specification from org.qi4j.functional, since they are now Function, BiFunction and Predicate in Java 8.

   b. Removed dependency on Joda Time, and replaced with Java Time API. Biggest work here is in the DCI sample from Marc Grue, and I am not sure I have gotten it right. I am also dropping support for non-ISO8601 date formats. People should be made to conform.


So far there are several testcase that are failing and I am chasing them down as we speak. I think some of these are not due to my changes, but is in 'develop' branch as well (confirm?), for instance org.qi4j.regression.qi377.IssueTest


Next steps involve 
   a. Replacing the very very many many anonymous classes with lambdas, to make the code a lot neater.
   b. Looking at other superfluous code in org.qi4j.functional
   c. Convert org.qi4j.io to use the Stream API where suitable.
   d. Disallow java.util.Date, java.util.Calendar and java.util.TimeZone (others?) as method arguments or parameters in Composite interfaces, to force people to do the right thing. Possibly provide an override mechanism for external libraries.
   e. Getting rid of all @deprecated usages. We want to be ahead of curve...
   f. Fixing all javadoc warnings. 
   g. Improving documentation (never ending).
   h. And probably much more.

A lot of good fun. Looking forward to comments and opinions.


Cheers
--
Niclas Hedhman, Software Developer

Paul Merlin

unread,
Oct 4, 2014, 5:50:56 AM10/4/14
to Niclas Hedhman, qi4j...@googlegroups.com
Niclas,

Niclas Hedhman a écrit :
Gang,

I have previously suggested that we migrate to Java 8 right away, and embrace a world of lambdas, streaming and many other jolly bits.

So, I have created a 3.0 branch, which currently has the following large changes to it;

   a. Removed Function, Function2 and Specification from org.qi4j.functional, since they are now Function, BiFunction and Predicate in Java 8.

   b. Removed dependency on Joda Time, and replaced with Java Time API. Biggest work here is in the DCI sample from Marc Grue, and I am not sure I have gotten it right. I am also dropping support for non-ISO8601 date formats. People should be made to conform.
All this sounds good to me.

So far there are several testcase that are failing and I am chasing them down as we speak. I think some of these are not due to my changes, but is in 'develop' branch as well (confirm?), for instance org.qi4j.regression.qi377.IssueTest



Next steps involve 
   a. Replacing the very very many many anonymous classes with lambdas, to make the code a lot neater.
   b. Looking at other superfluous code in org.qi4j.functional
   c. Convert org.qi4j.io to use the Stream API where suitable.
   d. Disallow java.util.Date, java.util.Calendar and java.util.TimeZone (others?) as method arguments or parameters in Composite interfaces, to force people to do the right thing. Possibly provide an override mechanism for external libraries.
   e. Getting rid of all @deprecated usages. We want to be ahead of curve...
   f. Fixing all javadoc warnings. 
   g. Improving documentation (never ending).
   h. And probably much more.

A lot of good fun. Looking forward to comments and opinions.
a. We can coordinate to split the effort across modules. We'll have to settle on a style for lambdas (param parenthesis, braces, indentation). Checkstyle support for Java 8 is being worked as a GSOC project and is almost done as we speak.
b&c. Maybe we'll be able to get rid of org.qi4j.io and org.qi4j.functional, time will tell.
d. I like the idea.
e&f&g&h. Of course :)

I can't wait to see the assembly of an Application once we have proper lambda support in bootstrap! No doubt things will get sexier.

I did setup a CI job for the 3.0 branch:
https://qi4j.ci.cloudbees.com/job/qi4j-sdk.3.0.hourly.tests.jdk8-open/
 


By the way, I'd like to push a 2.1 (2.0.1 ?) release with the fixes that already are in the develop branch. Would it be ok for you?


/Paul

Reply all
Reply to author
Forward
0 new messages