220 41230 <0727d34e-0bad-3689-e315-2136bb359e65@honermann.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tom Honermann <tom@honermann.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Modules and preambule, just why?
Date: Wed, 5 Dec 2018 23:04:59 -0500
Lines: 68
Approved: news@gmane.org
Message-ID: <0727d34e-0bad-3689-e315-2136bb359e65@honermann.net>
References: <e3f7a8a5-8e78-49f5-97df-139951f5d07a@isocpp.org>
 <CAOU91OPMe-0PU7zEfKKPSQNMwtaf8cw+q24XAes9pZTJqPGrcg@mail.gmail.com>
 <16989401-2f0d-4200-997e-0ac60b47bec3@isocpp.org>
 <CAOU91ONR5v9ujCaM5Riu5Dc39cejV4VcMEdieF3O6b_edy+Y7g@mail.gmail.com>
 <a8310d69-20cb-48ba-8a8e-c62c09d4cd94@isocpp.org>
 <CAFk2RUaoP3h62RX10FfFv3ttyt1he96KJ_R_m=M7UA8=bf0O3A@mail.gmail.com>
 <08290107-c63b-3ef6-09d4-16c7b6c495ab@honermann.net>
 <CAFk2RUax+i_chjCLEfb7HGitaOtdMSmSmoot4ZTybT_58=4VTQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1544068977 7649 195.159.176.226 (6 Dec 2018 04:02:57 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 6 Dec 2018 04:02:57 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
Cc: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
To: Ville Voutilainen <ville.voutilainen@gmail.com>
Original-X-From: std-proposals+bncBDBNXSHG6UDBB3F7ULQAKGQEOLR5B6I@isocpp.org Thu Dec 06 05:02:52 2018
Return-path: <std-proposals+bncBDBNXSHG6UDBB3F7ULQAKGQEOLR5B6I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk1-f197.google.com ([209.85.222.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDBNXSHG6UDBB3F7ULQAKGQEOLR5B6I@isocpp.org>)
	id 1gUksE-0001pG-9e
	for gclcip-std-proposals@m.gmane.org; Thu, 06 Dec 2018 05:02:50 +0100
Original-Received: by mail-qk1-f197.google.com with SMTP id 80sf22250843qkd.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Dec 2018 20:05:01 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1544069100; cv=pass;
        d=google.com; s=arc-20160816;
        b=gsopwI8Ml4VrTOX71jVq/pIrHvLLltmmnJ+mVJqU6UGXb31hFfKxYdhRj3P47LQjBd
         ullop0iIuvpZgHqFdNDfWLW8svHoDKM9rirHTL4tfcvDf40oe9AJtDfH8yb3zfRnDkzx
         5dDpE4NF+49Z0z2vLHwRO8TkuAPp5crupMLyohJaUd1WlfV8BWYBWV3lbdvRk23GrX6t
         tmnUTlq4CBc3l6b8KJk+ZhvaWieeZlpOnVXoifTGdQ47YCS0Vt0LWYTBBYZ8RHUhlo+Q
         6H31EEzGl4G0je0awZbwXYwQzOpVa29M94Jaf7UzVgAHzgKWHmpQkvjjcFmjatUsbapb
         aZ3w==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :content-transfer-encoding:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:cc:to:subject:dkim-signature;
        bh=3cTx2z4nt0cZissso0HUEAlYHVlzjFzgtRdwg+hRHuY=;
        b=BTKsc/wzk9jVfJpk+yOgHMu85tpiOHfsPrbqN5xw7QKc/GyeT79DDc7ZWw0xRZMNPW
         o2949o9y79q5bltFQFhaL7Ze1yGQFc+vccHYtW9Moeo6T5u+S6Y4HRvnWxJjK5oH8nhR
         +6MVDiTeOSC4C8PKukLg0H5rSode5MUgLh6/xfEBtgDT+WKNGsDQURLkh+4wr7hggLvK
         l6Gm5y93rM7jHntNskFxO4hvt0Bqtc5wZo0LTK/+xWfha+AXor2omi/OzjLy3ulIgpbj
         /pArtygi9wvaf9JJAhhcwduc2TSQQj6e6o2EvacVxQnrx05gxbXw3z/mm6zTdHf1XulE
         q0zw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=lDTF0KNa;
       spf=pass (google.com: domain of tom@honermann.net designates 146.20.161.115 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:cc:references:from:message-id:date:user-agent
         :mime-version:in-reply-to:content-transfer-encoding:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3cTx2z4nt0cZissso0HUEAlYHVlzjFzgtRdwg+hRHuY=;
        b=GHkbrqXwXpqLKHEPwWBI9FVAeDc9VNAtxvshNhjTWqkKvmF1ndKLYtgbfph7pS18gS
         buP6Dg3Rx4FuBaopLqCBLa++Mglag4FHp1d6YOnumIIbkSII1oTRt47Zpg+GXMvXdYws
         oQBkxBkqQogzoIGNBsfQdlE5ie9+Idqxxuyck0iJdwgayqKY26fjj3/TSqbGJENe4DDP
         P1C5pkkVFQK1o7pEdDj8L1jnYa4Mj+UJ/44fDn7OSRy4PMfrb6tIJReouNRJqMX05pxu
         OSN5FBODdw7LADVgrtxMGDkTDEtcB9mKA6/Z8XlxyU/ULccRDCO6M+AMe3LMoCkKGONu
          
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:cc:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-transfer-encoding
         :content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3cTx2z4nt0cZissso0HUEAlYHVlzjFzgtRdwg+hRHuY=;
        b=Z+0TRchzM4byy4rceYBTkfX50ftrs5og+ptyXoPxwDmFbFZifnsai6MAW65g+0F4KW
         ixZx9/yzj91g82sp9gNLKXyYplyPMZisC5UjGjhp2V8ZGUCtXgnVoo/4wB60KcL+voor
         VOxX9EYmWXsQyq5E06Xw47DvISP3N9wKKMGYkL1ST9k6fKTonNNvp8Dggaan5YcDWxrP
         dbEMocuapgEhwUhEuQemm0OawhgBGUFmyctqexHvt0ct5DeGdVGffx6mYnvD4a+OjWla
         SL7xY9n6p57nEBU3RJKW/QafBtVcl4peavveRek8 
X-Gm-Message-State: AA+aEWZpiBLxVJJ+bhKJ4f5F2mLipJ1O+TRCOcFuwMtgkkNX8BeflgMG
	Ttijm2GIL5oJ2KX417GaeLennQ==
X-Google-Smtp-Source: AFSGD/Xh9UQ7dP4EubCyirkcgCtNuPjgmC5kDvFsZxYbYchHonriZa+EUPiUX6oFXLOFRqoLnd7AFw==
X-Received: by 2002:a37:184b:: with SMTP id j72mr19553713qkh.23.1544069100763;
        Wed, 05 Dec 2018 20:05:00 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a37:65c9:: with SMTP id z192ls989431qkb.3.gmail; Wed, 05 Dec
 2018 20:04:59 -0800 (PST)
X-Received: by 2002:a37:d6ce:: with SMTP id p75mr24394055qkl.270.1544069099846;
        Wed, 05 Dec 2018 20:04:59 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1544069099; cv=none;
        d=google.com; s=arc-20160816;
        b=JSvLz3MtEoFnqavnD4AAXNXeTphTH4y9F9rSS8G/tu9fugjkQ6a4+BoaUCpFtT5zUG
         PRvcKisQsQ0gshY1GNpc/wpkVZlWLbOgP1Lljbp6scCmdb++J/ZVI8bpRLCpkvHIEjyJ
         m5VAB+lmPOZcO23B4uSPRxrvbj0AQVqlfpLtaafqIDFn4MDS0ifziH2doA13aNgKC7kt
         MA5IoRwzxj2PglV/Fo3YNipzW/Ut5SdioeBLCn6Y1WPEc48Vvo31UBvVLcVeCzsbYHHD
         2PQ8noCDcIDJIQ/bycuDfydm6OSLoqkoyE34aesXCnXRMWTDERMdguwZMGPKrkNu/cwC
         XZXg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:content-transfer-encoding:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:cc:to:subject
         :dkim-signature;
        bh=TAJdEDLkMXFM6JDYXI1U6hsa+g8pty7duWpuSRWpojk=;
        b=WZh1QCCWIGGA+kCQvGMMIxk+erBS4BxlRw0+tvujtlEAzhDSOhxFm0gyF0Y0oQM7OJ
         vdH759EwCVU81nM2fuRHGSpNWJrIEr1Fi/hKNvKFhRwW9E0MhvsizM5scOGflE6r+20j
         HlY8yRsmEKxb30f4CQ02gsFTr9iOyOwiqX6GUTctWR4F6++xO7ItqR6vO4NsoMLSddmL
         p7gXNAiCVnX4orG+NA34FOcHqeGfzI1UoMvM84EYaNi3/7udefRgkqSTILFNWB0ucrQx
         1gnoNqzlURMJUtBEhXCNVtAVBvqUqkRw+um6fFezUGrjVjvDluP0eXFGqkiSCDd+I6F2
         ITLA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@honermann.net header.s=20180930-2j89z3ji header.b=lDTF0KNa;
       spf=pass (google.com: domain of tom@honermann.net designates 146.20.161.115 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
Original-Received: from smtp115.iad3b.emailsrvr.com (smtp115.iad3b.emailsrvr.com. [146.20.161.115])
        by mx.google.com with ESMTPS id l90si1330228qte.331.2018.12.05.20.04.59
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 05 Dec 2018 20:04:59 -0800 (PST)
Received-SPF: pass (google.com: domain of tom@honermann.net designates 146.20.161.115 as permitted sender) client-ip=146.20.161.115;
Original-Received: from smtp23.relay.iad3b.emailsrvr.com (localhost [127.0.0.1])
	by smtp23.relay.iad3b.emailsrvr.com (SMTP Server) with ESMTP id 72336A06FA;
	Wed,  5 Dec 2018 23:04:59 -0500 (EST)
X-Auth-ID: tom@honermann.net
Original-Received: by smtp23.relay.iad3b.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 47D94A06DD;
	Wed,  5 Dec 2018 23:04:59 -0500 (EST)
X-Sender-Id: tom@honermann.net
Original-Received: from [192.168.1.19] (pool-71-176-235-158.rcmdva.fios.verizon.net [71.176.235.158])
	(using TLSv1.2 with cipher AES128-SHA)
	by 0.0.0.0:25 (trex/5.7.12);
	Wed, 05 Dec 2018 23:04:59 -0500
In-Reply-To: <CAFk2RUax+i_chjCLEfb7HGitaOtdMSmSmoot4ZTybT_58=4VTQ@mail.gmail.com>
Content-Language: en-US
X-Original-Sender: tom@honermann.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@honermann.net header.s=20180930-2j89z3ji header.b=lDTF0KNa;
       spf=pass (google.com: domain of tom@honermann.net designates
 146.20.161.115 as permitted sender) smtp.mailfrom=tom@honermann.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=honermann.net
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:41230
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41230>

On 12/5/18 5:04 PM, Ville Voutilainen wrote:
> On Wed, 5 Dec 2018 at 23:43, Tom Honermann <tom@honermann.net> wrote:
>> On 12/5/18 2:01 PM, Ville Voutilainen wrote:
>>> On Wed, 5 Dec 2018 at 20:47, <masse.nicolas@gmail.com> wrote:
>>>> After reading your answer and thinking about it in the last days, I th=
ing I understand things a bit better now.
>>>> First I understand that module are far less related to the linking pro=
blem than I first tough.
>>>> Also, I think I better understand how they will actually work in real =
world application.
>>>>
>>>> Still, one question remains for me:
>>>> If for example you wanna ship a library.
>>>> As of today, you generally with the library the headers so that people=
 using the library will be able to compile their code and make use of the l=
ibrary you made.
>>>> But how does it work if you wanna use modules? do you ship a module fi=
le together with the lib? And if so, how do you intend to generate this mod=
ule file?
>>> Yes, you ship the module interface with your lib. You compile the
>>> module for the target implementation you want to support.
>> To be clear, I believe Ville means that you ship the module interface
>> unit source code (not a binary module artifact as they are not portable)
>> and you link any object files produced by compiling the module interface
>> unit in your compiled library for your supported platforms.
>
> I think I mean that you have the choice of shipping 0-N module
> interface artifacts and/or the source code.

Hmm, Gaby has stated many times that .ifc files are not intended for=20
distribution.=C2=A0 Clang, from what I understand, is not promising=20
compatibility for module artifacts across major releases (which makes=20
compatibility across Xcode and LLVM Clang questionable). Gcc currently=20
ties the module artifact to the svn revision.=C2=A0 I am very much under th=
e=20
impression that shipping module artifacts (without the corresponding=20
module interface unit source) will not be a viable choice in practice=20
(at least, not for anyone other than compiler implementors).

> Good catch, though, Tom. However, I think the "you compile the module
> for the target implementation you
> want to support" is 60% correct. (Yeah, I pulled that 60% number out
> of my sleeve, it doesn't really mean anything).
> For the remaining 40% (the number is, again, completely artificial),
> you might want to ship something else, for example the source code.

I meant that, if you are shipping a pre-built library, then the portions=20
of the module interface unit that are not "interface" (e.g.,=20
non-template function definitions) probably need to be pre-compiled and=20
linked into the distributed library (which may have its own dependencies=20
on them) unless the expectation is that the recipient link objects=20
produced by compilation of module interface units into their respective=20
binaries (which seems to me a good recipe for ending up with duplicate=20
definition errors at link time).=C2=A0 I'm very curious to see how build=20
systems are going to end up managing this.

Tom.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/0727d34e-0bad-3689-e315-2136bb359e65%40honermann=
..net.

.
