C++ Logo

sg15

Advanced search

Re: P2581R0: Specifying the Interoperability of Binary Module Interface Files

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Tue, 3 May 2022 22:47:32 +0000
[Ben]
> There's already concern that these names are too long as it is.

Do you need the prefix `_MODULES_` in there? Or can you elide it and still be fully legit? Like
  - CXX_HEADER_UNITS
  - CXX_INTERNAL_PARTITIONS
  - CXX_MODULE_INTERFACES

> However, a better long-term solution would require changes on the MSVC
> side. The `-internalPartition` flag being the way it is makes users have
> to consider the `export` bit. If instead, `CXX_MODULES` can instead be
> *any* TU that creates a BMI, the non-standard `module M:part;` impl unit
> can then be something that only those that use it have to deal with
> (maybe being `-implementationPartition`?). Is there any hope of moving
> the flag to being present on the non-standard thing instead of the
> standard-compliant unit?

There are several things to consider here. The most worrisome to be is whether that practice is essentially closing the door for future standard language evolution where an exported module partition can have a module partition implementation. That question, for me, is more important than what MSVC is doing today.

My hope is we are not setting up the new build framework with an implicit "no" to that answer.

-- Gaby


-----Original Message-----
From: Ben Boeckel <ben.boeckel_at_[hidden]>
Sent: Tuesday, May 3, 2022 12:45 PM
To: Gabriel Dos Reis <gdr_at_microsoft.com>
Cc: sg15_at_[hidden]; Daniel Ruoso <daniel_at_ruoso.com>; Tom Honermann <tom_at_honermann.net>
Subject: Re: [SG15] P2581R0: Specifying the Interoperability of Binary Module Interface Files

On Tue, May 03, 2022 at 19:33:22 +0000, Gabriel Dos Reis wrote:
> [Ben]
> > `CXX_MODULES`: for any TU which uses `export` (module or partition)
>
> Can that be CXX_MODULES_INTERFACES instead?

There's already concern that these names are too long as it is. This
name is more specific which is nice.

However, a better long-term solution would require changes on the MSVC
side. The `-internalPartition` flag being the way it is makes users have
to consider the `export` bit. If instead, `CXX_MODULES` can instead be
*any* TU that creates a BMI, the non-standard `module M:part;` impl unit
can then be something that only those that use it have to deal with
(maybe being `-implementationPartition`?). Is there any hope of moving
the flag to being present on the non-standard thing instead of the
standard-compliant unit?

Thanks,

--Ben

Received on 2022-05-03 22:47:35