[Scons-dev] Documentation

Jason Kenny dragon512 at live.com
Tue Apr 18 09:28:57 EDT 2017


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:scons-dev-bounces at scons.org] On Behalf Of Andrew C. Morrow
Sent: Tuesday, April 18, 2017 7:43 AM
To: SCons developer list <scons-dev at scons.org>
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 <russel at winder.org.uk<mailto:russel at winder.org.uk>> 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 <russel at winder.org.uk<mailto:russel at winder.org.uk>>
> 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<tel:%2B44%2020%207585%202200>   voip: sip:russel.winder at ekiga.net<mailto:sip%3Arussel.winder at ekiga.net>
41 Buckmaster Road    m: +44 7770 465 077<tel:%2B44%207770%20465%20077>   xmpp: russel at winder.org.uk<mailto:russel at winder.org.uk>
London SW11 1EN, UK   w: www.russel.org.uk<http://www.russel.org.uk>  skype: russel_winder

_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org<mailto:Scons-dev at scons.org>
https://pairlist2.pair.net/mailman/listinfo/scons-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170418/e5d429cf/attachment-0001.html>


More information about the Scons-dev mailing list