Subject: Re: References to unversioned source tarballs

From: Philip McGrath <[email-masked]>
Date: Fri, 30 Jul 2021 18:08:33 -0400

On 7/30/21 5:31 PM, Ludovic Courtès wrote:
> Philip McGrath <[email-masked]> skribis:
> 
>>>> +       (uri (string-append %pre-release-installers
>>>> +                           "racket-src.tgz"))))))
>>> Do I get it right that *-src.tgz are not versioned?  That they’re
>>> updated in place regularly?
>>> In that case, we cannot refer to them in a package definition since
>>> the
>>> hash is bound to become stale.
>>> What we could do is refer to, say,
>>> <https://pre-release.racket-lang.org/installers/racket-8.1.900.1-src.tgz>.
>>> However, I suspect this file would vanish fairly quickly from the web
>>> site, which is not okay either.
>>> I’m not sure what a good solution would be.  WDYT?
> 
> [...]
> 
>> For now, I will avoid the problem by just not dealing with "-next" variants.
> 
> I just realized that the problem already exists right now, with ‘racket’
> and ‘racket-minimal’ referring to ‘racket-src.tgz’.
> 
> I think we should fix it after this series, possibly by using
> ‘git-fetch’ instead.

I think it is actually ok, because the the URIs are formed by:
```
        (uri (map (lambda (base)
                    (string-append base version "/racket-src.tgz"))
                  %installer-mirrors))
```
so the version is present as a path element, just not in the file name, 
e.g. <https://mirror.racket-lang.org/installers/8.2/racket-src.tgz>. 
These are definitely stable URLs relied on by a variety of tools, e.g. 
for CI.

An equivalent tarball is also available at 
<https://mirror.racket-lang.org/installers/8.2/racket-8.2-src.tgz> (and 
likewise for the other mirrors), but most tools prefer the "versionless 
path" URLs so that code manipulating the downloaded artifacts doesn't 
have to deal with version numbers.

(Download sites like these are created by the "distro-build" Racket 
package and have a well-known structure, though the documentation is not 
all in one place. A good place to start would be 
<https://docs.racket-lang.org/racket-build-guide/distribute.html>, which 
is generated from the same Scribble source that generates "build.md" in 
the main Racket Git repository.)

-Philip