Hi :)

On Tue 21 Feb 2017 13:13, Mathieu Lirzin <[email protected]> writes:

> IIUC the problem you have is that in a Guix build environmnent, Guile
> tries but *fails* to autocompile ".scm" files because it doesn't find
> any directory that it can write on?

Correct.

> Since /tmp is writeable in a Guix build environment and in most POSIX
> systems (I guess), Would it make sense for Guile itself to fallback to
> /tmp for its compilation cache?

It's possible.  It's a bit gnarly though:

  * you get the usual race conditions between users and /tmp that you
    have to mitigate

  * you have to be more careful about permissions (it could be that the
    .go embeds something secret)
    - each user would have to have their own path here

  * guile would have to look in /tmp in addition to XDG_CACHE_HOME when
    looking for autocompiled files

  * what if the one in /tmp is fresh but the one in XDG_CACHE_HOME is
    not, or vice versa?

I'd rather use XDG_CACHE_HOME for this as it's already well specified
and actually not Guile-specific
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Andy

Reply via email to