Date: Mon, 4 Mar 2019 15:02:41 +0000
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.
That said, Mathias Stearn raised an interesting point... I'm not sure how onerous it is for implementations to drop non-macro symbols. A pragma marking the end of a module gives the implementation the information it needs, but that doesn't mean it's easy to remove elements from the data structure. The BMI model likely makes it easier to never add private symbols in the first place.
> -----Original Message-----
> From: Nathan Sidwell <nathanmsidwell_at_[hidden]> On Behalf Of Nathan
> Sidwell
> Sent: Monday, March 4, 2019 8:51 AM
> To: modules_at_[hidden]; Ben Craig <ben.craig_at_[hidden]>; WG21 Tooling
> Study Group SG15 <tooling_at_[hidden]>
> Subject: [EXTERNAL] Re: [isocpp-modules] Round2: Path to modules with old
> bad build systems
>
> 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
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.
That said, Mathias Stearn raised an interesting point... I'm not sure how onerous it is for implementations to drop non-macro symbols. A pragma marking the end of a module gives the implementation the information it needs, but that doesn't mean it's easy to remove elements from the data structure. The BMI model likely makes it easier to never add private symbols in the first place.
> -----Original Message-----
> From: Nathan Sidwell <nathanmsidwell_at_[hidden]> On Behalf Of Nathan
> Sidwell
> Sent: Monday, March 4, 2019 8:51 AM
> To: modules_at_[hidden]; Ben Craig <ben.craig_at_[hidden]>; WG21 Tooling
> Study Group SG15 <tooling_at_[hidden]>
> Subject: [EXTERNAL] Re: [isocpp-modules] Round2: Path to modules with old
> bad build systems
>
> 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
Received on 2019-03-04 16:02:48