On Fri, Jun 5, 2026 at 11:38 AM Andres Freund <[email protected]> wrote:
> In 93d97349461347d952e8cebdf62f5aa84b4bd20a, I kinda had implemented such
> caching for macos.  There I used
>   PERL5LIB: ${HOME}/perl5/lib/perl5
>
> to put the cache somewhere under our control.  Any reason to not do that?

As a Perl novice, I was worried about setting that. The Windows
runners have multiple installations of Perl and I don't want them to
ever collide (similar to my PYTHONHOME concern in the other thread).
Is that a reasonable fear?

> > -      - name: Install dependencies
> > +      # Rebuild the CPAN cache whenever `perl -V` changes.
> > +      - name: Compute Perl version cache key
> > +        id: perlkey
> > +        shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail "{0}"'
> > +        run: |
> > +          perl_hash=$(/c/Strawberry/perl/bin/perl -V | md5sum | cut -f1 -d 
> > ' ')
> > +          echo "key=perl${perl_hash}" >> "$GITHUB_OUTPUT"
>
> Hm. It'd be nicer if we didn't have to repeat this part between the two
> tasks... Perhaps we can make it work using the small overlap between the
> different shells?
>
> Or maybe shell: bash would actually work well enough between the tasks 
> (without
> -- login it might not overwrite PATH).

I'll see if I can make something work.

Thanks!
--Jacob


Reply via email to