Date: Tue, 5 Mar 2019 16:11:47 +0000
I will concede that static analysis tools and other tools that try to parse C++ probably don't need a textual inclusion format, since they most likely need to be able to parse and understand the pragmas anyway. If module mapping is sufficiently straightforward, then those tools can do module lookup the same as a compiler. Those tools already need to do include lookup in the same way that compilers do.
I think the textual inclusion format will still be very useful to distribution and caching tools though, as they don't need to understand the code. Those tools frequently lean on the compiler's preprocessor today, and don't know how to do include lookups.
> -----Original Message-----
> From: Nathan Sidwell <nathanmsidwell_at_gmail.com> On Behalf Of Nathan
> Sidwell
> Sent: Tuesday, March 5, 2019 6:04 AM
> To: Ben Craig <ben.craig_at_[hidden]>; modules_at_lists.isocpp.org; WG21 Tooling
> Study Group SG15 <tooling_at_open-std.org>
> Subject: [EXTERNAL] Re: [isocpp-modules] Round2: Path to modules with old
> bad build systems
>
> On 3/4/19 10:02 AM, Ben Craig wrote:
> > I do mean textual inclusion, though I can be convinced otherwise. Textual
> inclusion (with extra generated pragmas) should make it much easier to keep
> tools like distcc and cppcheck happy in the short term. I suspect that those
> tools don't want to crack open a BMI to figure out which other BMIs need to
> be found.
> >
> > Tools that (think they can) parse C++ will still need to understand these
> pragmas in order to provide the right macro, visibility, and reachability
> behaviors, so some work will still be required on their part, but at least they
> won't need to understand new binary formats.
>
> Correct, tools consuming such #pragma-marked flattened source will need to
> understand modules at a fundamental level. As such, why not implement
> the same mechanisms to find module source as the compiler?
> That'll give them more information to perform code analysis with.
>
> nathan
>
> >> On 3/2/19 1:03 PM, Ben Craig wrote:
> >>
> >>> Some quick notes on this implementation strategy:
> >>> * Uses TEXTUAL inclusion
> >>> * Compiler assumes that the build system knows nothing of BMIs
> >>> * Compiler needs to be able to do module mapping with minimal input
> >>> from users.
> >>
> >> Do you literally mean textual inclusion or do you really mean
> >> dynamically produce an internal-only BMI object?
> >>
> >> nathan
> >>
> >> --
> >> Nathan Sidwell
>
>
> --
> Nathan Sidwell
I think the textual inclusion format will still be very useful to distribution and caching tools though, as they don't need to understand the code. Those tools frequently lean on the compiler's preprocessor today, and don't know how to do include lookups.
> -----Original Message-----
> From: Nathan Sidwell <nathanmsidwell_at_gmail.com> On Behalf Of Nathan
> Sidwell
> Sent: Tuesday, March 5, 2019 6:04 AM
> To: Ben Craig <ben.craig_at_[hidden]>; modules_at_lists.isocpp.org; WG21 Tooling
> Study Group SG15 <tooling_at_open-std.org>
> Subject: [EXTERNAL] Re: [isocpp-modules] Round2: Path to modules with old
> bad build systems
>
> On 3/4/19 10:02 AM, Ben Craig wrote:
> > I do mean textual inclusion, though I can be convinced otherwise. Textual
> inclusion (with extra generated pragmas) should make it much easier to keep
> tools like distcc and cppcheck happy in the short term. I suspect that those
> tools don't want to crack open a BMI to figure out which other BMIs need to
> be found.
> >
> > Tools that (think they can) parse C++ will still need to understand these
> pragmas in order to provide the right macro, visibility, and reachability
> behaviors, so some work will still be required on their part, but at least they
> won't need to understand new binary formats.
>
> Correct, tools consuming such #pragma-marked flattened source will need to
> understand modules at a fundamental level. As such, why not implement
> the same mechanisms to find module source as the compiler?
> That'll give them more information to perform code analysis with.
>
> nathan
>
> >> On 3/2/19 1:03 PM, Ben Craig wrote:
> >>
> >>> Some quick notes on this implementation strategy:
> >>> * Uses TEXTUAL inclusion
> >>> * Compiler assumes that the build system knows nothing of BMIs
> >>> * Compiler needs to be able to do module mapping with minimal input
> >>> from users.
> >>
> >> Do you literally mean textual inclusion or do you really mean
> >> dynamically produce an internal-only BMI object?
> >>
> >> nathan
> >>
> >> --
> >> Nathan Sidwell
>
>
> --
> Nathan Sidwell
Received on 2019-03-05 17:11:58