From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXklN-0005cY-Px for guix-patches@gnu.org; Fri, 14 Dec 2018 05:32:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXklJ-0008FK-2x for guix-patches@gnu.org; Fri, 14 Dec 2018 05:32:09 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:43098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXklG-0008Bj-Js for guix-patches@gnu.org; Fri, 14 Dec 2018 05:32:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gXklG-00008M-D4 for guix-patches@gnu.org; Fri, 14 Dec 2018 05:32:02 -0500 Subject: [bug#33598] Optimizations for emacs-clang-format and emacs-clang-rename Resent-Message-ID: References: <871s6l9h54.fsf@gnu.org> <87r2ekea1u.fsf@ambrevar.xyz> <04daca2a-705d-6255-85bd-48132879f5a8@yahoo.de> From: Pierre Neidhardt In-reply-to: <04daca2a-705d-6255-85bd-48132879f5a8@yahoo.de> Date: Fri, 14 Dec 2018 11:31:44 +0100 Message-ID: <87lg4se6wf.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Tim Gesthuizen Cc: 33598@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > 2. Efficiency: I am not quite sure about this - maybe I am just wrong: > As far as I understand it at first guix builds a source derivation > and then the actual package derivation. Even when the source > derivation is not stored in the store it can be substituted. If this > is the case we can save some bandwith / disk space / build time by > moving the file stripping to the source snippet. On my machine the > most time during the build process is spend unpacking the clang > source. I am not sure sure about this. Ludovic, do we have such a thing as "source substitutes"? > I also thought about this but could not find another situation where > this was applicable. Look for "emacs-build-system" in files other than emacs.scm. It's used in = quite a few places. > In which module should such a function go? Hmmm, I guess either guix/build/emacs-utils.scm, or gnu/packages/emacs.scm. > What would definitely be nice is that such a function can encapsulate > the emacs stuff so that we do not need any other emacs related modules > imported in (gnu packages llvm) for example. What emacs stuff? You mean the build system? > Yes. Maybe we should add some reasoning to the commit message then? > Depends on whether we just want a description of the changes in a commit > message or also some reasoning if things might be unclear. Well, the reasoning above is mostly a nit. What matters most is =2D Efficiency, if it really works. =2D The abstraction function. > Without seeing the function definition it is really hard to figure out > why it needs the arguments it needs and what their purposes are. > Maybe we want to make the arguments keyword arguments if it becomes more > generic so its usage is more intuitive. Sure, that's the very purpose of keyword arguments, make code readable. If= it reads like an English sentence, it's a win! > The first two patches are debatable though. If there is a particular > reason against them (unnecessary changing without benefits included) we > might want to not merge them. Even if the efficiency point is moot, the abstraction is more than welcome:= try it on at least one more package, then it will save lots of package code. I= 'm all for it! :) =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlwThpEACgkQm9z0l6S7 zH+LCgf/XncnSOftZh+Kke6x3KeOrC9oMPb44MfDxgQ+iHpr/GKkLGLnbnBkj4VX lUN3bgs06n7iKU9uJFdsQaPv02KtdZEbpZxia7IPTFIYz/trA06AZLjnd4V61Tub KJ79+TKx83L/iM6wwEQcgBetd0fZzY+3q6kiWvThGVpvLWRzkTjffl+APx+sF2ei HeTqPPtFHeFBKJNfEBbOb7PqMzoBZ3zWoVI2TyPAEDkw/SgXjTzuUAa5fn50r6AH PCo4mSrKR8eHzAU4IHNjA7Gx9nodOW48CDOML2ElMGyx9Z4dynWIAfMTOjA/jL5M z2SGZSM2SyOABjXOjDHlR9xlPaGdgg== =hVp1 -----END PGP SIGNATURE----- --=-=-=--