[Scons-users] emitter create dependency cycle
    Philipp Kraus 
    philipp.kraus at flashpixx.de
       
    Fri Sep  6 18:42:38 EDT 2013
    
    
  
On 2013-09-06 21:18:28 +0000, Bill Deegan said:
> So your source is a directory? What directory?
Yes, the directory is set to "/fullpath/library/build/lua/bridge"
> -Bill
> 
> 
> On Fri, Sep 6, 2013 at 1:45 PM, Philipp Kraus 
> <philipp.kraus at flashpixx.de> wrote:
> The command shows:
> 
> target:['/fullpath/library/build/lua/bridge/Manual.html', 
> '/fullpath/library/build/lua/bridge/.gitignore', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/CFunctions.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/RefCountedPtr.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/LuaException.h', 
> '/fullpath/library/build/lua/bridge/index.html', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/Iterator.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/FuncTraits.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/TypeList.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/LuaHelpers.h', 
> '/fullpath/library/build/lua/bridge/Doxyfile', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/TypeTraits.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/Userdata.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/ClassInfo.h', 
> '/fullpath/library/build/lua/bridge/.gitattributes', 
> '/fullpath/library/build/lua/bridge/CHANGES', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/dump.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/LuaBridge.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/Stack.h', 
> '/fullpath/library/build/lua/bridge/README.md', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/Namespace.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/RefCountedObject.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/LuaRef.h', 
> '/fullpath/library/build/lua/bridge/Source/LuaBridge/detail/Constructor.h'] 
> 
> 
> source:[<SCons.Node.FS.Dir object at 0x10f85ad10>]
> 
> Thanks
> 
> Phil
> 
> On 2013-09-06 18:11:15 +0000, William Deegan said:
> 
> Phil,
> 
> Stil a print here:
>     SCons.Script.Ignore(target, source)
>     print "target:%s source:%s"%(target,source)
>     return target, source
> 
> And paste the output.
> Also what's the command you're running and capturing the output?
> 
> -Bill
> On Sep 6, 2013, at 1:50 AM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
> Hi Bill,
> 
> this seems to be not correct, because my emitter results only files 
> (with a full path), the target_factory is also set to files only. The 
> problem seems to be the full file path, but I can not remove the path, 
> because in the build(er) call I need this full path. Can you be more 
> specific for a workaround?
> 
> Thanks
> 
> Phil
> 
> 
> 
> On 2013-09-05 20:06:04 +0000, William Deegan said:
> 
> Phil,
> 
> Don't have Dir's in your target's or Sources. Just have files.
> 
> -Bill
> On Sep 4, 2013, at 9:17 PM, Philipp Kraus 
> <philipp.kraus at tu-clausthal.de> wrote:
> Hi Bill,
> 
> do you know some workaround / fix to solve this problem at the moment?
> 
> 
> Phil
> 
> 
> 
> Am 05.09.2013 um 00:33 schrieb Bill Deegan <bill at baddogconsulting.com>:
> Phil,
> 
> The problem you're running into (I think) is that SCons implicitly adds 
> a dependency to a directory for each file in it.
> The net is you need to deal with files and not directories or you will 
> run into this issue.
> 
> I do agree however that we need a way to deal with directories as an 
> object and not just a container with the implicit dependencies as a 
> source and as a target.
> One thing to consider is whether such and object should always be 
> considered out of date if any file in the directory (and possibility in 
> it's sub-directories recursively) has changed.
> 
> -Bill
> 
> 
> On Wed, Sep 4, 2013 at 6:19 AM, Philipp Kraus 
> <philipp.kraus at flashpixx.de> wrote:
> On 2013-09-04 13:05:54 +0000, Gary Oberbrunner said:
> 
> 
> 
> 
> On Wed, Sep 4, 2013 at 9:01 AM, Philipp Kraus 
> <philipp.kraus at flashpixx.de> wrote:
> On 2013-09-04 12:51:50 +0000, Gary Oberbrunner said:
> ...
> Can you use Ignore() to make the dir ignore the new files you're creating?
> 
> http://www.scons.org/doc/2.3.0/HTML/scons-user.html#AEN1275
> Hi Gary,
> IMHO I can use ignore, because only the targets are needed, but how can 
> I use ignore in my builder script - not in my build (SConstruct) script?
> I need the package call, is it SCons.Ignore, isn't it?
> 
> I usually do
>  from SCons.Script import *
> then you can write things in your external script the same as in SConscript.  
> 
> http://www.scons.org/doc/2.3.0/HTML/scons-user.html#AEN3822
> 
> I get always the dependy cycle. My emitter shows:
> 
> def __GitFileListEmitter( target, source, env ) :
>     cmd    = env.subst(env["mycommand"], source=source)
>     handle = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
>     target = handle.stdout.readlines()
>     handle.communicate()
>     if handle.returncode <> 0 :
>         raise SCons.Errors.StopError("error [%s]" % (cmd, source[0]) )
> 
>     target = list(set( [os.path.join(source[0].abspath, i.strip()) for 
> i in target] ))
>     SCons.Script.Ignore(target, source)
>     return target, source
> 
> For my test build with Lua Bridge shows a cycle:
> 
>   library/build/lua/bridge/README.md -> 
> library/build/lua/bridge/Source/LuaBridge/detail/Constructor.h -> 
> library/build/lua/bridge/Source/LuaBridge/detail -> 
> library/build/lua/bridge/Source/LuaBridge -> 
> library/build/lua/bridge/Source -> library/build/lua/bridge/Manual.html 
> -> library/build/lua/bridge/index.html -> 
> library/build/lua/bridge/README.md
> 
> If I remove source[0].abspath everythings fine, but the resulting files 
> are incorrect (path is incorrect)
> 
> The Ignore call should IMHO ignore any connection between each target 
> and source, but this seems to be a cycle between the targets. Each 
> target has got a unique path, but all targets in the "source" 
> directory. source is a single Dir object and target should be only a 
> list of files. 
> 
> Thanks a lot
> 
> Phil
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130907/089652fb/attachment.html 
    
    
More information about the Scons-users
mailing list