You can think of the metadata generation as generation of the headers, early in the build process.

 

 

From: tooling-bounces@open-std.org <tooling-bounces@open-std.org> On Behalf Of Ben Craig
Sent: Friday, February 1, 2019 7:47 AM
To: WG21 Tooling Study Group SG15 <tooling@open-std.org>
Subject: Re: [Tooling] Modules

 

Current state of things:  Within a library*, no dependency information** is needed in order to generate a clean build.  I can build all my .cpp files in any order I want.

Future state of things: With a library, dependency information will need to be generated / provided in order to generate a clean build.  I need to build my modules in dependency order.  The correct order depends upon the contents of the modules.

 

* Across libraries, dependency order matters again because later linking steps depend on earlier linking steps.

** This isn’t 100% true, as generated headers from tools like SWIG, protobufs, thrift, and I think some QT things, all require those headers to be generated before you can compile your .cpp files.  In my experience, this is usually handled by doing all the header generation early in the build process, before any .cpp files are built, and that approach doesn’t scale well to modules.  build2 does this different and more correctly, and I suspect that Google’s internal build process is similar.

 

From: tooling-bounces@open-std.org <tooling-bounces@open-std.org> On Behalf Of Titus Winters
Sent: Friday, February 1, 2019 8:25 AM
To: WG21 Tooling Study Group SG15 <tooling@open-std.org>
Subject: Re: [Tooling] Modules

 

No, naturally not.  The build system handles transitivity and making transitive includes available in each parallel build shard.

 

I'm just trying to figure out how much of this is fundamental to all build systems (I don't think it is) vs. "I just want globbing to be enough" (I also don't think it's that).  There's some subtlety in here that I think is getting lost and conflated with "stuff works this way now". Of course if we change things, things will be different. 

 

 

On Fri, Feb 1, 2019 at 9:20 AM Boris Kolpackov <boris@codesynthesis.com> wrote:

Titus Winters <titus@google.com> writes:

> We've been doing explicit statements of the dependency chain for our
> codebase for almost 20 years, and I've literally never heard a new hire (or
> anyone else) say it is a "huge" burden.

The question is to what degree. I am sure you don't require new
hires to manually specify for each translation unit dependencies
on headers it includes, transitively?

But that would sure make for a nice hazing ritual.
_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling