unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Crystal Bootstrapping Journey
@ 2021-06-21 16:33 jgart
  2021-06-21 19:40 ` Leo Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: jgart @ 2021-06-21 16:33 UTC (permalink / raw)
  To: guix-devel
  Cc: rprior, mail, Raghav Gururajan, Pjotr Prins, Bonface Munyoki K.,
	John Soo

Hi Guix,

We've (Ryan, David, Raghav, and others) started packaging crystal for guix: https://crystal-lang.org/

See 49142 and 49158 in the issue tracker.

Here are some notes, questions, and a list of dependencies regarding what is needed to finish a properly bootstraped crystal package:

https://github.com/ryanprior/guix-packages/blob/master/testing/crystal.org

We are trying to recreate this bootstrapping process:

https://github.com/crystal-lang/bootstrap-script

There are 160 stages!

A few questions extracted from the notes follow:

Is it preferable to have 160 bootstrap packages, one for each stage, or one big bootstrap package with 160 build-* stages, or somewhere inbetween?

Each stage needs a different checkout of the git repository - can we preserve info in .git such that we can checkout again during the build, or do we want to have each checkout be an independent input to the package?

How best can we use Guile macros to clean up the large amount of code implied by executing 160 stages of bootstrap logic?

best regards,

jgart

ps If you'd like to discuss more and help us in this effort reply here and/or come join us this Saturday for another guix packaging meetup:

https://events.nixnet.services/events/11610807-dd89-47e7-bd6c-64429e48e338


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Crystal Bootstrapping Journey
  2021-06-21 16:33 Crystal Bootstrapping Journey jgart
@ 2021-06-21 19:40 ` Leo Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Prikler @ 2021-06-21 19:40 UTC (permalink / raw)
  To: jgart, guix-devel; +Cc: Pjotr Prins, Bonface Munyoki K., Raghav Gururajan

Hi jgarte et al.

Am Montag, den 21.06.2021, 16:33 +0000 schrieb jgart:
> Hi Guix,
> 
> We've (Ryan, David, Raghav, and others) started packaging crystal for
> guix: https://crystal-lang.org/
> 
> See 49142 and 49158 in the issue tracker.
> 
> Here are some notes, questions, and a list of dependencies regarding
> what is needed to finish a properly bootstraped crystal package:
> 
> https://github.com/ryanprior/guix-packages/blob/master/testing/crystal.org
> 
> We are trying to recreate this bootstrapping process:
> 
> https://github.com/crystal-lang/bootstrap-script
> 
> There are 160 stages!
> 
> A few questions extracted from the notes follow:
> 
> Is it preferable to have 160 bootstrap packages, one for each stage,
> or one big bootstrap package with 160 build-* stages, or somewhere
> inbetween?
I second Maxime's reply on 49158.  159 hidden packages, plus a final
exported one.

> Each stage needs a different checkout of the git repository - can we
> preserve info in .git such that we can checkout again during the
> build, or do we want to have each checkout be an independent input to
> the package?
Given that we want 160 packages, maybe, but actually no.

> How best can we use Guile macros to clean up the large amount of code
> implied by executing 160 stages of bootstrap logic?
Note how many of the stages (particularly later ones) manage to
bootstrap one version from the previous.  You might therefore want to
make a "one-liner" package 
(define crystal-stage-N (bootstrap-crystal "version@N" crystal-stage-
{N-1}))
Then use Emacs macros to generate 160 lines ;P

It's not quite as simple, because the arguments to crystal change at
some point, but you could spawn off several "phases" from a relative
generic boostrap-crystal procedure.  E.g. the final phase would have
#:crystal-args '("build" "--stats" "-Dwithout_openssl" "-Dwithout_zlib" 
"-Di_know_what_im_doing")

Regards,
Leo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-21 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 16:33 Crystal Bootstrapping Journey jgart
2021-06-21 19:40 ` Leo Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).