[Scons-dev] Why not merge SCons.Util.NodeList into SCons.Node.NodeList?
Ryan Saunders
business at jediry.com
Sun Aug 7 18:03:18 EDT 2022
Hello,
I am working on a tool integrating vcpkg into SCons, and I've hit a curious feature of SCons architecture. Specifically, I would like to be able to do the following:
dlls = []
dlls += env.VCPkg('packagename').SharedLibraries()
My "target" type from the VCPkg builder is a custom class that exposes a SharedLibraries() function. But the actual return type of calling env.VCPkg(...) is a SCons.Node.NodeList, which has essentially no functionality. If it were a SCons.Util.NodeList instead, then I'd be able to do this, as the "Util" version has the ability to invoke methods on its contents and return a new NodeList containing the result.
Questions:
- Is there a way for me to force SCons to return my targets in a Util.NodeList?
- Why does SCons.Util.NodeList even exist as a distinct type from SCons.Node.NodeList? It seems like the functionality of SCons.Util.NodeList could be merged into SCons.Node.NodeList, and then you'd have just one, more useful class.
- If the answer to (2.) is "because no one's done it", shall I send a PR?
Ryan
Sent with[Proton Mail](https://proton.me/)secure email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20220807/ca30b27b/attachment.htm>
More information about the Scons-dev
mailing list