Ugh, sorry. the lack of Subject/References broke threading and I missed
this continuation.

On Wed, Feb 12, 2025 at 22:46:23 +0000, Frederick Virchanza Gotham via Gcc 
wrote:
> I think it might be a possibility given how compiler vendors (and also
> vendors of tools like CMake) aren't really getting very far with
> modules. They've had a few years already.

"Not very far" is probably the opinion of someone that last seriously
checked in on the status in 2021 or so. Things have definitely changed
since then.

Yes, it has taken time. Longer than I'd like (as author of the CMake
support, author of P1689 for dependency scanning, and SG15 Tooling
member). But writing a spec to have toolchains to make what build
systems need to get what users need to test toolchains is not a fast
iteration cycle. Rinse and repeat for `import std`. It will likely be
another run through this cycle for header units too.

But we are finally at a point where named modules can be experimented
with. The timeline has been (roughly):

- 2019 Feb: pushing to get dependency scanning possible (I have patches
  to CMake and GCC to proof-of-concept at the Kona meeting)
- 2019 Mar: CMake uses P1689R2 for its Fortran scanning/dependency
  computations. The implementation is updated for further revision
  updates as time goes on.
- 2020-2022: hammering out P1689 details. As of P1689R5 it is in a place
  where everyone is happy. Alas, my allocations did not align with
  faster progress here.
- 2022 Jun: experimental support for named modules lands in CMake 3.25.
  Community and toolchain implementers experiment with my GCC patches
  and report issues.
- 2023 Sep: my P1689R5 patches land in GCC
- 2023 Oct: CMake 3.28 releases with named imports as a non-experimental
  feature
- 2022 Nov: VS 17.4 releases with P1689 support
- 2023 Feb: clang-scan-deps learns to write P1689R5
- 2024 Apr: Support for clang/libc++ and MSVC/STL `import std;` lands in
  CMake `master`
- 2024 Jul: Experimental support for `import std;` in CMake 3.30.
- 2024 Nov: Support for GCC's `import std;` lands

We're now at a point where *projects* can experiment with modules
meaningfully (via CMake at least). I hope this drives finding issues
both with CMake (of which I'm aware of a number) and toolchains (of
which I'm sure there is some awareness of their existence, but
prioritizing them may be hard without user feedback).

I've also been working to help drive adoption in other build systems:

Bazel: experimental community-driven support (though Google needed some
       convincing to allow the community to experiment with it)
Meson: interest, but no progress AFAIK
Tup: *crickets*
xmake: done

Progress in others that I have not contacted directly about it:

autotools: didn't have a maintainer when I did the first round, but
           zackw has since picked it up…I should reach out
MSBuild: done (though its developers were present for P1689 discussions)

So as long as you're using CMake or xmake, go forth and test. Please
file issues too.

Thanks,

--Ben

Reply via email to