Hi,
I wonder if it possible that you would accept this change which allows finding of a system by a symbolicly linked ".asd" file. I've been running with this patch for about 10 years without issue. I'm sorry for not having test cases and documentation, but it seems time passing won't help that. I know this is probably a pointless change for everyone besides me, being the only user of my software, so I quite understand if you don't want to add it. Anyway, many thanks for your years of work on perhaps the most used CL software ever.
diff --git a/find-system.lisp b/find-system.lisp index 0980a2cc..1a226aba 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -263,11 +263,16 @@ PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system." (locate-system name) (assert (eq foundp (and (or found-system pathname previous) t)))) (let ((previous-pathname (system-source-file previous)) - (system (or previous found-system))) + (system (or previous found-system)) + real-name) (when (and found-system (not previous)) (register-system found-system)) (when (and system pathname) (setf (system-source-file system) pathname)) + (when (and pathname + (setf real-name (pathname-name pathname)) + (not (equal real-name name))) + (setf name real-name)) (if-let ((stamp (get-file-stamp pathname))) (let ((up-to-date-p (and previous previous-primary
Hi,
ASDF already allows that, so it's not clear to me how you're trying to do.
I have the following in ~/.config/common-lisp/source-registry.conf
(:source-registry (:directory (:home "lisp/systems")) :ignore-inherited-configuration)
I symlink .asd files into ~/lisp/systems/ and ASDF loads them without issues.
Hi,
I wonder if it possible that you would accept this change which allows finding of a system by a symbolicly linked ".asd" file. I've been running with this patch for about 10 years without issue. I'm sorry for not having test cases and documentation, but it seems time passing won't help that. I know this is probably a pointless change for everyone besides me, being the only user of my software, so I quite understand if you don't want to add it. Anyway, many thanks for your years of work on perhaps the most used CL software ever.
diff --git a/find-system.lisp b/find-system.lisp index 0980a2cc..1a226aba 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -263,11 +263,16 @@ PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system." (locate-system name) (assert (eq foundp (and (or found-system pathname previous) t)))) (let ((previous-pathname (system-source-file previous))
(system (or previous found-system)))
(system (or previous found-system))
real-name) (when (and found-system (not previous)) (register-system found-system)) (when (and system pathname) (setf (system-source-file system) pathname))
(when (and pathname
(setf real-name (pathname-name pathname))
(not (equal real-name name)))
(setf name real-name)) (if-let ((stamp (get-file-stamp pathname))) (let ((up-to-date-p (and previous previous-primary
-- Stelian Ionescu
What is the lisp implementation you are using that you need this modification, and on what OS? There are some subtle distinctions between different implementations in how they treat symbolic links.
On 16 Nov 2022, at 11:38, Stelian Ionescu wrote:
Hi,
ASDF already allows that, so it's not clear to me how you're trying to do.
I have the following in ~/.config/common-lisp/source-registry.conf
(:source-registry (:directory (:home "lisp/systems")) :ignore-inherited-configuration)
I symlink .asd files into ~/lisp/systems/ and ASDF loads them without issues.
Hi,
I wonder if it possible that you would accept this change which allows finding of a system by a symbolicly linked ".asd" file. I've been running with this patch for about 10 years without issue. I'm sorry for not having test cases and documentation, but it seems time passing won't help that. I know this is probably a pointless change for everyone besides me, being the only user of my software, so I quite understand if you don't want to add it. Anyway, many thanks for your years of work on perhaps the most used CL software ever.
diff --git a/find-system.lisp b/find-system.lisp index 0980a2cc..1a226aba 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -263,11 +263,16 @@ PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system." (locate-system name) (assert (eq foundp (and (or found-system pathname previous) t)))) (let ((previous-pathname (system-source-file previous))
(system (or previous found-system)))
(system (or previous found-system))
real-name) (when (and found-system (not previous)) (register-system found-system)) (when (and system pathname) (setf (system-source-file system) pathname))
(when (and pathname
(setf real-name (pathname-name pathname))
(not (equal real-name name)))
(setf name real-name)) (if-let ((stamp (get-file-stamp pathname))) (let ((up-to-date-p (and previous previous-primary
-- Stelian Ionescu
It's probably safest and wisest to not make this change. Sorry for wasting time. Here are some words which may answer your questions, but are safe to ignore:
I've only tested it on {sbcl ccl ecl clisp lispworks allegro cmu} on {linux bsd macos windows}. Windows doesn't have effective symbolic links, so unfortunately this doesn't work on it. Although it does work under POSIX compatibility like cygwin. Unfortunately I don't know if it works on Mezzano or Genera. I'm unsure about ABCL, Clasp, and Corman since I haven't yet been able to run on those. I think this should only happen when the link target base name is not ‘equal’ to the one given, so it's only dependent on the behaviour of pathanme-name not on any OS specific thing.
I don't think there's any change to the user's configuration that can achieve this. Making a long set of changes to the user's ASDF configuration e.g. source-registry.conf, seems difficult and inappropriate.
I know ASDF already supports ths case of:
/some/path/foo.asd -> /a/different/path/foo.asd
This change is for the cases where the base name differs:
foo.asd -> bar.asd /the/same/path/foo.asd -> /the/same/path/bar.asd /some/path/foo.asd -> /a/different/path/bar.asd
so when you ask to load "foo" it can load "bar". Everything else is the same as if you asked to load "bar".
As far as I know, Windows now supports symlinks (https://learn.microsoft.com/en-us/windows/security/threat-protection/securit...). Does that not work ?
It's probably safest and wisest to not make this change. Sorry for wasting time. Here are some words which may answer your questions, but are safe to ignore:
I've only tested it on {sbcl ccl ecl clisp lispworks allegro cmu} on {linux bsd macos windows}. Windows doesn't have effective symbolic links, so unfortunately this doesn't work on it. Although it does work under POSIX compatibility like cygwin. Unfortunately I don't know if it works on Mezzano or Genera. I'm unsure about ABCL, Clasp, and Corman since I haven't yet been able to run on those. I think this should only happen when the link target base name is not ‘equal’ to the one given, so it's only dependent on the behaviour of pathanme-name not on any OS specific thing.
I don't think there's any change to the user's configuration that can achieve this. Making a long set of changes to the user's ASDF configuration e.g. source-registry.conf, seems difficult and inappropriate.
I know ASDF already supports ths case of:
/some/path/foo.asd -> /a/different/path/foo.asd
This change is for the cases where the base name differs:
foo.asd -> bar.asd /the/same/path/foo.asd -> /the/same/path/bar.asd /some/path/foo.asd -> /a/different/path/bar.asd
so when you ask to load "foo" it can load "bar". Everything else is the same as if you asked to load "bar".
-- Stelian Ionescu