Date: Fri, 3 Jun 2022 10:52:05 -0400
On Thu, Jun 02, 2022 at 23:06:56 -0400, Steve Downey wrote:
> The case of "config.h" being an importable header, and different across
> translation units in the same build has to be supported.
> ```import "config.h" ``` has to handle collisions, as does the rewritten
> form for #include for "known to be importable". This may mean compilers
> have to stat include paths before concluding about import translation, and
> we have to distinguish absolute paths for the cached effective bmi. I don't
> think we can require uniqueness as we do for module names.
This is…fine. It's no worse than separate `config.h` per library today.
You just have to clarify that `config.h` is a *private* importable
header (and therefore not use it from any module unit importable from a
consumer of your library as part of its API; impl units are fine).
--Ben
> The case of "config.h" being an importable header, and different across
> translation units in the same build has to be supported.
> ```import "config.h" ``` has to handle collisions, as does the rewritten
> form for #include for "known to be importable". This may mean compilers
> have to stat include paths before concluding about import translation, and
> we have to distinguish absolute paths for the cached effective bmi. I don't
> think we can require uniqueness as we do for module names.
This is…fine. It's no worse than separate `config.h` per library today.
You just have to clarify that `config.h` is a *private* importable
header (and therefore not use it from any module unit importable from a
consumer of your library as part of its API; impl units are fine).
--Ben
Received on 2022-06-03 14:51:25