[Scons-users] problem with new Jar builder-wrapper in 3.0.1

Bill Deegan bill at baddogconsulting.com
Fri Nov 17 11:03:41 EST 2017


Mats,

All return values from builders are NodeLists, (list of nodes)

Can you try:
source=simpleclient_classes+['MANIFEST.MF'])

I've also added a link to this thread in the pull request. Hopefully Daniel
Moody will respond here.

-Bill


On Thu, Nov 16, 2017 at 2:33 PM, Mats Wichmann <mats at wichmann.us> wrote:

>
> Per the instructions still on the scons.org page, I'm emailing this here
> prior to filing a ticket.
>
> When I tried our build with 3.0.1., the CI builders for the java
> versions tipped over.
>
> The error message looks like this:
>
> TypeError: coercing to Unicode: need string or buffer, list found:
>
> the relevant bit of the backtrace seems to be:
>
> 15:34:53   File
> "/home/jenkins-ci/workspace/iotivity-verify-linux_secured_
> with_java/java/examples-java/simpleclient/SConscript",
> line 25:
> 15:34:53     example_jar = jdk_env.Jar(target='simpleclient.jar',
> source=[simpleclient_classes, 'MANIFEST.MF'])
> 15:34:53   File
> "/home/jenkins-ci/workspace/iotivity-verify-linux_secured_
> with_java/scons-local/scons-local-3.0.1/SCons/Environment.py",
> line 224:
> 15:34:53     return self.method(*nargs, **kwargs)
> 15:34:53   File
> "/home/jenkins-ci/workspace/iotivity-verify-linux_secured_
> with_java/scons-local/scons-local-3.0.1/SCons/Tool/jar.py",
> line 174:
> 15:34:53     if os.path.isfile(s):
> 15:34:53   File "/usr/lib/python2.7/genericpath.py", line 29:
> 15:34:53     st = os.stat(path)
>
>
> The code in question in scons in Tool/jar.py is brand new:
>
>     """
>     A pseudo-Builder wrapper around the separate Jar sources{File,Dir}
>     Builders.
>     """
>
> The invocation that triggered the failure looked like this:
>
> simpleclient_classes = jdk_env.Java(target='classes',
> source=['src/main/java'])
> example_jar = jdk_env.Jar(target='simpleclient.jar',
> source=[simpleclient_classes, 'MANIFEST.MF'])
>
> (the second line is the one from the traceback)
>
> so the return from the Java builder is passed to Jar as part of the
> source list, but the new code does not appear to expect the type it is
> passed as a result.  It's not clear if our call to Jar is illegal, but
> it worked fine through 3.0.0.  It *looks* like the intent is not to do
> it the way we do, since the preceding call to the Java builder seems
> unnecessary per this doc snippet:
>
> "Any .java files in the source list will be compiled to .class files by
> calling the Java Builder. "
>
> So it would be good to figure out if this is a new bug in jar.py, or if
> the documentation should be explicit about disallowing the way we are
> calling it, which at least to my reading it is not explicit about.
>
> thanks,
>
> -- mats
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171117/9d4073f4/attachment-0001.html>


More information about the Scons-users mailing list