2016-03-22 22:18 GMT+01:00 David Jencks <[email protected]>:
> For my usage of gogo, the new behavior would be a good thing, but > maintaining compatibility with java 6 for the main parts of gogo is really > needed. Ok. > Do I understand from what you said below that this is practical, and that > the new line module is not required for use of gogo? For the gogo-runtime module, yes, it's mostly practical. The gogo-shell module has not been modified at all. The new gogo-jline module is similar the same as the gogo-shell one. The main difference is that it uses jline instead of very basic line reading (see Console#getLine in gogo-shell). Jline provides cursor movement, history, completion, syntax highlighting, multi-line reading, ... This module relies on JLine 3.0 and require Java 8. > If so would you have time to do this? It would be a really good exercise > for me to learn a little java 8 by removing its’ use, but I may not have > time soon :-) > Yes. I'll work on it. > > In any case one or more jira items explaining what has changed would be > really really great. > Got it, I'll create a few JIRA. > > thanks > david jencks > > > On Mar 21, 2016, at 1:17 PM, Guillaume Nodet <[email protected]> wrote: > > > > 2016-03-21 20:31 GMT+01:00 David Jencks <[email protected] > <mailto:[email protected]>>: > > > >> No matter how much or little mailing list discussion there is I prefer > >> that there be a jira item tracking actual commits, and that the jira > item > >> should explain the work actually done. > >> > >> Reading the user list discussion you pointed to it seemed rather > >> incidental that you are requiring java 8. > >> > >> How much of the work actually really requires java 8? I’m all for > >> improving gogo but my usage needs to support java 6 for a few more > years I > >> fear. I’d like to understand better the implications of what you are > doing > >> before coming to any conclusions. > >> > > > > For the runtime, a few things have been introduced such as a Path for the > > CommandSession#currentDir() which would have to be changed to a File, a > few > > static interface methods that would have to be moved to utility classes, > > lots of <> operators and a few usage of the stream api and lambdas. But > > there's no real need for java 8, it's mostly implementation details and > > syntactic sugar. > > > > That would be different for the jline module which depends on jline > > 3.0-SNAPSHOT which heavily depends on JDK 8, so there's no point in even > > trying to switch that module back to JDK 6. > > > > However, the runtime has a few incompatibilities, even if the tests have > > been mostly unchanged. > > It's because additional syntax have been added, so old commands may be > > parsed / interpreted differently now, because of those new features. > > For example, the following command now leads to a "bar" file containing > > "foo": > > echo foo > bar > > Clearly, the behaviour is different from the previous one. > > > > So this is really a new major version of gogo runtime, even if the API > > itself is fully compatible afaik. > > So a possibility would be to keep both the previous and new versions of > > gogo in trunk so that we can maintain both, which may be easier than > using > > a branch in svn. > > > > > > > >> > >> thanks > >> david jencks > >> > >>> On Mar 21, 2016, at 12:08 PM, Guillaume Nodet <[email protected]> > wrote: > >>> > >>> 2016-03-21 19:56 GMT+01:00 David Jencks <[email protected] > >> <mailto:[email protected]>>: > >>> > >>>> So have you made gogo trunk java 8 only? > >>>> > >>>> I’m rather unhappy that there don’t appear to be any jira items > >> explaining > >>>> this work. > >>>> > >>> > >>> Yeah, again, I thought this has been somewhat discussed months ago on > the > >>> dev list. > >>> I'd be happy to revert and restart the discussion from scratch if you > >> want. > >>> > >>> > >>>> > >>>> thanks > >>>> david jencks > >>>> > >>>>> On Mar 21, 2016, at 11:38 AM, Guillaume Nodet <[email protected]> > >> wrote: > >>>>> > >>>>> All those commits are basically related to two things that have been > >>>>> partially covered in this thread: > >>>>> http://www.mail-archive.com/users%40felix.apache.org/msg16883.html > >>>>> Given nobody reacted or opposed to the work, I decided to commit it. > >>>>> Though I now realised it was on user@ and not @dev > >>>>> > >>>>> It basically comes down to: > >>>>> * a jline based shell > >>>>> * enhancements to the gogo runtime to provide better parsing, job > >>>>> control, redirections, parameter expansion > >>>>> > >>>>> Cheers, > >>>>> Guillaume Nodet > >>>>> > >>>>> > >>>>> > >>>>> 2016-03-21 19:02 GMT+01:00 David Jencks > <[email protected] > >>>>> : > >>>>> > >>>>>> Are there jira work items covering this really long sequence of > >> commits? > >>>>>> I really like some pointer to a description of what’s going on with > >>>> commits. > >>>>>> > >>>>>> thanks > >>>>>> david jencks > >>>>>> > >>>>>>> On Mar 21, 2016, at 10:00 AM, [email protected] wrote: > >>>>>>> > >>>>>>> Author: gnodet > >>>>>>> Date: Mon Mar 21 17:00:11 2016 > >>>>>>> New Revision: 1736059 > >>>>>>> > >>>>>>> URL: http://svn.apache.org/viewvc?rev=1736059&view=rev > >>>>>>> Log: > >>>>>>> Remove dependency on SSH > >>>>>>> > >>>>>>> Modified: > >>>>>>> > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java > >>>>>>> > >>>>>>> Modified: > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java > >>>>>>> URL: > >>>>>> > >>>> > >> > http://svn.apache.org/viewvc/felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java?rev=1736059&r1=1736058&r2=1736059&view=diff > >>>>>>> > >>>>>> > >>>> > >> > ============================================================================== > >>>>>>> --- > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java > >>>>>> (original) > >>>>>>> +++ > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java > >>>>>> Mon Mar 21 17:00:11 2016 > >>>>>>> @@ -75,7 +75,6 @@ import org.apache.felix.gogo.api.Process > >>>>>>> import org.apache.felix.gogo.jline.Shell.Context; > >>>>>>> import org.apache.felix.service.command.CommandProcessor; > >>>>>>> import org.apache.felix.service.command.CommandSession; > >>>>>>> -import org.apache.sshd.common.util.OsUtils; > >>>>>>> import org.jline.builtins.Commands; > >>>>>>> import org.jline.builtins.Less; > >>>>>>> import org.jline.builtins.Nano; > >>>>>>> @@ -89,6 +88,7 @@ import org.jline.utils.AttributedString; > >>>>>>> import org.jline.utils.AttributedStringBuilder; > >>>>>>> import org.jline.utils.AttributedStyle; > >>>>>>> import org.jline.utils.InfoCmp.Capability; > >>>>>>> +import org.jline.utils.OSUtils; > >>>>>>> > >>>>>>> /** > >>>>>>> * Posix-like utilities. > >>>>>>> @@ -1924,7 +1924,7 @@ public class Posix { > >>>>>>> perms.add(PosixFilePermission.OTHERS_WRITE); > >>>>>>> } > >>>>>>> > >>>>>>> - if (f.canExecute() || (OsUtils.isWin32() && > >>>>>> isWindowsExecutable(f.getName()))) { > >>>>>>> + if (f.canExecute() || (OSUtils.IS_WINDOWS && > >>>>>> isWindowsExecutable(f.getName()))) { > >>>>>>> perms.add(PosixFilePermission.OWNER_EXECUTE); > >>>>>>> perms.add(PosixFilePermission.GROUP_EXECUTE); > >>>>>>> perms.add(PosixFilePermission.OTHERS_EXECUTE); > >>>>>>> > >>>>>>> > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> ------------------------ > >>>>> Guillaume Nodet > >>>>> ------------------------ > >>>>> Red Hat, Open Source Integration > >>>>> > >>>>> Email: [email protected] > >>>>> Web: http://fusesource.com > >>>>> Blog: http://gnodet.blogspot.com/ > >>>> > >>>> > >>> > >>> > >>> -- > >>> ------------------------ > >>> Guillaume Nodet > >>> ------------------------ > >>> Red Hat, Open Source Integration > >>> > >>> Email: [email protected] <mailto:[email protected]> > >>> Web: http://fusesource.com <http://fusesource.com/> > >>> Blog: http://gnodet.blogspot.com/ <http://gnodet.blogspot.com/> > >> > > > > > > > > -- > > ------------------------ > > Guillaume Nodet > > ------------------------ > > Red Hat, Open Source Integration > > > > Email: [email protected] <mailto:[email protected]> > > Web: http://fusesource.com <http://fusesource.com/> > > Blog: http://gnodet.blogspot.com/ <http://gnodet.blogspot.com/> > -- ------------------------ Guillaume Nodet ------------------------ Red Hat, Open Source Integration Email: [email protected] Web: http://fusesource.com Blog: http://gnodet.blogspot.com/
