[Scons-users] Possible bug with cache and Value()
Bill Deegan
bill at baddogconsulting.com
Wed Nov 22 10:18:25 EST 2017
Rob,
At first glance looks like a bug on a code path which must not be covered
by our tests.
string vs bytes is a dead giveaway.
You must be running scons 3.0.1 with python 3.5+?
Can you try running with python 2.7.x? (It should work)
-Bill
On Wed, Nov 22, 2017 at 3:36 AM, Rob Spanton <rob at robspanton.com> wrote:
> Hi,
>
> I recently upgraded to scons 3.0.1, and I'm encountering a problem with
> using
> CacheDir() in combination with Value(). I can replicate the issue with
> this
> minimal SConstruct:
>
> CacheDir("cache")
> Command("somefile", Value("test"), "echo hi > $TARGET")
>
> I've included the traceback that this produces at the end of this
> email. I
> think what I'm doing with CacheDir, Command and Value is legitimate
> but am
> entirely happy to be persuaded that it is not!
>
> I can work with this for the moment by disabling the cache, but it
> would be
> useful if someone with some more in-depth scons knowledge than me
> could shed
> some light on what's going on.
>
> Thanks,
>
> Rob Spanton
>
> ---
>
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> scons: *** [somefile] TypeError : sequence item 0: expected str
> instance, bytes found
> Traceback (most recent call last):
> File "/usr/lib/scons/SCons/Action.py", line 689, in __call__
> cmd = self.strfunction(target, source, env, executor)
> TypeError: CacheRetrieveString() takes 3 positional arguments but 4
> were given
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/lib/scons/SCons/Taskmaster.py", line 241, in execute
> if not t.retrieve_from_cache():
> File "/usr/lib/scons/SCons/Node/FS.py", line 2925, in
> retrieve_from_cache
> return self.get_build_env().get_CacheDir().retrieve(self)
> File "/usr/lib/scons/SCons/CacheDir.py", line 263, in retrieve
> if CacheRetrieve(node, [], env, execute=1) == 0:
> File "/usr/lib/scons/SCons/Action.py", line 691, in __call__
> cmd = self.strfunction(target, source, env)
> File "/usr/lib/scons/SCons/CacheDir.py", line 66, in
> CacheRetrieveString
> cachedir, cachefile = cd.cachepath(t)
> File "/usr/lib/scons/SCons/CacheDir.py", line 224, in cachepath
> sig = node.get_cachedir_bsig()
> File "/usr/lib/scons/SCons/Node/FS.py", line 3391, in
> get_cachedir_bsig
> result = self.cachesig = SCons.Util.MD5collect(sigs)
> File "/usr/lib/scons/SCons/Util.py", line 1550, in MD5collect
> return MD5signature(', '.join(signatures))
> TypeError: sequence item 0: expected str instance, bytes found
> scons: building terminated because of errors.
> _______________________________________________
> 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/20171122/2d42e876/attachment.html>
More information about the Scons-users
mailing list