[racket-dev] no symlinks in planet links (was: Re: single-instantiation trick: kludgy workaround for planet packages?)

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Oct 6 17:33:45 EDT 2010

8 minutes ago, John Clements wrote:
> 
> So, it looks like planet is broken wrt planet-links containing
> symbolic links.  Maybe you could solve this by just putting a
> fully-expand-path-mumble somewhere very early in the signal chain?
> ... Hmm, actually that might not be such a great idea; you break the
> abstraction of the symbolic link from the standpoint of the user.

I recently ran into a similar problem -- and if it's the same problem
then it has nothing to do with planet.  I had some code in a symlink
that was required as a relative string and as symbolic name, and it
ended up requiring a module going through two different paths, which
meant that a certain piece of state in that module was duplicated
which resulted in lots of confusion.

Matthew's advice was to never use symlinks.

I thought about it a little, and I think that it might be better if
everything around resolving module names never expands symlinks.
IIRC, the problem was caused by a relative require that was resolved
using the real path of the originating file, even though that file was
required from a different place (which was the symlink).  I think that
it might work, but didn't talk to Matthew about it yet, so for all I
know that will lead to some other horrors.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.