Subject: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.)

From: Simon Tournier <[email-masked]>
Date: Thu, 20 Feb 2025 12:02:16 +0100

Hi Alexis,

On Tue, 18 Feb 2025 at 23:30, Alexis Praga via Guix-patches via <[email-masked]> wrote:

>                              I've tried to follow the nix install
> process. Here are some (incomplete) notes.

Thanks!  It helps.

> 5. A local registry is created. Somewhere, the following code is run

On Monday, I thought about something like that.  However, I’m note sure
that one package can write to another outputs than its own.  Something
to check…

My idea was to create a “local” registry per package containing all the
requirements.  Relying heavily on symbolic links, as profile does.

Today, it works that way:

--8<---------------cut here---------------start------------->8---
$ tree -L 2 $(guix build julia-zygote)/share/julia
/gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia
├── compiled
│   └── v1.8
├── loadpath
│   └── Zygote
└── packages
    └── Zygote
--8<---------------cut here---------------end--------------->8---

where julia-zygote contains this definition:

    (propagated-inputs
     (list julia-abstractffts
           julia-chainrules
           julia-chainrulescore
           julia-diffrules
           julia-fillarrays
           julia-forwarddiff
           julia-irtools
           julia-logexpfunctions
           julia-macrotools
           julia-nanmath
           julia-requires
           julia-specialfunctions
           julia-zygoterules))

In other words, when running the ’check’ phase, we setup the LOAD_PATH
and DEPOT_PATH via the environment variable JULIA_{LOAD,DEPOT}_PATH.

However, stuff changed with v1.9 as explained here [1].  Maybe I’m
missing something with all that.  My current understanding: tweaking
these environment variables will not be enough.

Now, let enter inside “guix shell julia-zygote”:

--8<---------------cut here---------------start------------->8---
$ tree -L 2 $GUIX_ENVIRONMENT/share/julia
/gnu/store/asis32i2wf3jr9854nh1yxjf6fsipk62-profile/share/julia
├── compiled
│   └── v1.8
├── loadpath
│   ├── AbstractFFTs -> /gnu/store/hlnlr2xkd06mrcg72v7ilynqv36z9xqi-julia-abstractffts-1.0.1/share/julia/loadpath/AbstractFFTs
│   ├── Aqua -> /gnu/store/jb4vzsn12nbfqyr8inhz2a570fv56x4i-julia-aqua-0.5.5/share/julia/loadpath/Aqua
│   ├── Calculus -> /gnu/store/k2ghzcx087sssllkk1b3c8xxjwbr3n43-julia-calculus-0.5.1/share/julia/loadpath/Calculus
│   ├── ChainRules -> /gnu/store/sj99c9z4siq87qhmix0xr5yyzkcphg80-julia-chainrules-1.35.0/share/julia/loadpath/ChainRules
│   ├── ChainRulesCore -> /gnu/store/h09v7lvgahl7rx95aj0rz92hc34xpmpn-julia-chainrulescore-1.12.2/share/julia/loadpath/ChainRulesCore

[...]

│   ├── StaticArrays -> /gnu/store/xn3jfkssqa0lggnrr3qkaicvawyn4wda-julia-staticarrays-1.2.13/share/julia/loadpath/StaticArrays
│   ├── Zygote -> /gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia/loadpath/Zygote
│   └── ZygoteRules -> /gnu/store/ska4a8nxxl9qmv1hgb4ah5147lngq588-julia-zygoterules-0.2.2/share/julia/loadpath/ZygoteRules
└── packages
    ├── AbstractFFTs -> /gnu/store/hlnlr2xkd06mrcg72v7ilynqv36z9xqi-julia-abstractffts-1.0.1/share/julia/packages/AbstractFFTs
    ├── Aqua -> /gnu/store/jb4vzsn12nbfqyr8inhz2a570fv56x4i-julia-aqua-0.5.5/share/julia/packages/Aqua
    ├── Calculus -> /gnu/store/k2ghzcx087sssllkk1b3c8xxjwbr3n43-julia-calculus-0.5.1/share/julia/packages/Calculus
    ├── ChainRules -> /gnu/store/sj99c9z4siq87qhmix0xr5yyzkcphg80-julia-chainrules-1.35.0/share/julia/packages/ChainRules
    ├── ChainRulesCore -> /gnu/store/h09v7lvgahl7rx95aj0rz92hc34xpmpn-julia-chainrulescore-1.12.2/share/julia/packages/ChainRulesCore

[...]

    ├── StaticArrays -> /gnu/store/xn3jfkssqa0lggnrr3qkaicvawyn4wda-julia-staticarrays-1.2.13/share/julia/packages/StaticArrays
    ├── Zygote -> /gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia/packages/Zygote
    └── ZygoteRules -> /gnu/store/ska4a8nxxl9qmv1hgb4ah5147lngq588-julia-zygoterules-0.2.2/share/julia/packages/ZygoteRules

65 directories, 0 files
--8<---------------cut here---------------end--------------->8---

My idea is to do the same at least for the ’check’ phase,

Thanks again for trying with Nix.  It helps!  I’ll read again all these
details, food for creativity. ;-)

Cheers,
simon

1: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3.
Simon Tournier <[email-masked]>
Mon, 13 Jan 2025 19:31:16 +0100
id:[email-masked]
https://issues.guix.gnu.org/73197
https://issues.guix.gnu.org/msgid/[email-masked]
https://yhetil.org/guix/[email-masked]