A related issue is that it doesn't appear to be possible to completely re-describe what it means to compute the 'signature' for a node. While you can override 'contents', that seems dangerous, but overriding get_content_hash seems insufficient, as there are several direct calls to like SCons.Util.MD5signature(contents) in the SCons sources. Perhaps all of those are, in practice, just passing the results of get_contents(), but then why should get_content_hash exist?
I think this is another area that could use improvement, as it seems very useful to be able to define for a node what its signature should be. On Tue, Apr 18, 2017 at 9:28 AM, Jason Kenny <[email protected]> wrote: > I would add that Parts we have a SymlinkFileNode that we added. It > requires some magic as we have to deal with the “restricted” transmogrify > between node in a safe way. It is non-trial to add a new node type. I > believe the original design was to make this easier, with the notion that > the FS object could be the local file system, or a FTP system, etc. I would > love to see this part cleaned up and grown as I think it would be very > powerful, however this need some careful development and thought to do > correctly. I should add that I believe the non-trival part is bound more to > the deisgn file based nodes, not other type of nodes as Value or Alias. I > would like to see a more global node manager for all nodes, not just the > one for the FS object that deals with file based nodes. Being able to look > up a node in general is very useful > > > > Jason > > > > *From:* Scons-dev [mailto:[email protected]] *On Behalf Of *Andrew > C. Morrow > *Sent:* Tuesday, April 18, 2017 7:43 AM > *To:* SCons developer list <[email protected]> > *Subject:* Re: [Scons-dev] Documentation > > > > > > As a word of caution, we did something similar in the MongoDB tree for a > new kind of "library": > > > > https://github.com/mongodb/mongo/blob/master/site_scons/ > site_tools/thin_archive.py#L53-L55 > > > > However, it doesn't fully work, because the SCons internals expect to be > able to transmogrify Nodes between the Entry, File, and Dir subclasses at > will and without consideration as to any further sub-classing. > > > > The result, in our experience, lead to very cryptic errors (see > https://jira.mongodb.org/browse/SERVER-27380), so we have disabled this > tool until we figure out how to do this right. > > > > Andrew > > > > > > > > On Tue, Apr 18, 2017 at 4:26 AM, Russel Winder <[email protected]> > wrote: > > On Mon, 2017-04-17 at 08:24 -0700, Bill Deegan wrote: > > Can you share your work in progress on bitbucket? > > The experimental repository is at https://github.com/russel/SCons_D_Exp > eriment > Even though SCons is a Mercurial world, the D world is a Git/GitHub > one. Given that Atlassian have turned BitBucket into a Git place to > compete with GitHub, I could push it to BitBucket as well, but I am not > sure the dilution would achieve anything. > > > On Mon, Apr 17, 2017 at 2:06 AM, Russel Winder <[email protected]> > > wrote: > > > > > On Sun, 2017-04-16 at 11:19 -0700, Bill Deegan wrote: > > > > Not sure what you mean.. Can you explain? > > > > > > For the dub tool, I believe I need a target node that is not a > > > SCons.Node.FS.File nor a SCons.Node.FS.Dir, but the builder > > > infrastructure is demanding that this be the case. I thus wanted to > > > create a _Library class that was a sub-class of SCons.Node.FS.File > > > but > > > with all the rest of the information carried as well. (I may be > > > going > > > up totally the wrong tree, but this is learning by hacking, seeking > > > feedback.) So I was looking for documentation to find out how to > > > call > > > the superclass initialiser, i.e. SCons.Node.FS.File.__init__. > > In the end I created a Subclass of SCons.Node.FS.File focussing on > representing the library archive created, but carrying lots of other > knowledge. I eventually settled on calling the superclass constructor > at the end of the subclass constructor (don't you just love Python :-) > thus: > > SCons.Node.FS.File.__init__(self, name, env.Dir(location), self) > > but I am really not sure that last argument is right. It works but it > doesn't feel right. However there is no documentation on the fs > parameter that I can find. I think maybe I am just not looking hard > enough. > > > -- > Russel. > ============================================================ > ================= > Dr Russel Winder t: +44 20 7585 2200 voip: > sip:[email protected] > 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] > London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder > > > _______________________________________________ > Scons-dev mailing list > [email protected] > https://pairlist2.pair.net/mailman/listinfo/scons-dev > > > > _______________________________________________ > Scons-dev mailing list > [email protected] > https://pairlist2.pair.net/mailman/listinfo/scons-dev > >
_______________________________________________ Scons-dev mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/scons-dev
