r/cpp • soup • Mar 10 '26

Dynamic Modules

https://mwasplund.github.io/blog/2026/03/09/dynamic-modules
8 Upvotes

23 comments sorted by

View all comments

Show parent comment

1

u/mwasplund soup Mar 10 '26

Header includes have always been fine to discover at compile time (for soup it is listening to the file system access calls to track these optional dependencies). This was historically only required to ensure we capture the full closure of inputs for incremental build validation. Now that we need to detect the dependencies BEFORE building we need this extra scanner layer. You are probably correct that any compiler that supports modules will most likely support the scanner standard. It does feel antithetical to what the std committee usually does since they usually do not dictate file structures and compiler functionality.

5

u/not_a_novel_account cmake dev Mar 10 '26

for soup it is listening to the file system access calls to track these optional dependencies

Like tup, a great tradition in build systems. A lot of people admire this approach.

It does feel antithetical to what the std committee usually does since they usually do not dictate file structures and compiler functionality.

This stuff is going to get standardized eventually, the ball is rolling that way, either inside ISO or outside of it. Modules broke the camel's back on pretending the committee can continue to evolve the language while ignoring the tooling space.

1

u/mwasplund soup Mar 11 '26

Yes, like tup and BuildXL. Good to hear this is something we can safely rely on.