[Tooling] [isocpp-modules] Dependency format with module details implementation

Gabriel Dos Reis gdr at microsoft.com
Thu Apr 11 17:42:33 CEST 2019


I think I agree with your broader message, but I am not sure I would recommend the pragma route.

— Gaby

> On Apr 11, 2019, at 5:35 AM, Ben Boeckel via Modules <modules at lists.isocpp.org> wrote:
> 
>> On Thu, Apr 11, 2019 at 12:45:36 +0200, Boris Kolpackov wrote:
>> "Module interface (translation) unit" normally refers to a C++
>> source file that defines the module's interface (i.e., it contains
>> 'export module M;'). Are you saying that someone/something should
>> be translating headers to equivalent "real" module interfaces? If
>> so, that's an interesting idea, though I can also see an immediate
>> problem: macros.
> 
> Not headers. Headers can be installed as-is. MIU files are more relevant
> to "real" modules, particularly those with partitions.
> 
>> And if MIU is something else, can you elaborate on what it could
>> contain?
> 
> Imagine a module with an exported partitions:
> 
> withparts.mpp:
> 
>    export module withparts;
>    export import :partition;
> 
>    export int func() {
>        return frompartition();
>    }
> 
> partition.mpp:
> 
>    export module withparts:partition;
> 
>    export int frompartition() {
>        return 0;
>    }
> 
> When an external consumer wants to use the `withparts` module, what
> rules should a build system create? The hypothetical MIU I'm thinking of
> would be a distillation of the actual interface of the module including
> partitions. A simple encoding would be something like the
> pragma-delimited idea relevant to distributed compilation. The easy
> solution is that you install your partition files too and they get added
> to the "please compile these BMIs" set generated by the build system.
> 
> --Ben
> _______________________________________________
> Modules mailing list
> Modules at lists.isocpp.org
> Subscription: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fmodules&amp;data=02%7C01%7Cgdr%40microsoft.com%7C395d38302b754894cbe108d6be7a3359%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636905829402911630&amp;sdata=KuEXKO4ZZao5l4no4dru1kt%2FEAzCGuht4WNVQficFFw%3D&amp;reserved=0
> Link to this post: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmodules%2F2019%2F04%2F0376.php&amp;data=02%7C01%7Cgdr%40microsoft.com%7C395d38302b754894cbe108d6be7a3359%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636905829402911630&amp;sdata=G6z9AbA0FoJXnyLuLVP3cpTdnJAa8cBwVYWPwvP1poo%3D&amp;reserved=0


More information about the Tooling mailing list