[Scons-users] Found dependency cycle

Bill Deegan bill at baddogconsulting.com
Wed Mar 22 18:01:09 EDT 2017


On Wed, Mar 22, 2017 at 1:42 PM, Dave Vitek <dvitek at grammatech.com> wrote:

> Perhaps.  How safe is it for the value of such a variable to change over
> time?  Does anything cache the result of the code below?  Would there need
> to be measures to enforce immutability?
>

I believe only the following flags (and options which set them) would cause
caching of the scanned (or not scanned) dependencies.

--implicit-cache

Cache implicit dependencies. This causes *scons* to use the implicit
(scanned) dependencies from the last time it was run instead of scanning
the files for implicit dependencies. This can significantly speed up SCons,
but with the following limitations:

*scons* will not detect changes to implicit dependency search paths (e.g.
*CPPPATH*, *LIBPATH*) that would ordinarily cause different versions of
same-named files to be used.

*scons* will miss changes in the implicit dependencies in cases where a new
implicit dependency is added earlier in the implicit dependency search path
(e.g. *CPPPATH*, *LIBPATH*) than a current implicit dependency with the
same name.
--implicit-deps-changed

Forces SCons to ignore the cached implicit dependencies. This causes the
implicit dependencies to be rescanned and recached. This implies
--implicit-cache.
--implicit-deps-unchanged

Force SCons to ignore changes in the implicit dependencies. This causes
cached implicit dependencies to always be used. This implies
--implicit-cache.

(From manpage: http://scons.org/doc/production/HTML/scons-man.html )


>
>
> On 3/22/2017 4:21 PM, Bill Deegan wrote:
>
> Perhaps a NO_AUTO_SCANNER env variable to control?
> Would you make a pull request for such?
> Ideally with a test...
>
> -Bill
>
> On Wed, Mar 22, 2017 at 11:12 AM, Dave Vitek <dvitek at grammatech.com>
> wrote:
>
>> This sounds like the problem I described in my email last week: "2.5.0
>> scanner fidelity regression since 2.3.4."
>>
>> We have been able to resolve the issue here by disabling the promiscuous
>> scanner selection logic for builders that do not have scanners:
>>
>> Index: Node/__init__.py
>> ===================================================================
>> --- __init__.py (revision 134700)
>> +++ __init__.py (working copy)
>> @@ -952,9 +952,10 @@
>>      def _get_scanner(self, env, initial_scanner, root_node_scanner, kw):
>>          if not initial_scanner:
>>              # handle implicit scanner case
>> -            scanner = self.get_env_scanner(env, kw)
>> -            if scanner:
>> -                scanner = scanner.select(self)
>> +            scanner = None
>> +            #scanner = self.get_env_scanner(env, kw)
>> +            #if scanner:
>> +            #    scanner = scanner.select(self)
>>          else:
>>              # handle explicit scanner case
>>              scanner = initial_scanner.select(self)
>>
>> Use at your own risk.  This may have negative consequences if you were
>> relying on the promiscuous scanner selection behavior.
>>
>>
>> On 3/20/2017 10:39 AM, Непомнящий Евгений wrote:
>>
>>> Hello
>>>
>>> I have file source.cpp, which #include generated file source.gen.h.
>>> source.gen.h generate by other tool on the basis of source.cpp
>>>
>>> source.cpp
>>> ----
>>>
>>> #include "source.gen.h"
>>>
>>> int main() { return 0; }
>>>
>>>
>>> SConstruct
>>> ----
>>>
>>> e = Environment()
>>> e.Command("source.gen.h", "source.cpp", Copy('$TARGET', '$SOURCE')) #
>>> "generator"
>>> e.Program("source.cpp")
>>>
>>>
>>>
>>> This code works fine in Scons 2.1, but Scons 2.5.1 produce error:
>>> scons: *** Found dependency cycle(s):
>>>   source.gen.h -> source.gen.h
>>>
>>> File "C:\Python27\Lib\site-packages\scons-2.5.1\SCons\Taskmaster.py",
>>> line 1043, in cleanup
>>>
>>> How do I get around this error?
>>>
>>> Thank you
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
>
> _______________________________________________
> Scons-users mailing listScons-users at scons.orghttps://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> 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/20170322/a264f73e/attachment-0001.html>


More information about the Scons-users mailing list