Hello Nigko.  I should have been looking for agreement from the start,
and now with your statement of the problem, I concur that without the
current implementation of `current-source-directory', it is hard not to
follow symlinks.  But then again, the current current-source-directory
already does follow symlinks in nearly all cases, even in configuration
files, except apparently when called in weird ways like local-file,
maybe because of Guix’ code staging.

It is not consistent, but actually I do not know why `local-file', when
calling `absolute-dirname', takes this case of `if'.


> Thanks to Attila there is another variant [2] which leaves the
> directory structure intact:

Documenting this work-around is not enough; we would have to also
document the rationale that local-file is weird and inconsistent,
because current-source-directory is weird and inconsistent.

I believe making local-file usable with any symlinks is better, and
changing absolute-dirname used by current-source-directory achieves
that.

The other alternative is making local-file not use
current-source-directory.


> ('channel-dir' is a macro instead of a variable, but I don't see any
> real benefits in using macro here)

Yes, macros are not necessary, because syntax-source, as used by
current-source-directory, is not necessary.  Why does
current-source-directory use syntax-source?  Perhaps it works even
outside modules.

Another reason against the other alternative.

Regards,
Florian

Reply via email to