From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Project out of sources compilation Date: Wed, 03 Apr 2024 18:00:28 +0300 Message-ID: References: <4wwljrdnra3bsloehioa46y24ozxajajmvf2elvskxxq3mhtg2.ref@pyv2z5snot6h> <4wwljrdnra3bsloehioa46y24ozxajajmvf2elvskxxq3mhtg2@pyv2z5snot6h> <87ttl5w0mr.fsf@gmail.com> <1fd527fc-9643-49d2-8fae-d7e7fd043fe1@gutov.dev> <21f05c6124d1281dcec22404d788330abe1e55c0.camel@yandex.ru> <86v84y8yaj.fsf@gnu.org> <122ab8a44f7c4eacd480975246d66ef3a1060d38.camel@yandex.ru> <86sf028rjo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28437"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.52.0 Cc: rms@gnu.org, spacibba@aol.com, dmitry@gutov.dev, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 03 17:01:52 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 1rs27b-0007CM-R5 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Apr 2024 17:01:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs26Z-0006oH-Lu; Wed, 03 Apr 2024 11:00:47 -0400 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 1rs26X-0006o8-J6 for emacs-devel@gnu.org; Wed, 03 Apr 2024 11:00:45 -0400 Original-Received: from forward502b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d502]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rs26R-0007gS-81; Wed, 03 Apr 2024 11:00:43 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7baf:0:640:11a3:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id 5BF775F16F; Wed, 3 Apr 2024 18:00:29 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id S0VYOYsMm0U0-pfzD6rN4; Wed, 03 Apr 2024 18:00:28 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1712156428; bh=eKz3/EZ+IObIVxXZd5gqsZkrynKL0dcXxZbeoJ3PUdU=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=AE2ZQynr2LMHhu1hESJq+PDXqXwvT+UbA2t3e17JLqzT3mb+3Crwe/FRuyWLg3WrV ZhXZKg+jaJ7tTDYf4awDrKfruLqATWt2ITptjLGrX7HIGt45LtSk38MR1nZQPdMaqE C+OhkS5m4b0IV2UIdArdZx4YIC0YuPctIl32PgLo= Authentication-Results: mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: <86sf028rjo.fsf@gnu.org> Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:d502; envelope-from=Hi-Angel@yandex.ru; helo=forward502b.mail.yandex.net X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:317490 Archived-At: On Wed, 2024-04-03 at 17:11 +0300, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Cc: rms@gnu.org, spacibba@aol.com, dmitry@gutov.dev, > > emacs-devel@gnu.org > > Date: Wed, 03 Apr 2024 16:31:30 +0300 > >=20 > > On Wed, 2024-04-03 at 14:45 +0300, Eli Zaretskii wrote: > > > > From: Konstantin Kharlamov > > > > Cc: dmitry@gutov.dev, emacs-devel@gnu.org > > > > Date: Wed, 03 Apr 2024 13:40:59 +0300 > > > >=20 > > > > 1: Emacs does not fully support it though, because while object > > > > files > > > > and configs do end up inside `build`, however `*.elc` files are > > > > still > > > > scattered all over the repo. But I hope you get the idea. > > >=20 > > > The *.elc files are considered part of the source tree (they are > > > in > > > the release tarball, and are portable, so no need to rebuild them > > > when > > > changing some configuration options).=C2=A0=C2=A0 > >=20 > > They are generated during compilation and are not commited into > > git.=20 > > That makes them build artifacts. >=20 > How is this relevant to whether or not Emacs supports out of tree > builds?=C2=A0 Directly: the point of "out of tree build" is encapsulating build artifacts in the build dir. I'm pointing out that Emacs has build artifacts being put outside build dir, hence the "out of tree build"=20 workflow is not working as expected. > Building from Git is a special kind of activity; it has its > own INSTALL file and _must_ build some of the files in the source > tree.=C2=A0 Are you aware of many projects whose build from Git can be > done > without first populating the source tree with some files? Most existing active projects =F0=9F=98=8A Most that were using autotools/= make has migrated to Meson. That includes active freedesktop projects (Mesa, Xorg, libinput, Pulseaudio, etc), Gnome projects, i3wm, Compton after it became Picom, all active Enlightenment projects=E2=80=A6 The list goes on and on. Meson drastically reduces maintainance burden but it's a separate story. What matters is that Meson by design works with out of tree builds. It is possible to hack in generating files in the tree, but it's frowned upon for many reasons. Then you have CMake projects, which I think has always supported out of tree build without creating any config files whatsoever outside? Offhand that includes all KDE projects. Lastly, you have autotools projects where `configure` file is not generated =F0=9F=98=8A `fio` is one example (although admittedly I didn't t= est out of tree build in there, but clearly if you have `configure` as part of the codebase, then you don't have to generate it in the tree). > =C2=A0 Heck, you > don't even have the configure script when you clone the repository, > and out-of-tree build works by invoking the configure script from a > directory _other_ than the one where the script lives.=C2=A0 Right? Good point. That's yet another reason "out of tree build" workflow isn't fully supported. I just didn't think about it because didn't have problems with that, but you are correct here. > > The fact they're distributed in release tarballs does not make it > > less true.=C2=A0 Distributing them in tarballs is not strictly > > necessary, > > exactly because they can be generated by anyone. >=20 > Not true. Well, admittedly I didn't try building from release tarball. But if it lacks some code to re-create `.elc` files, that's a bug. I can explain why if you're interested. > > Having .elc files in the source tree results in problems when a > > user > > created a dir `build-feature1` for one feature branch, and a dir > > `build-feature2` for another; and then `build-feature1` somehow > > ends up > > having "feature2".=C2=A0 Which is because it's using build artifacts > > that > > are outside `build-feature1`. >=20 > Again, not relevant to the aspect on which I commented. Fair enough. I was just pointing out why "out of tree builds" should work the way they don't in Emacs right now. But yeah, if you already understand that, I guess my explanation on that is unnecessary. > > Thus, Emacs certainly does not fully support "out of tree" builds. >=20 > It does.=C2=A0 You are just talking about a very different kind of "out o= f > tree build". Well=E2=80=A6 There does not exist strict definition for "out of tree build= " that I can point you to, so that risks becoming a philosophical debate. To understand what that means you need to understand what it solves.=20 Which you seem to understand already per the previous paragraph, so I can only add that "partial out of tree build" still has problems that "full out of tree build" solves. So there is only one kind of "out of tree build", the "full" one. The "partial" one should be explicitly specified as being only partial, whereas saying "out of tree build" without any prefix implies it is a "full" one. I hope now you understand why I'm saying Emacs doesn't fully support it =F0=9F=98=8A