[asdf-install-devel] Relative symlinks to sysfiles

Chaitanya Gupta mail at chaitanyagupta.com
Tue Dec 25 21:51:09 UTC 2007


Dan Muller wrote:
> Hi Chaitanya,
>
> I didn't test your patch, because I'm currently only testing on
> Windows. Eventually I need to get myself set up for testing on my
> Linux box, too.
>
>   
And I can only test on OS X at the moment. ;)
> My only critique at the moment has to do with the fact that I'd like
> to see the set of customizable exports from ASDF-INSTALL kept
> small. Symlinking the system files is a problematic area for Windows
> users and needs a better solution there. Rather than adding an
> exported boolean symbol, I'd much rather see something like a variable
> whose value is a function that is responsible for "registering" a
> system file. By default, this would symlink as is currently done; you
> could replace the value with your function, which then wouldn't have
> to be part of ASDF-INSTALL (although it could still be, as an exported
> convenience function). This would also provide a means for Windows
> users to replace it with a function that coordinates with their ASDF
> (or MK-DEFSYSTEM) configuration.
>   
I agree that this would be a better approach than what's done currently
(calling MAYBE-SYMLINK-SYSFILE from INSTALL-PACKAGE), but instead of
providing "a" default, I think it would be better to provide
"reasonable" system-specific default functions for registering a system
e.g. one for unix-based systems, another for windows, etc (and my
preferred way could be a convenience exported function - I /think/ some
people might want symlinks this way).

BTW, even without my patch, currently MAYBE-SYMLINK-FILE does nothing on
Windows (AFAIK, registering a system only means creating a symlink right
now). This is from the stable repository:

(defun maybe-symlink-sysfile (system sysfile)
  (declare (ignorable system sysfile))
  #-(or :win32 :mswindows)
  (let ((target (merge-pathnames
                 (make-pathname :name (pathname-name sysfile)
                                :type (pathname-type sysfile))
                 system)))
    (when (probe-file target)
      (unlink-file target))
    (symlink-files sysfile target)))

So I had not worried about windows while creating this patch. ;)
> Also, accompanying updates to documentation and unit tests would be
> nice for new features, but I realize that raises the bar on
> contributions quite a bit.
>
>   
That's not an issue. I didn't send this with the intention of getting it
committed in its current form -- I want to see how good/bad the
idea/code is, and whether there's a better alternative (like what you
suggested). I have no problem writing documentation/unit tests once the
code is fixed.

Thanks,

Chaitanya



More information about the asdf-install-devel mailing list