Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9AAB19B67 for ; Wed, 23 Mar 2016 07:31:16 +0000 (UTC) Received: (qmail 58397 invoked by uid 500); 23 Mar 2016 07:31:16 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 58324 invoked by uid 500); 23 Mar 2016 07:31:16 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 58310 invoked by uid 99); 23 Mar 2016 07:31:16 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2016 07:31:16 +0000 Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 0213C1A0176 for ; Wed, 23 Mar 2016 07:31:15 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id o5so22306760iod.2 for ; Wed, 23 Mar 2016 00:31:15 -0700 (PDT) X-Gm-Message-State: AD7BkJLnjZ8zP+1P/Pdbu+ylr0RoZ79EHDI3jPCCxjfnnMG6LNngchgnGLV4m0n0XE3kowFeMcFjv0zX6nkBcw== X-Received: by 10.107.37.12 with SMTP id l12mr1696627iol.138.1458718275203; Wed, 23 Mar 2016 00:31:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.150.68 with HTTP; Wed, 23 Mar 2016 00:30:55 -0700 (PDT) In-Reply-To: References: <20160321170011.4E8073A0314@svn01-us-west.apache.org> <94DC0CC1-3A0A-4395-BD4B-F8C147B8C497@yahoo.com> <879A1E6B-EF7C-446A-9F2F-99144A9AB2B3@yahoo.com> From: Guillaume Nodet Date: Wed, 23 Mar 2016 08:30:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r1736059 - /felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java To: dev@felix.apache.org Content-Type: multipart/alternative; boundary=001a1141b24e9f0688052eb250aa --001a1141b24e9f0688052eb250aa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2016-03-22 22:18 GMT+01:00 David Jencks : > 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 reall= y > 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 exercis= e > for me to learn a little java 8 by removing its=E2=80=99 use, but I may n= ot 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 wrote: > > > > 2016-03-21 20:31 GMT+01:00 David Jencks >: > > > >> 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=E2=80=99m all= for > >> improving gogo but my usage needs to support java 6 for a few more > years I > >> fear. I=E2=80=99d 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 t= he > > 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. Bu= t > > 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 eve= n > > trying to switch that module back to JDK 6. > > > > However, the runtime has a few incompatibilities, even if the tests hav= e > > 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 > wrote: > >>> > >>> 2016-03-21 19:56 GMT+01:00 David Jencks >> >: > >>> > >>>> So have you made gogo trunk java 8 only? > >>>> > >>>> I=E2=80=99m rather unhappy that there don=E2=80=99t 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 > >> wrote: > >>>>> > >>>>> All those commits are basically related to two things that have bee= n > >>>>> 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 > >>>>> : > >>>>> > >>>>>> Are there jira work items covering this really long sequence of > >> commits? > >>>>>> I really like some pointer to a description of what=E2=80=99s goin= g on with > >>>> commits. > >>>>>> > >>>>>> thanks > >>>>>> david jencks > >>>>>> > >>>>>>> On Mar 21, 2016, at 10:00 AM, gnodet@apache.org wrote: > >>>>>>> > >>>>>>> Author: gnodet > >>>>>>> Date: Mon Mar 21 17:00:11 2016 > >>>>>>> New Revision: 1736059 > >>>>>>> > >>>>>>> URL: http://svn.apache.org/viewvc?rev=3D1736059&view=3Drev > >>>>>>> Log: > >>>>>>> Remove dependency on SSH > >>>>>>> > >>>>>>> Modified: > >>>>>>> > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.ja= va > >>>>>>> > >>>>>>> Modified: > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.ja= va > >>>>>>> URL: > >>>>>> > >>>> > >> > http://svn.apache.org/viewvc/felix/trunk/gogo/jline/src/main/java/org/apa= che/felix/gogo/jline/Posix.java?rev=3D1736059&r1=3D1736058&r2=3D1736059&vie= w=3Ddiff > >>>>>>> > >>>>>> > >>>> > >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >>>>>>> --- > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.ja= va > >>>>>> (original) > >>>>>>> +++ > >>>>>> > >>>> > >> > felix/trunk/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.ja= va > >>>>>> 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: gnodet@redhat.com > >>>>> Web: http://fusesource.com > >>>>> Blog: http://gnodet.blogspot.com/ > >>>> > >>>> > >>> > >>> > >>> -- > >>> ------------------------ > >>> Guillaume Nodet > >>> ------------------------ > >>> Red Hat, Open Source Integration > >>> > >>> Email: gnodet@redhat.com > >>> Web: http://fusesource.com > >>> Blog: http://gnodet.blogspot.com/ > >> > > > > > > > > -- > > ------------------------ > > Guillaume Nodet > > ------------------------ > > Red Hat, Open Source Integration > > > > Email: gnodet@redhat.com > > Web: http://fusesource.com > > Blog: http://gnodet.blogspot.com/ > --=20 ------------------------ Guillaume Nodet ------------------------ Red Hat, Open Source Integration Email: gnodet@redhat.com Web: http://fusesource.com Blog: http://gnodet.blogspot.com/ --001a1141b24e9f0688052eb250aa--