GNU bug report logs -
#49158
Add ruby-for-crystal.
Previous Next
Reported by: "jgart" <jgart <at> dismail.de>
Date: Mon, 21 Jun 2021 16:20:02 UTC
Severity: normal
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49158 in the body.
You can then email your comments to 49158 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49158
; Package
guix-patches
.
(Mon, 21 Jun 2021 16:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"jgart" <jgart <at> dismail.de>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 21 Jun 2021 16:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Guix,
We've (Ryan, David, Raghav, and others) started packaging crystal for guix: https://crystal-lang.org/
This patch adds an old version of ruby that is required by the crystal language bootstrap process. This is related to 49142.
This was an effort of the volunteers at the last guix packaging meetup hosted by LibreMiami.
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 in guix:
https://github.com/crystal-lang/bootstrap-script
There are 160 stages!
Some questions extracted from our 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
[0001-gnu-Add-ruby-for-crystal.patch (application/octet-stream, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49158
; Package
guix-patches
.
(Mon, 21 Jun 2021 18:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49158 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
jgart via Guix-patches via schreef op ma 21-06-2021 om 16:19 [+0000]:
> Hi Guix,
>
> We've (Ryan, David, Raghav, and others) started packaging crystal for guix: https://crystal-lang.org/
>
> This patch adds an old version of ruby that is required by the crystal language bootstrap process. This is related to 49142.
>
> This was an effort of the volunteers at the last guix packaging meetup hosted by LibreMiami.
>
> 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 in guix:
>
> https://github.com/crystal-lang/bootstrap-script
>
> There are 160 stages!
>
> Some questions extracted from our 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?
Definitely 160 separate bootstrap packages I'd say.
Though the first 159 wouldn't be exported and would be hidden.
Because:
(1) presumably, building all these different versions of crystal
would take a lot of time
(2) if the build process OOMS, if there is a build failure at some
stage, the user cancelled the build, and retried,
then ideally Guix wouldn't start rebuilding the previous stages
(3) so, 160 separate packages.
> How best can we use Guile macros to clean up the large amount of code implied by executing 160 stages of bootstrap logic?
There doesn't seem to be much reason to use
macro's here (except 'package' & 'define' itself)
Basically, you'd do something similar to what's already done
for Rust:
(define* (crystal-bootstrapped-package base-crystal version checksum commit)
"Bootstrap crystal VERSION with source checksum CHECKSUM and git commit COMMIT
using BASE-CRYSTAL"
(package
(inherit base-crystal)
(version version)
(source
(origin
(inherit (package-source base-crystal))
(commit commit)
(sha256 (base32 checksum))))))
To start the process,
define an initial version crystal-stage1 like you'd do for any other package.
Then, for each N+1, define
(define crystal-N+1 (crystal-bootstrapped-package crystal-N VERSION CHECKSUM COMMIT))
Some crystals probably need somewhat different inputs, or require some fudging
in phases, so you might to occasionally modify the resulting package a little:
(define crystal-N+1
(package
(inherit crystal-N)
(inputs `(("stuff" ,libstuff)
,@(package-inputs crystal-N)))
And export the final version:
;; Don't forget to remove the 'hiddenness' from crystal-160!
(define-export crystal crystal-160)
> 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,
The .git directory isn't bit-for-bit reproducible
(think different versions of git, different versions of compression
libraries, different parallelism levels, etc. causing a slightly
different pack), so no.
Also, falling back to Software Heritage wouldn't work.
> or do we want to have each checkout be an
> independent input to the package?
If you'll be using the 'crystal-bootstrapped-package' from above,
then you'll automatically get independent inputs.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Wed, 28 Sep 2022 18:37:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"jgart" <jgart <at> dismail.de>
:
bug acknowledged by developer.
(Wed, 28 Sep 2022 18:37:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 49158-done <at> debbugs.gnu.org (full text, mbox):
Hello,
"jgart" <jgart <at> dismail.de> writes:
> Hi Guix,
>
> We've (Ryan, David, Raghav, and others) started packaging crystal for guix: https://crystal-lang.org/
>
> This patch adds an old version of ruby that is required by the crystal
> language bootstrap process. This is related to 49142.
Since the crystal-lang patches haven't landed in more than a year,
I think it's safer to punt on this.
Closing.
Thanks!
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49158
; Package
guix-patches
.
(Wed, 28 Sep 2022 20:37:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 49158-done <at> debbugs.gnu.org (full text, mbox):
On Wed, 28 Sep 2022 14:36:12 -0400 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
> Since the crystal-lang patches haven't landed in more than a year,
> I think it's safer to punt on this.
makes sense!
...for now ;)
thnx for closing
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 27 Oct 2022 11:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.