C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-core] [modules] wordings to allow build system to not always emit BMI for implementation partition units

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Fri, 16 Jan 2026 10:47:00 +0000
Err, 'explicit'? No, not that. Seriously.

-- Gaby

From: SG15 <sg15-bounces_at_[hidden]> On Behalf Of Chuanqi Xu via SG15
Sent: Thursday, January 15, 2026 7:01 PM
To: core <core_at_[hidden]>
Cc: Chuanqi Xu <chuanqi.xcq_at_[hidden]>; SG15 <sg15_at_[hidden]>
Subject: Re: [isocpp-sg15] [isocpp-core] [modules] wordings to allow build system to not always emit BMI for implementation partition units

Sounds nice to me! I'd like to write a paper for it : )

Thanks,
Chuanqi
------------------------------------------------------------------
From:core <core_at_[hidden]<mailto:core_at_[hidden]>>
Send Time:Fri, Jan 16, 2026, 10:05
To:core<core_at_[hidden]<mailto:core_at_[hidden]>>
CC:Richard Smith<richardsmith_at_[hidden]<mailto:richardsmith_at_[hidden]>>; "Jan Kokemüller"<jan.kokemueller_at_[hidden]<mailto:jan.kokemueller_at_[hidden]>>; SG15<sg15_at_[hidden]<mailto:sg15_at_[hidden]>>; Chuanqi Xu<chuanqi.xcq_at_[hidden]<mailto:chuanqi.xcq_at_[hidden]>>
Subject:Re: [isocpp-core] [isocpp-sg15] [modules] wordings to allow build system to not always emit BMI for implementation partition units

If we're looking for a syntax for a module unit that doesn't implicitly import the module interface (which is not on-topic for CWG, but since SG15 is also CC'd...) how about

explicit module M; // in module M but does not implicitly import M

On Thu, 15 Jan 2026 at 17:49, Chuanqi Xu via Core <core_at_[hidden]<mailto:core_at_[hidden]>> wrote:
No... it will still introduce breaking change since now we may still import parition in implementation unit which is not a partition if the imported partition is an implementation partition.

And from language perpsective, the users now can legally import any partition if they want. This is not banned. So the trival change (asking implementation unit don't importing the primary module interface unit) will be a breaking change in my mind.

Thanks,
Chuanqi
------------------------------------------------------------------
From:Jan Kokemüller <jan.kokemueller_at_[hidden]<mailto:jan.kokemueller_at_[hidden]>>
Send Time:Thu, Jan 15, 2026, 19:53
To:SG15<sg15_at_[hidden]<mailto:sg15_at_[hidden]>>; core<core_at_[hidden]<mailto:core_at_[hidden]>>
CC:Chuanqi Xu<chuanqi.xcq_at_[hidden]<mailto:chuanqi.xcq_at_[hidden]>>
Subject:Re: [isocpp-sg15] [isocpp-core] [modules] wordings to allow build system to not always emit BMI for implementation partition units

On 15.01.26 04:31, Chuanqi Xu via SG15 wrote:
>> It seems to me that what you want is a module implementation unit that doesn't import the primary module interface unit.
>
> Yeah, exactly.
>
>> The evolution question is whether we want to add a way to express this use case without the throwaway partition name.
>
> I didn't think this in the first time since I feel this is a breaking change. But, if we or the EWG feel good, maybe we can do this?


What about the following (breaking) change to the standard:

    module B; // implicitly imports B as usual

...but:

    module B; // does _not_ implicitly import B
    import :Y; // ...because we explicitly import a partition

Looking at the ecosystem we might just get away with this breaking change... What do you think?
_______________________________________________
Core mailing list
Core_at_[hidden]<mailto:Core_at_[hidden]>
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
Link to this post: http://lists.isocpp.org/core/2026/01/19227.php

Received on 2026-01-16 10:47:03