From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:39359) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igbWd-0002HH-J6 for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igbWb-00025b-UB for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59565) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igbWb-00024h-PP for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igbWb-00018v-Me for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:01 -0500 Subject: [bug#38390] [core-updates] Scheme-only bootstrap: merge wip-bootstrap Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87tv6qoank.fsf@gnu.org> <87sgm4m9fu.fsf@gnu.org> <87v9r0arni.fsf@gnu.org> <87y2vqdjwz.fsf@gnu.org> <87y2viyb2a.fsf@gnu.org> Date: Sun, 15 Dec 2019 22:33:47 +0100 In-Reply-To: <87y2viyb2a.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 11 Dec 2019 19:25:01 +0100") Message-ID: <87o8w9s284.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Jan Nieuwenhuizen Cc: Timothy Sample , 38390@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Howdy! Jan Nieuwenhuizen skribis: >> We will be working on a rewrite of wip-bootstrap to have it use Gash >> wip-0.2.0+ and include a number of cleanups. > > I have just hard-reset wip-bootstrap for the next iteration! Yay! >> Here is my current TODO list >> >> * base bootstrap on Gash wip-0.20.0 (plus janneke's 2 patches) > > Done. I just built `hello', so Gash 0.2.0 here we come (afaic). > >> * remove %bootstrap-gash (with gash core utils) from bootstrap seed > > Done; thanks to Ludo's insights about %boostrap-guile+guild, we were > able to do this. The `gash-boot' and `gash-core-utils-boot' packages no > longer appear in shells.scm; they are built during bootstrap using the > guile-build-system. I currently add lalr.upstream as an extra origin > to gash core utils from > > "http://git.savannah.gnu.org/cgit/guile.git/plain/module/system/base/lalr= .upstream.scm?h=3Dv2.0.9" Awesome. BTW, I=E2=80=99d suggest this for clarity: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 9e3cecc174..d4cf58a7eb 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -266,6 +266,7 @@ ,(origin (method url-fetch) (uri (string-append "http://git.savannah.gnu.org/cgit/guile.git/plain/module/system/base/lalr.upstream.scm?h=v2.0.9")) + (file-name "lalr.upstream.scm") (sha256 (base32 "0h7gyjj8nr2qrgzwma146s7l22scp8bbcqzdy9wqf12bgyhbw7d5")))))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> * look at possibility/cost to avoid updating the mescc-tools and mes >> bootstrap binaries > > This proved possible (dare I say feasible?). What was needed is > > - allow mescc (0.21+) to work with old mescc-tools 0.5.2 > - add %bootstrap-mes-rewired, to remove MesCC from mes-0.19 and > enable it to run 0.21+ MesCC > > %bootstrap-mes-rewired uses this hack > > (add-after 'unpack 'patch-%moduledir > (lambda _ > (copy-file "module/mescc.scm" "module/mescc.scm.orig") > (substitute* "module/mescc.scm" > (("^ \\(mes-use-module \\(mescc mescc\\)" all) > (string-append " > ;; MesCC from mes-0.21 > (let* ((self (car (command-line))) > (prefix (dirname (dirname self)))) > (set! %moduledir (string-append prefix \"/mes/module/\")) > (setenv \"%numbered_arch\" \"true\")) > > ;; A fixed map, from mes-0.21 > (define (map f h . t) > (if (or (null? h) > (and (pair? t) (null? (car t))) > (and (pair? t) (pair? (cdr t)) (null? (cadr t)))) '() > (if (null? t) (cons (f (car h)) (map f (cdr h))) > (if (null? (cdr t)) > (cons (f (car h) (caar t)) (map f (cdr h) (cdar t))) > (if (null? (cddr t)) > (cons (f (car h) (caar t) (caadr t)) (map f (cdr h) (= cdar t) (cdadr t))) > (if (null? (cdddr t)) > (cons (f (car h) (caar t) (caadr t) (car (caddr t= ))) (map f (cdr h) (cdar t) (cdadr t) (cdr (caddr t)))) > (error 'unsupported (cons* 'map-5: f h t))) ))))) > " all))) > #t)) > > ...not particularly nice/clean/auditable; but "it works". WDYT? =E2=80=98caddr=E2=80=99, loooove it! ;-) It seems to me that mescc.scm in 0.21 only use the two-argument =E2=80=98ma= p=E2=80=99, no? In that case I guess we could go with a two-argument, fixed-arity version that would have fewer cdadrs caddrs and caadrs? Just sayin=E2=80= =99. :-) > On a related note, should mescc 0.21 include some kind of `hook' make > this kind of change easier to make? Good question! During the summit, Vagrant (I think?) asked whether Mes and MesCC should be separated. I think in this case it would have been beneficial to have them distributed separately, no? It might be worth looking at which parts change frequently to determine what to keep as part of the =E2=80=98mes=E2=80=99 package itself. Thoughts? >> * remove any generated (gitlab/github) tarballs > > Done (but please check!). LGTM! >> * look into awkward combined bash+gash dependency of glibc-mesboot0 > > Haven't addressed this. I quickly looked with Ludo at this, not really > into it though. WYDT? Hmm, dunno. I can take a look later. >> * add some %bootX-input stages, at least when reached gcc-mesboot1 > > Done. Numbering of bootX, mesbootX could possibly made to make more > sense. However, I also would like to get rid of the whole 2.95 story > some time soon and then many things change again. I could do with some > help/inspiration here. I think it=E2=80=99s good to have =E2=80=98%bootX-inputs=E2=80=99 for when = we=E2=80=99re going to reuse more or less the same input set several times, because it clarifies that there=E2=80=99s a =E2=80=9Cplateau=E2=80=9D of sorts, but I guess it=E2=80= =99s not always appropriate early on in the graph. Another thing we discussed was the growth of the dependency graph: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix graph -e '(@@ (gnu packages commencement) coreutils-f= inal)' | grep 'label =3D' | wc -l 177 $ guix graph -e '(@@ (gnu packages commencement) coreutils-final)' | grep '= label =3D' | wc -l 76 --8<---------------cut here---------------end--------------->8--- Clearly we=E2=80=99re adding way more nodes than we mean to. For example, you can remove the call to =E2=80=98package-with-bootstrap-gui= le=E2=80=99 for =E2=80=98bash-mesboot=E2=80=99 (down to 153 nodes) and the one for =E2=80=98gcc-core-mesboot1=E2=80=99 (down to 121) and the one for =E2=80=98= binutils-mesboot=E2=80=99 (down to 87), and I think at this point we=E2=80=99re done and the graph ha= s a lovely shape. :-) It makes a noticeable difference from a performance viewpoint (see .) Also, you can leave out calls to =E2=80=98bootstrap-origin=E2=80=99 for ori= gins without a snippet and without patches (it=E2=80=99s purely stylistic though.) > We are really getting there! I would like to do a rewrite once Gash > 0.2.0 is out. What to do about Gash Core Utils? I also plan to do a > rewrite once MES 0.22 is out. I think we should probably wait for the Gash and Gash Core Utils releases so we can refer to them directly. How does that sound to you, Timothy? Thanks! Ludo=E2=80=99. --=-=-=--