Re: Early Access builds for JDK 8u122 b02 , JDK 9 & JDK 9 with Project Jigsaw b140 are available on java.net

2016-10-25 Thread Rory O'Donnell

Hi Stefan,

Sorry for the delay, I am traveling in China this week and being kept 
very busy.


The issue you are seeing is JDK-8164908, fixed in jdk9/dev for jdk-9+142 
or jdk-9+143.


Rgds,Rory

On 23/10/2016 21:53, Stefan Bodewig wrote:

Hi Rory,

I've tried "JDK9 with Project Jigsaw b140" but to be honest I have no
idea what difference to expect between JDK9b140 and this one.

We've got new test errors in Ant with Project Jigsaw b140 that haven't
been present in b136 (which may have been "just JDK9"). When running
rmic for IIOP we get

error: An error has occurred in the compiler; please file a bug report 
(http://bugreport.java.com/bugreport/).
java.lang.ExceptionInInitializerError
at jdk.rmic@9-ea/sun.rmi.rmic.iiop.Type.setRepositoryID(Type.java:999)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.CompoundType.initialize(CompoundType.java:790)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.SpecialClassType.(SpecialClassType.java:160)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.SpecialClassType.forSpecial(SpecialClassType.java:95)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.CompoundType.makeType(CompoundType.java:906)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.ClassType.initParents(ClassType.java:203)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.ImplementationType.initialize(ImplementationType.java:162)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:98)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.StubGenerator.getTopType(StubGenerator.java:155)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.Generator.generate(Generator.java:274)
at 
jdk.rmic@9-ea/sun.rmi.rmic.iiop.StubGenerator.generate(StubGenerator.java:101)
at jdk.rmic@9-ea/sun.rmi.rmic.Main.doCompile(Main.java:555)
at jdk.rmic@9-ea/sun.rmi.rmic.Main.compile(Main.java:173)
at jdk.rmic@9-ea/sun.rmi.rmic.Main.main(Main.java:795)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private static 
native boolean java.io.ObjectStreamClass.hasStaticInitializer(java.lang.Class) 
accessible: module java.base does not "exports private java.io" to module 
java.corba
at 
java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:414)
at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:198)
at 
java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:192)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:186)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.hasStaticInitializer(ObjectStreamClass.java:1571)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass._computeSerialVersionUID(ObjectStreamClass.java:1148)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.access$300(ObjectStreamClass.java:78)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass$3.run(ObjectStreamClass.java:540)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.init(ObjectStreamClass.java:519)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.java:171)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.lookup(ObjectStreamClass.java:104)
at 
java.corba@9-ea/com.sun.corba.se.impl.io.ObjectStreamClass.getActualSerialVersionUID(ObjectStreamClass.java:225)
at 
java.corba@9-ea/com.sun.corba.se.impl.util.RepositoryId.(RepositoryId.java:166)
... 14 more

same for IDL.

A quick search on the bug tracker didn't show any matching bugs, but
maybe I'm not looking in the right place. I wanted to consult with you
before pestering core-libs-dev (which likely is the wrong place anyway).

Cheers

 Stefan


--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin,Ireland


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant wrapper script testing

2016-10-25 Thread Johan Corveleyn
On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig  wrote:
> On 2016-10-18, Jeff Adamson wrote:
>
>>   I made a new pull request based on the ongoing work.
>
>> https://github.com/apache/ant/pull/25
>
> Yes, thanks. I've merged it.
>
>> What do you think and can we get some users to test behaviors on a variety
>> of platforms?
>
> I really hope we can.

I've tested 1.9.7 with the above change to the ant wrapper script
(I've copy pasted the "raw" version of the merge to 1.9.x of the above
pull request) on Solaris 11, but it doesn't work. Not with
esc_tool=sed and neither with esc_tool=awk. It's easy to test by
simply executing "ant -version".

See the output below:

[[[
bash-4.1> uname -a
SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
bash-4.1> ./ant.new -version   ### with esc_tool=sed
Buildfile: build.xml does not exist!
Build failed
bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
bash-4.1> ./ant.new -version
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: illegal statement near line 1
Buildfile: build.xml does not exist!
Build failed
]]]

I don't understand the sed command (I'm not much of a sed expert), but
I understand why the awk command fails: on Solaris "awk" really is the
"old awk", without the "new awk" extensions added in 1984 or so. This
means "gsub" is not available in "awk" on Solaris. To use gsub, you
have to invoke "nawk" on Solaris.

So if you want the awk variant to work on Solaris, you either have to
do it without gsub, or use nawk as executable (but I guess nawk won't
work on some other unix platforms).

It would probably be easier to make the sed statement work, but I have
to experiment a bit with that.

-- 
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



AUTO: Carsten Pfeiffer ist außer Haus (returning 28.10.2016)

2016-10-25 Thread Carsten . Pfeiffer

I am out of the office until 28.10.2016.




Note: This is an automated response to your message  "Re: Early Access
builds for JDK 8u122 b02 , JDK 9 & JDK 9 with Project Jigsaw b140 are
available on java.net" sent on 25.10.2016 11:25:59.

This is the only notification you will receive while this person is away.


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant wrapper script testing

2016-10-25 Thread Johan Corveleyn
On Tue, Oct 25, 2016 at 3:50 PM, Johan Corveleyn  wrote:
> On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig  wrote:
>> On 2016-10-18, Jeff Adamson wrote:
>>
>>>   I made a new pull request based on the ongoing work.
>>
>>> https://github.com/apache/ant/pull/25
>>
>> Yes, thanks. I've merged it.
>>
>>> What do you think and can we get some users to test behaviors on a variety
>>> of platforms?
>>
>> I really hope we can.
>
> I've tested 1.9.7 with the above change to the ant wrapper script
> (I've copy pasted the "raw" version of the merge to 1.9.x of the above
> pull request) on Solaris 11, but it doesn't work. Not with
> esc_tool=sed and neither with esc_tool=awk. It's easy to test by
> simply executing "ant -version".
>
> See the output below:
>
> [[[
> bash-4.1> uname -a
> SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
> bash-4.1> ./ant.new -version   ### with esc_tool=sed
> Buildfile: build.xml does not exist!
> Build failed
> bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
> bash-4.1> ./ant.new -version
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> Buildfile: build.xml does not exist!
> Build failed
> ]]]
>
> I don't understand the sed command (I'm not much of a sed expert), but
> I understand why the awk command fails: on Solaris "awk" really is the
> "old awk", without the "new awk" extensions added in 1984 or so. This
> means "gsub" is not available in "awk" on Solaris. To use gsub, you
> have to invoke "nawk" on Solaris.
>
> So if you want the awk variant to work on Solaris, you either have to
> do it without gsub, or use nawk as executable (but I guess nawk won't
> work on some other unix platforms).
>
> It would probably be easier to make the sed statement work, but I have
> to experiment a bit with that.

OK, so the problem is that sed on Solaris does not process lines that
don't end with a newline. So if I add a '\n' to the printf statement
that's piped to sed, on line 49, then it works on Solaris. I don't
know if that breaks other platforms of course. See patch below:

[[[
--- ant.new Tue Oct 25 16:01:51 2016
+++ ant.new.edited  Tue Oct 25 16:02:19 2016
@@ -46,7 +46,7 @@
 case "$esc_tool" in
   'sed')
 #  mac sed does not support group-0, so pattern uses group-1
-esc_arg="$(printf '%s' "$esc_arg" | sed -e 's@\([$"\\`]\)@\\\1@g')"
+esc_arg="$(printf '%s\n' "$esc_arg" | sed -e 's@\([$"\\`]\)@\\\1@g')"
 ;;
   'awk')
 esc_arg="$(printf '%s' "$esc_arg" | awk '{ gsub(/\\/,
""); print }' )"

]]]

Then at least 'ant -version' works on Solaris.

-- 
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: ant wrapper script testing

2016-10-25 Thread Jeff Adamson

Ok, hopefully this fixes it for Solaris without breaking mac or ubuntu
scenarios.

In sed mode script pads the argument with a \n. Experiments shows gnu sed
discards this character, so we don't need to strip it after processing, but
sed does preserve any explicit trailing newlines prior to last.
In awk mode script will use nawk when available (mac does not have nawk,
but does have an awk with gsub support). The `command` posix is used to
detect presence of nawk executable. This mode is just hedging that impl as
we try to fix both modes.

Retested on ubuntu with both awk and sed modes.
I will not be able to retest mac with bsd_sed until this evening.

Regards,
Jeff Adamson



From:   Jeff Adamson/Cleveland/IBM@IBMUS
To: "Ant Developers List" 
Cc: maarten_co...@yahoo.com
Date:   10/25/2016 01:56 PM
Subject:Re: ant wrapper script testing



Also glad to know that awk is basically a no-go due to legacy versions.
Suppose we could use `which nawk` to use that if present?

So the trailing newline was a thing that I think was reported against an
earlier iteration. I see no reason we can't change the "padding" to be a "X
\n" value instead of just "X". The trick is to add and strip exactly one
newline from the end so we dont' drop intended newlines from arguments.
Then that should guarantee that sed applies to the whole argument.

I'll see if I can come up with something quickly for that second option.

Regards,
Jeff Adamson

Johan Corveleyn ---10/25/2016 10:13:02 AM---On Tue, Oct 25, 2016 at 3:50
PM, Johan Corveleyn  wrote: > On Sat, Oct 22, 2016 a

From: Johan Corveleyn 
To: Ant Developers List 
Cc: maarten_co...@yahoo.com
Date: 10/25/2016 10:13 AM
Subject: Re: ant wrapper script testing



On Tue, Oct 25, 2016 at 3:50 PM, Johan Corveleyn  wrote:
> On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig 
wrote:
>> On 2016-10-18, Jeff Adamson wrote:
>>
>>>   I made a new pull request based on the ongoing work.
>>
>>> https://github.com/apache/ant/pull/25
>>
>> Yes, thanks. I've merged it.
>>
>>> What do you think and can we get some users to test behaviors on a
variety
>>> of platforms?
>>
>> I really hope we can.
>
> I've tested 1.9.7 with the above change to the ant wrapper script
> (I've copy pasted the "raw" version of the merge to 1.9.x of the above
> pull request) on Solaris 11, but it doesn't work. Not with
> esc_tool=sed and neither with esc_tool=awk. It's easy to test by
> simply executing "ant -version".
>
> See the output below:
>
> [[[
> bash-4.1> uname -a
> SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
> bash-4.1> ./ant.new -version   ### with esc_tool=sed
> Buildfile: build.xml does not exist!
> Build failed
> bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
> bash-4.1> ./ant.new -version
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> Buildfile: build.xml does not exist!
> Build failed
> ]]]
>
> I don't understand the sed command (I'm not much of a sed expert), but
> I understand why the awk command fails: on Solaris "awk" really is the
> "old awk", without the "new awk" extensions added in 1984 or so. This
> means "gsub" is not available in "awk" on Solaris. To use gsub, you
> have to invoke "nawk" on Solaris.
>
> So if you want the awk variant to work on Solaris, you either have to
> do it without gsub, or use nawk as executable (but I guess nawk won't
> work on some other unix platforms).
>
> It would probably be easier to make the sed statement work, but I have
> to experiment a bit with that.

OK, so the problem is that sed on Solaris does not process lines that
don't end with a newline. So if I add a '\n' to the printf statement
that's piped to sed, on line 49, then it works on Solaris. I don't
know if that breaks other platforms of course. See patch below:

[[[
--- ant.new Tue Oct 25 16:01:51 2016
+++ ant.new.edited  Tue Oct 25 16:02:19 2016
@@ -46,7 +46,7 @@
case "$esc_tool" in
  'sed')
#  mac sed does not support group-0, so pattern uses group-1
-esc_arg="$(printf '%s' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
+esc_arg="$(printf '%s\n' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
;;
  'awk')
esc_arg="$(printf '%s' "$esc_arg" | awk '{ gsub(/\\/,
""); print }' )"

]]]

Then at least 'ant -version' works on Solaris.

--
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org





Re: ant wrapper script testing

2016-10-25 Thread Jeff Adamson

Probably helps if I include a link to the updated change

https://github.com/jwadamson/ant-1/commit/f3a0faecc464e899ec77cd7f2052b81a7c52be35

Please let me know if this resolves the problems with every crazy input you
can think of.

Regards,
Jeff Adamson



From:   Jeff Adamson/Cleveland/IBM@IBMUS
To: "Ant Developers List" 
Cc: maarten_co...@yahoo.com
Date:   10/25/2016 01:56 PM
Subject:Re: ant wrapper script testing



Also glad to know that awk is basically a no-go due to legacy versions.
Suppose we could use `which nawk` to use that if present?

So the trailing newline was a thing that I think was reported against an
earlier iteration. I see no reason we can't change the "padding" to be a "X
\n" value instead of just "X". The trick is to add and strip exactly one
newline from the end so we dont' drop intended newlines from arguments.
Then that should guarantee that sed applies to the whole argument.

I'll see if I can come up with something quickly for that second option.

Regards,
Jeff Adamson

Johan Corveleyn ---10/25/2016 10:13:02 AM---On Tue, Oct 25, 2016 at 3:50
PM, Johan Corveleyn  wrote: > On Sat, Oct 22, 2016 a

From: Johan Corveleyn 
To: Ant Developers List 
Cc: maarten_co...@yahoo.com
Date: 10/25/2016 10:13 AM
Subject: Re: ant wrapper script testing



On Tue, Oct 25, 2016 at 3:50 PM, Johan Corveleyn  wrote:
> On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig 
wrote:
>> On 2016-10-18, Jeff Adamson wrote:
>>
>>>   I made a new pull request based on the ongoing work.
>>
>>> https://github.com/apache/ant/pull/25
>>
>> Yes, thanks. I've merged it.
>>
>>> What do you think and can we get some users to test behaviors on a
variety
>>> of platforms?
>>
>> I really hope we can.
>
> I've tested 1.9.7 with the above change to the ant wrapper script
> (I've copy pasted the "raw" version of the merge to 1.9.x of the above
> pull request) on Solaris 11, but it doesn't work. Not with
> esc_tool=sed and neither with esc_tool=awk. It's easy to test by
> simply executing "ant -version".
>
> See the output below:
>
> [[[
> bash-4.1> uname -a
> SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
> bash-4.1> ./ant.new -version   ### with esc_tool=sed
> Buildfile: build.xml does not exist!
> Build failed
> bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
> bash-4.1> ./ant.new -version
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> Buildfile: build.xml does not exist!
> Build failed
> ]]]
>
> I don't understand the sed command (I'm not much of a sed expert), but
> I understand why the awk command fails: on Solaris "awk" really is the
> "old awk", without the "new awk" extensions added in 1984 or so. This
> means "gsub" is not available in "awk" on Solaris. To use gsub, you
> have to invoke "nawk" on Solaris.
>
> So if you want the awk variant to work on Solaris, you either have to
> do it without gsub, or use nawk as executable (but I guess nawk won't
> work on some other unix platforms).
>
> It would probably be easier to make the sed statement work, but I have
> to experiment a bit with that.

OK, so the problem is that sed on Solaris does not process lines that
don't end with a newline. So if I add a '\n' to the printf statement
that's piped to sed, on line 49, then it works on Solaris. I don't
know if that breaks other platforms of course. See patch below:

[[[
--- ant.new Tue Oct 25 16:01:51 2016
+++ ant.new.edited  Tue Oct 25 16:02:19 2016
@@ -46,7 +46,7 @@
case "$esc_tool" in
  'sed')
#  mac sed does not support group-0, so pattern uses group-1
-esc_arg="$(printf '%s' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
+esc_arg="$(printf '%s\n' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
;;
  'awk')
esc_arg="$(printf '%s' "$esc_arg" | awk '{ gsub(/\\/,
""); print }' )"

]]]

Then at least 'ant -version' works on Solaris.

--
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org





Re: ant wrapper script testing

2016-10-25 Thread Jeff Adamson

Also glad to know that awk is basically a no-go due to legacy versions.
Suppose we could use `which nawk` to use that if present?

So the trailing newline was a thing that I think was reported against an
earlier iteration. I see no reason we can't change the "padding" to be a "X
\n" value instead of just "X". The trick is to add and strip exactly one
newline from the end so we dont' drop intended newlines from arguments.
Then that should guarantee that sed applies to the whole argument.

I'll see if I can come up with something quickly for that second option.

Regards,
Jeff Adamson



From:   Johan Corveleyn 
To: Ant Developers List 
Cc: maarten_co...@yahoo.com
Date:   10/25/2016 10:13 AM
Subject:Re: ant wrapper script testing



On Tue, Oct 25, 2016 at 3:50 PM, Johan Corveleyn  wrote:
> On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig 
wrote:
>> On 2016-10-18, Jeff Adamson wrote:
>>
>>>   I made a new pull request based on the ongoing work.
>>
>>> https://github.com/apache/ant/pull/25
>>
>> Yes, thanks. I've merged it.
>>
>>> What do you think and can we get some users to test behaviors on a
variety
>>> of platforms?
>>
>> I really hope we can.
>
> I've tested 1.9.7 with the above change to the ant wrapper script
> (I've copy pasted the "raw" version of the merge to 1.9.x of the above
> pull request) on Solaris 11, but it doesn't work. Not with
> esc_tool=sed and neither with esc_tool=awk. It's easy to test by
> simply executing "ant -version".
>
> See the output below:
>
> [[[
> bash-4.1> uname -a
> SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
> bash-4.1> ./ant.new -version   ### with esc_tool=sed
> Buildfile: build.xml does not exist!
> Build failed
> bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
> bash-4.1> ./ant.new -version
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> Buildfile: build.xml does not exist!
> Build failed
> ]]]
>
> I don't understand the sed command (I'm not much of a sed expert), but
> I understand why the awk command fails: on Solaris "awk" really is the
> "old awk", without the "new awk" extensions added in 1984 or so. This
> means "gsub" is not available in "awk" on Solaris. To use gsub, you
> have to invoke "nawk" on Solaris.
>
> So if you want the awk variant to work on Solaris, you either have to
> do it without gsub, or use nawk as executable (but I guess nawk won't
> work on some other unix platforms).
>
> It would probably be easier to make the sed statement work, but I have
> to experiment a bit with that.

OK, so the problem is that sed on Solaris does not process lines that
don't end with a newline. So if I add a '\n' to the printf statement
that's piped to sed, on line 49, then it works on Solaris. I don't
know if that breaks other platforms of course. See patch below:

[[[
--- ant.new Tue Oct 25 16:01:51 2016
+++ ant.new.edited  Tue Oct 25 16:02:19 2016
@@ -46,7 +46,7 @@
 case "$esc_tool" in
   'sed')
 #  mac sed does not support group-0, so pattern uses group-1
-esc_arg="$(printf '%s' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
+esc_arg="$(printf '%s\n' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
 ;;
   'awk')
 esc_arg="$(printf '%s' "$esc_arg" | awk '{ gsub(/\\/,
""); print }' )"

]]]

Then at least 'ant -version' works on Solaris.

--
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org




Re: ant wrapper script testing

2016-10-25 Thread Jeff Adamson

Oops, had the nawk check inverted.

should have been
https://github.com/jwadamson/ant-1/commit/c1ac08abcaad0030064d62933dda278b5326f92b

Regards,
Jeff Adamson



From:   Jeff Adamson/Cleveland/IBM@IBMUS
To: "Ant Developers List" 
Cc: maarten_co...@yahoo.com
Date:   10/25/2016 02:40 PM
Subject:Re: ant wrapper script testing



Probably helps if I include a link to the updated change

https://github.com/jwadamson/ant-1/commit/f3a0faecc464e899ec77cd7f2052b81a7c52be35


Please let me know if this resolves the problems with every crazy input you
can think of.

Regards,
Jeff Adamson

Jeff Adamson---10/25/2016 01:56:01 PM---Also glad to know that awk is
basically a no-go due to legacy versions. Suppose we could use `which

From: Jeff Adamson/Cleveland/IBM@IBMUS
To: "Ant Developers List" 
Cc: maarten_co...@yahoo.com
Date: 10/25/2016 01:56 PM
Subject: Re: ant wrapper script testing



Also glad to know that awk is basically a no-go due to legacy versions.
Suppose we could use `which nawk` to use that if present?

So the trailing newline was a thing that I think was reported against an
earlier iteration. I see no reason we can't change the "padding" to be a "X
\n" value instead of just "X". The trick is to add and strip exactly one
newline from the end so we dont' drop intended newlines from arguments.
Then that should guarantee that sed applies to the whole argument.

I'll see if I can come up with something quickly for that second option.

Regards,
Jeff Adamson

Johan Corveleyn ---10/25/2016 10:13:02 AM---On Tue, Oct 25, 2016 at 3:50
PM, Johan Corveleyn  wrote: > On Sat, Oct 22, 2016 a

From: Johan Corveleyn 
To: Ant Developers List 
Cc: maarten_co...@yahoo.com
Date: 10/25/2016 10:13 AM
Subject: Re: ant wrapper script testing



On Tue, Oct 25, 2016 at 3:50 PM, Johan Corveleyn  wrote:
> On Sat, Oct 22, 2016 at 4:11 PM, Stefan Bodewig 
wrote:
>> On 2016-10-18, Jeff Adamson wrote:
>>
>>>   I made a new pull request based on the ongoing work.
>>
>>> https://github.com/apache/ant/pull/25
>>
>> Yes, thanks. I've merged it.
>>
>>> What do you think and can we get some users to test behaviors on a
variety
>>> of platforms?
>>
>> I really hope we can.
>
> I've tested 1.9.7 with the above change to the ant wrapper script
> (I've copy pasted the "raw" version of the merge to 1.9.x of the above
> pull request) on Solaris 11, but it doesn't work. Not with
> esc_tool=sed and neither with esc_tool=awk. It's easy to test by
> simply executing "ant -version".
>
> See the output below:
>
> [[[
> bash-4.1> uname -a
> SunOS hostname-redacted 5.11 11.3 i86pc i386 i86pc
> bash-4.1> ./ant.new -version   ### with esc_tool=sed
> Buildfile: build.xml does not exist!
> Build failed
> bash-4.1> vi ant.new   ### change line 25 to esc_tool=awk
> bash-4.1> ./ant.new -version
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 1
> awk: illegal statement near line 1
> Buildfile: build.xml does not exist!
> Build failed
> ]]]
>
> I don't understand the sed command (I'm not much of a sed expert), but
> I understand why the awk command fails: on Solaris "awk" really is the
> "old awk", without the "new awk" extensions added in 1984 or so. This
> means "gsub" is not available in "awk" on Solaris. To use gsub, you
> have to invoke "nawk" on Solaris.
>
> So if you want the awk variant to work on Solaris, you either have to
> do it without gsub, or use nawk as executable (but I guess nawk won't
> work on some other unix platforms).
>
> It would probably be easier to make the sed statement work, but I have
> to experiment a bit with that.

OK, so the problem is that sed on Solaris does not process lines that
don't end with a newline. So if I add a '\n' to the printf statement
that's piped to sed, on line 49, then it works on Solaris. I don't
know if that breaks other platforms of course. See patch below:

[[[
--- ant.new Tue Oct 25 16:01:51 2016
+++ ant.new.edited  Tue Oct 25 16:02:19 2016
@@ -46,7 +46,7 @@
   case "$esc_tool" in
 'sed')
   #  mac sed does not support group-0, so pattern uses group-1
-esc_arg="$(printf '%s' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
+esc_arg="$(printf '%s\n' "$esc_arg" | sed -e
's@\([$"\\`]\)@\\\1@g')"
   ;;
 'awk')
   esc_arg="$(printf '%s' "$esc_arg" | awk '{ gsub(/\\/,
""); print }' )"

]]]

Then at least 'ant -version' works on Solaris.

--
Johan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org