From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Xiyue Deng Newsgroups: gmane.emacs.devel Subject: Re: Merging MPS a.k.a. scratch/igc, yet again Date: Wed, 11 Dec 2024 20:37:54 -0800 Message-ID: <871pydo6sd.fsf@debian-hx90.lan> References: <871pyijctd.fsf@protonmail.com> <8634iyf257.fsf@gnu.org> <8634iwex8q.fsf@gnu.org> <87plm0msrq.fsf@telefonica.net> <87zfl4npcd.fsf@debian-hx90.lan> <87ldwnn0ny.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24599"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.38.3 (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Pip Cet , =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 12 05:38:48 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tLayN-0006In-Pa for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Dec 2024 05:38:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLaxg-0001OK-Iy; Wed, 11 Dec 2024 23:38:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLaxe-0001OA-VB for emacs-devel@gnu.org; Wed, 11 Dec 2024 23:38:03 -0500 Original-Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLaxd-0006PH-5I for emacs-devel@gnu.org; Wed, 11 Dec 2024 23:38:02 -0500 Original-Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-725dc290c00so1157346b3a.0 for ; Wed, 11 Dec 2024 20:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733978278; x=1734583078; darn=gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/7nPJ4rYLoVNLDJBGZjwH/aSA18ql7Y0AKhSWSvUcLM=; b=aEtoE0AcW19FlD5Aa5nmvW8/VbYjUhX3x8vZADWgRg8e5YXb2c1baG+QG3hGau7pnr aQ5CLvlYHnp1IHmpO2Z9r6+S1YA2syGOdNFUtkBYrRI/QXEdbhtYAr4yoscU3eq6UwnG O13243kCvmSK8vJgjK/N0YCD3RdjHQUPqNzocuniovSVqtfg0WrEdgAWaRaWrwUwxWc3 ttqKdyZneebKIgZ3wE1/B4T7Vrhq5KDE9SfA/y57bnitsB0p1pkZg4jIa82xP2JpGyCJ lGlTr1mDcZWi46l8tIQ+Fno60I6BtoIan6F/758HGW4fN8NIkezshu4FM4RrkXyxxBnB 41AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733978278; x=1734583078; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/7nPJ4rYLoVNLDJBGZjwH/aSA18ql7Y0AKhSWSvUcLM=; b=bGVzaRGTDa4Nki+RyiKca49mJY+Vctyd6/GuEGHXXcqsfYZPraOtsjpm8PEOr1M/Vw 6fJKXmucu+iuzzmopygw0fENBiag2spCmVepisb8KiLvZsE1QtOKtckFFq5ap+STouC+ ViZ4jAdbj+0p88InwbQDFY7I9epVoijCLPoShkbLsfaRZN1hnuIrlm+3R04dZ8XMGgus 5pdJ7x3SSIWQDsMnfMjJ3W6UZxO9S5gIDwyvQEa3JYvtxSvOzwcyPNTu5Hoe9kaSqUl4 cDiMMzKJkixeI2s1NRX4NiA8opf1YTJir1bf4YS53RleGd0e47mZSDNfJK5BABgMf6MF JJbA== X-Gm-Message-State: AOJu0YzfRdutb8cIS6J81ORS8iQAkp/62PD/wvR4Jmi0YlLsMAOoIa9N JMuegYfL+w0XChQnpT9zbffhwzZ7y91WHLD+4gHLGAklMkInl/Xs9N1v841PtNw= X-Gm-Gg: ASbGnctC4S2wcFFACKOAyamMU9St0kmC78ekpEDpRKWJqPxdKq4KZFP2QgP1WJKF3k6 swPrzXg6rbYmDCS/jA5tVoAog9qYte/lruPM+vZzrL5Zib1PIvwiN2Q8M88aeEC8IUZXBR0zS7A Nga3eGEDqzI5+ZbUHYb+R2IBU/Uw6av3+yQWt6Y9uh4+WHQGq2+gq3K6cMO0mep1IEY73s8w5lp wGFXCsX1H7iq+wGfCFfaJtdKqzOxO4mbD/iyehhLqCe3OdHzgDIUMCua9ImQAo1V0KtslbqLW/7 qFR656PW5kgPYVI= X-Google-Smtp-Source: AGHT+IHcHZ5L8l4tultI0MCLz3D1HDHny/eRx1RucsDUfmsJwVglCYgwhDBWxIZ7dzoUyE3wcolBzQ== X-Received: by 2002:a05:6a20:3948:b0:1e1:b023:6c89 with SMTP id adf61e73a8af0-1e1ceb215e2mr2221329637.15.1733978277784; Wed, 11 Dec 2024 20:37:57 -0800 (PST) Original-Received: from debian-hx90 (syn-076-094-249-045.res.spectrum.com. [76.94.249.45]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd41ff5eaasm6139441a12.8.2024.12.11.20.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 20:37:57 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=manphiz@gmail.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326393 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Pip Cet via "Emacs development discussions." writes: > On Tuesday, December 10th, 2024 at 13:10, =C3=93scar Fuentes wrote: >> Xiyue Deng manphiz@gmail.com writes: >> * It is very likely that we end doing some patching to the MPS sources >> to adapt to our specific needs (if those patches end upstream or not, >> that's another question.) > > If that ends up being the case, we'll have to make sure not to use shared= libraries which may contain the upstream code. But that's true of all libr= aries; in the particular case of a Debian package, both the APT versioning = schemes and ELF versioning are available for that. > I think it's possible to package a specifically customized variant of MPS for use of Emacs, which can specify compiler options or even carry patches specifically for use of Emacs. It would be good to be able to work with vanilla MPS to avoid this extra maintenance burden, of course. >> * MPS does a performance-critical job. Using it as a shared object might >> incur in a performance penalty. Having it in source form alongside the >> Emacs sources will result in opportunities for optimizations (LTO, >> PGO, ...) that may bring better performance. > > ...and more problems. MPS has made the decision not to work with gcc -O3,= only with -O2 or less, and LTO in particular is something MPS cannot relia= bly support, IIUC. > >> * MPS does a correctness-critical job. Depending on multiple external >> sources for such core component is a recipe for problems (future >> changes by the MPS maintainers, patching by packagers, buggy >> compilers, etc.) We need to keep a close watch on what MPS incarnation >> we use. Better yet, total control. > > I think the correctness argument goes both ways: shared linking means bug= s may be fixed for you automatically, as is routinely the case with libc. > >> For those reasons, incorporating MPS into the Emacs sources is the right >> thing to do. > > I don't think that's an option, because Emacs should remain capable of sw= itching to GPLv4 if and when that is released, and we don't know whether th= e MPS license is compatible with such a future document. > > So it's either static or dynamic linking; static links have these disadva= ntages: > > * shared libraries on GNU/Linux have versioning, static libs don't, AFAIK > * legally, statically-linked binaries are quite different from dynamicall= y-linked ones > * someone might enable LTO and break MPS (this may be done automatically = by the compiler rather than a user error) > * with dynamic linking, there is some hope we could switch from libmps.so= to libmps-debug.so without having to recompile Emacs, which would help us = diagnose crashes in their actual environment > Thanks for the summary! I would hope using dynamic linking would not be a deal breaker, and the advantages vs a static lib you listed are good from distribution point of view. > Pip > =2D-=20 Regards, Xiyue Deng --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJGBAEBCgAwFiEEiKQfd6o81mjI+LWALell7WOCXJMFAmdaaKISHG1hbnBoaXpA Z21haWwuY29tAAoJEC3pZe1jglyTD74P/As6eARaC8XzYBUbqotg+dDk0P30B4D3 a+onf/UfdAabCFZWHk+IhJ8aslj73rDsogEdI8HozFmcSbIYRW0MOwndWMg0FpHe l5fNNYL8KEpyEnrbDPOb4NXcSWt4wgXgdo+6GNp5aM6VRCovdjQDWboaJ4m7vgJH gMiug3gIT8wmWL9PZxWfHGmopXb8MpaLgmsrthaJM+vwq/1yeq3A5mvFSFjNv+u6 tKrmodm5Pj4IqsX0ErXiWpzoq3439YBy2zCCajc7/yrZf1uegBywvPadP9Tb/A1J fOBJzbf66gjdaCx4tjYloYxO5wweGNR8XGYuKOP/ZivheCaJihDOwqJaf5mw1Ak+ Ppd/5ZNnD2uSJXJKudrj0PQ3NKmcNAKPCdjTVi+39tSb6f6TEYnZ2bkcLN0ICb/q ATO5YdgjlqaELmVYm7tKDPPSX8oHZ5y9ziklBgUCHf/dxDaPviTfCnlpd7q2jirt jrePQJAwqNg6v7a/Wd4LxkA/WDN8J7oESwSQXKUpGR3bYDjvXounzS6szDWEGZ+6 NrGfhYWbovSNiuDYF0MzOw4A+goKvx4x4ASJ0PilurRZR56wKlRWBcJdXzx5HwcY YQD6mxO9FzOu9BEcsh+H92wpNBcQOCyh2Lc6sT3E29+cv159IcSoRNKD0GOkI0bT Dm0Xj3wJjGo7 =N9JG -----END PGP SIGNATURE----- --=-=-=--