public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Boris Kolpackov <boris@codesynthesis.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [00/32] C++ 20 Modules
Date: Thu, 5 Nov 2020 09:08:52 +0200	[thread overview]
Message-ID: <boris.20201105080932@codesynthesis.com> (raw)
In-Reply-To: <94392c65-0a81-17c3-c5d3-f15a5e91dd79@acm.org>

Nathan Sidwell <nathan@acm.org> writes:

> Here is the implementation of C++20 modules that I have been developing 
> on the devel/c++-modules branch over the last few years.

Congrats on reaching this point.


> It is not a complete implementation.  The major missing pieces are:
> 
> [...]

Building C++20 modules requires non-trivial integration between the
compiler and the build system. This patch set introduces a module
mapper, a novel mechanism for such integration. Has it been tried
by any non-toy build system and on any real project?

If the answer is "no", then by shipping modules in GCC 11 are we
making any likely changes in this area impossible or unnecessarily
difficult?

To give an example of such a likely change, currently the mapper
has a notion of the central module repository directory that is
used to resolve all the relative CMI (compiled module interface[1])
paths (even paths like ./foo.gcm). However, this model will not
apply to all build systems. For example, in build2 (the build
system I am involved with), there can be no such central place
since a project can pull dependencies that are built in other
places. Currently, the only way to disable this repository
semantics is to use absolute CMI paths throughout.

Also, FWIW, I've attempted such a build system integration with
build2 back in 2019. While the overall idea of the module mapper
worked well, I had to make substantial extensions in my own
branch[2] of Nathan's c++-modules (also described in this[3]
WG21 paper). AFAIK, these extensions haven't yet been considered
for merging into c++-modules.

[1] BTW, SG15 seems to have settled on the BMI (built module
    interface) term instead of CMI:

    https://github.com/cplusplus/modules-ecosystem-tr/blob/master/definitions.tex

[2] https://github.com/boris-kolpackov/gcc-cxx-modules-ex

    The branch used to live on gcc.gnu.org/git but was dropped as
    part of the svn-to-git migration.

[3] https://wg21.link/P1842

  parent reply	other threads:[~2020-11-05  7:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 21:12 Nathan Sidwell
2020-11-04  3:14 ` Hans-Peter Nilsson
2020-11-04 12:30   ` Nathan Sidwell
2020-11-04 13:50     ` Nathan Sidwell
2020-11-04 14:15       ` Jason Merrill
2020-11-04 15:06         ` Nathan Sidwell
2020-11-04 19:24 ` [10/32] config Nathan Sidwell
2020-11-06 17:56   ` Jeff Law
2020-11-06 18:47     ` Nathan Sidwell
2020-11-05  7:08 ` Boris Kolpackov [this message]
2020-11-05 17:17   ` [00/32] C++ 20 Modules Nathan Sidwell
2020-11-06 14:26     ` Boris Kolpackov
2020-11-05 13:33 ` Richard Biener
2020-11-05 15:25   ` Nathan Sidwell
2020-11-05 18:45     ` Richard Biener
2020-11-05 14:30 ` David Malcolm
2020-11-13 21:55 ` Mike Stump
2020-11-16  8:50 ` Boris Kolpackov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=boris.20201105080932@codesynthesis.com \
    --to=boris@codesynthesis.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).