Greetings all!
Asdf noob here. I have spent hours on what I would think would be incredibly simple. Help would sure be appreciated.
I cloned a repo for a package that is available on quicklisp. I modified it. However, everytim I do:
(asdf:load-asd "thepackage.asd")
(asdf:load-system "thepackage")
It loads the standard distribution rather than the copy I am editing. I have tried stuff like:
(asdf:load-asd (concatenate 'string (namestring (truename ".")) "parenscript.asd"))
with no luck. I tried many other things too with no luck.
How can I force asdf to load and use the package in the local directory rather than the cached standard distribution?
Thank you!
Blake McBride
On Fri, Sep 22, 2023 at 3:05 PM Blake McBride blake@mcbridemail.com wrote:
How can I force asdf to load and use the package in the local directory rather than the cached standard distribution?
My understanding is that the following is poor form (I seem to recall ASDF:*CENTRAL-REGISTRY* is deprecated), however, perhaps it is still useful to you. Try:
(push "./" asdf:*central-registry*)
This helps ASDF see systems in the current directory, however, I guess I don't know whether this ensures that a system in the current directory is loaded instead of any identically-named systems in other directories.
Hope this helps,
Robert
Le 23/09/2023 à 00:04, Blake McBride a écrit :
Greetings all!
Asdf noob here. I have spent hours on what I would think would be incredibly simple. Help would sure be appreciated.
I cloned a repo for a package that is available on quicklisp. I modified it. However, everytim I do:
(asdf:load-asd "thepackage.asd")
(asdf:load-system "thepackage")
It loads the standard distribution rather than the copy I am editing. I have tried stuff like:
(asdf:load-asd (concatenate 'string (namestring (truename ".")) "parenscript.asd"))
with no luck. I tried many other things too with no luck.
How can I force asdf to load and use the package in the local directory rather than the cached standard distribution?
There are several confusions.
quicklisp doesn't provide packages, it provides systems.
quicklisp uses asdf to compile and load the systems it has downloaded and installed.
asdf compiles and loads systems, not packages.
Now, since you're using quicklisp, you may avoid using asdf to load a system, an use ql:quickload. This let you also avoid using asdf:*central-registry*, just because it's deprecated. Otherwise it's a very good mechanism, to give a list of directories where asdf should find systems. So good that it has been duplicated in quicklisp, as ql:*local-project-directories*.
So my advice is:
(push #P"/path/to/your/local/copy/" ql:*local-project-directories*) (ql:quickload :your-system)
So my advice is:
(push #P"/path/to/your/local/copy/" ql:*local-project-directories*) (ql:quickload :your-system)
alternatively, you can move or symlink your project into ~/quicklisp/local-projects/
All my local projects live in ~/common-lisp/
Because 1. It's a shorter name and less directories to traverse 2. Works without needing QL 3. QL does indexing on the local-projects dir that you have to remember to refresh
On Sat, Sep 23, 2023 at 7:12 AM Attila Lendvai attila.lendvai@gmail.com wrote:
So my advice is:
(push #P"/path/to/your/local/copy/" ql:*local-project-directories*) (ql:quickload :your-system)
alternatively, you can move or symlink your project into ~/quicklisp/local-projects/
-- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “No people will tamely surrender their Liberties, nor can any be easily subdued, when knowledge is diffused and virtue is preserved. On the contrary, when people are universally ignorant, and debauched in their manners, they will sink under their own weight without the aid of foreign invaders.” — Samuel Adams (1722–1803)
Thanks for all of the replies! Although I have been playing with Lisp for many years, I do not have much experience with ASDF or QuickLisp.
I appreciate all of the suggestions and explanations, however, with respect, they all seem like work-arounds or hacks for my purposes. I am not suggesting, however, that your input wasn't valid, helpful, or there is a better way.
I understand the idea that QuickLisp is not a package manager but a system manager. In that case, it delivers completed system easily and conveniently. It's a great tool.
I think a true package manager option in QuickLisp would be incredibly useful. Here is the scenario.
I am building a system. It has dependencies X, Y, and Z. I complete my system and package it up as a QuickLisp system. Later, I'd like to work on my system. I'd like to work on a local copy in a directory of my choosing. I'd like it to load its dependencies (X, Y, and Z) yet work on my part of the system without loading the version in the QuickLisp repo.
While some of your suggestions will allow me to do that, they are real clunky. Either I have to work in specific directories or I have to have special code specific to the particular directory I choose to work in.
All of this is contrary to the way all other system I've used work. In general, I can clone a repo to any directory and do:
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
I wouldn't think this would be hard at all to make ASDF and QuickLisp have this capability.
Blake McBride
Le 23/09/2023 à 16:56, Blake McBride a écrit :
Thanks for all of the replies! Although I have been playing with Lisp for many years, I do not have much experience with ASDF or QuickLisp.
I appreciate all of the suggestions and explanations, however, with respect, they all seem like work-arounds or hacks for my purposes. I am not suggesting, however, that your input wasn't valid, helpful, or there is a better way.
I understand the idea that QuickLisp is not a package manager but a system manager. In that case, it delivers completed system easily and conveniently. It's a great tool.
I think a true package manager option in QuickLisp would be incredibly useful. Here is the scenario.
It's a question of terminology actually. Since Common Lisp has a namespace type called PACKAGE, we use the name system for what is called package in other ecosystems. But quicklisp is a true "package" manager, ie system manager in that sense.
I am building a system. It has dependencies X, Y, and Z. I complete my system and package it up as a QuickLisp system.
There's no "Quicklisp system" per se. There are asdf system (and other kind of systems, using older defsystem macros, but rarely used anymore, since those that are used, have been upgraded to asdf).
In this part, Quicklisp is used as a distribution mechanism for asdf systems. To have an asdf system included in the Quicklisp distribution, you would make an issue to the quicklisp-projects github repository, and wait for Xach to do include it.
Note an important and regretable property of Quicklisp: it distributes system sources pruned of any version management data. Some system may come from tarballs, without version management, but most systems come from various distributed version management collections.
You can use the following tool to retrieve the origin of a quicklisp distributed system:
cl-user> (com.informatimago.tools.quicklisp:quick-where-from :alexandria)
(:system "alexandria" :distribution "quicklisp" :directory #P"/Users/pjb/quicklisp/dists/quicklisp/software/alexandria-20230618-git/" :where-from ("git" "https://gitlab.common-lisp.net/alexandria/alexandria.git")) ; No value cl-user>
it's in https://github.com/informatimago/lisp
Later, I'd like to work on my system. I'd like to work on a local copy in a directory of my choosing. I'd like it to load its dependencies (X, Y, and Z) yet work on my part of the system without loading the version in the QuickLisp repo.
While some of your suggestions will allow me to do that, they are real clunky. Either I have to work in specific directories or I have to have special code specific to the particular directory I choose to work in.
All of this is contrary to the way all other system I've used work. In general, I can clone a repo to any directory and do:
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
I wouldn't think this would be hard at all to make ASDF and QuickLisp have this capability.
Just put the directory on asdf:*central-registry* or ql:*local-project-directories*.
Now, for the alternatives (to quicklisp), there's the ergo vaporware: https://gitlab.com/informatimago/ergo irc://libera.chat/#clergo
And in practice, one alternative that could be used right now, is google repo. It uses a manifest.xml file to specify the repositories and commit IDs of the various git repositories to clone to get a system and its dependencies.
I've started to write some code to extract the origins and dependencies of a quicklisp distributed system, to clone them into a directory, where you could edit and push modifications upstream (or in your forks). See the work in progress: https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/tools/d...
That could serve as basis to generate a manifest.xml for google repo, or to configure an ergo project.
Hey Blake, for that workflow you describe, I think the closest candidate would be clpm:
You can add sources such as quicklisp a url, git repo, etc. and it sets this up locally to your project.
Unfortunately, I don't have much experience with it since I found out about it until I stopped working with CL.
Hopefully that helps!
On Sat, Sep 23, 2023 at 10:52 AM Pascal Bourguignon pjb@informatimago.com wrote:
Le 23/09/2023 à 16:56, Blake McBride a écrit :
Thanks for all of the replies! Although I have been playing with Lisp for many years, I do not have much experience with ASDF or QuickLisp.
I appreciate all of the suggestions and explanations, however, with respect, they all seem like work-arounds or hacks for my purposes. I am not suggesting, however, that your input wasn't valid, helpful, or there is a better way.
I understand the idea that QuickLisp is not a package manager but a system manager. In that case, it delivers completed system easily and conveniently. It's a great tool.
I think a true package manager option in QuickLisp would be incredibly useful. Here is the scenario.
It's a question of terminology actually. Since Common Lisp has a namespace type called PACKAGE, we use the name system for what is called package in other ecosystems. But quicklisp is a true "package" manager, ie system manager in that sense.
I am building a system. It has dependencies X, Y, and Z. I complete my system and package it up as a QuickLisp system.
There's no "Quicklisp system" per se. There are asdf system (and other kind of systems, using older defsystem macros, but rarely used anymore, since those that are used, have been upgraded to asdf).
In this part, Quicklisp is used as a distribution mechanism for asdf systems. To have an asdf system included in the Quicklisp distribution, you would make an issue to the quicklisp-projects github repository, and wait for Xach to do include it.
Note an important and regretable property of Quicklisp: it distributes system sources pruned of any version management data. Some system may come from tarballs, without version management, but most systems come from various distributed version management collections.
You can use the following tool to retrieve the origin of a quicklisp distributed system:
cl-user> (com.informatimago.tools.quicklisp:quick-where-from :alexandria)
(:system "alexandria" :distribution "quicklisp" :directory #P"/Users/pjb/quicklisp/dists/quicklisp/software/alexandria-20230618-git/" :where-from ("git" "https://gitlab.common-lisp.net/alexandria/alexandria.git")) ; No value cl-user>
it's in https://github.com/informatimago/lisp
Later, I'd like to work on my system. I'd like to work on a local copy in a directory of my choosing. I'd like it to load its dependencies (X, Y, and Z) yet work on my part of the system without loading the version in the QuickLisp
repo.
While some of your suggestions will allow me to do that, they are real clunky. Either I have to work in specific directories or I have to have special code specific to the particular directory I choose to work in.
All of this is contrary to the way all other system I've used work. In general, I can clone a repo to any directory and do:
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
I wouldn't think this would be hard at all to make ASDF and QuickLisp have this capability.
Just put the directory on asdf:*central-registry* or ql:*local-project-directories*.
Now, for the alternatives (to quicklisp), there's the ergo vaporware: https://gitlab.com/informatimago/ergo irc://libera.chat/#clergo
And in practice, one alternative that could be used right now, is google repo. It uses a manifest.xml file to specify the repositories and commit IDs of the various git repositories to clone to get a system and its dependencies.
I've started to write some code to extract the origins and dependencies of a quicklisp distributed system, to clone them into a directory, where you could edit and push modifications upstream (or in your forks). See the work in progress:
https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/tools/d...
That could serve as basis to generate a manifest.xml for google repo, or to configure an ergo project.
-- __Pascal Bourguignon__
I use a vanilla Quicklisp installation. For some local directory trees I configure ASDF to prefer those trees over the standard Quicklisp versions by placing text like the following in my $HOME/.config/common-lisp/source-registry.conf file:
(:source-registry (:tree "/home/brown/toe/open-source/") ;; For swank.asd (:tree "/home/brown/local/software/source/slime/") :inherit-configuration)
The format of source-registry.conf is documented in the ASDF repository. Notice that each directory path must end with a slash character.
On Sat, Sep 23, 2023 at 1:30 PM Wilfredo Velazquez zulu.inuoe@gmail.com wrote:
Hey Blake, for that workflow you describe, I think the closest candidate would be clpm:
You can add sources such as quicklisp a url, git repo, etc. and it sets this up locally to your project.
Unfortunately, I don't have much experience with it since I found out about it until I stopped working with CL.
Hopefully that helps!
On Sat, Sep 23, 2023 at 10:52 AM Pascal Bourguignon pjb@informatimago.com wrote:
Le 23/09/2023 à 16:56, Blake McBride a écrit :
Thanks for all of the replies! Although I have been playing with Lisp for many years, I do not have much experience with ASDF or QuickLisp.
I appreciate all of the suggestions and explanations, however, with respect, they all seem like work-arounds or hacks for my purposes. I am not suggesting, however, that your input wasn't valid, helpful, or there is a better way.
I understand the idea that QuickLisp is not a package manager but a system manager. In that case, it delivers completed system easily and conveniently. It's a great tool.
I think a true package manager option in QuickLisp would be incredibly useful. Here is the scenario.
It's a question of terminology actually. Since Common Lisp has a namespace type called PACKAGE, we use the name system for what is called package in other ecosystems. But quicklisp is a true "package" manager, ie system manager in that sense.
I am building a system. It has dependencies X, Y, and Z. I complete my system and package it up as a QuickLisp system.
There's no "Quicklisp system" per se. There are asdf system (and other kind of systems, using older defsystem macros, but rarely used anymore, since those that are used, have been upgraded to asdf).
In this part, Quicklisp is used as a distribution mechanism for asdf systems. To have an asdf system included in the Quicklisp distribution, you would make an issue to the quicklisp-projects github repository, and wait for Xach to do include it.
Note an important and regretable property of Quicklisp: it distributes system sources pruned of any version management data. Some system may come from tarballs, without version management, but most systems come from various distributed version management collections.
You can use the following tool to retrieve the origin of a quicklisp distributed system:
cl-user> (com.informatimago.tools.quicklisp:quick-where-from :alexandria)
(:system "alexandria" :distribution "quicklisp" :directory #P"/Users/pjb/quicklisp/dists/quicklisp/software/alexandria-20230618-git/" :where-from ("git" "https://gitlab.common-lisp.net/alexandria/alexandria.git")) ; No value cl-user>
it's in https://github.com/informatimago/lisp
Later, I'd like to work on my system. I'd like to work on a local copy in a directory of my choosing. I'd like it to load its dependencies (X, Y, and Z) yet work on my part of the system without loading the version in the QuickLisp repo.
While some of your suggestions will allow me to do that, they are real clunky. Either I have to work in specific directories or I have to have special code specific to the particular directory I choose to work in.
All of this is contrary to the way all other system I've used work. In general, I can clone a repo to any directory and do:
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
I wouldn't think this would be hard at all to make ASDF and QuickLisp have this capability.
Just put the directory on asdf:*central-registry* or ql:*local-project-directories*.
Now, for the alternatives (to quicklisp), there's the ergo vaporware: https://gitlab.com/informatimago/ergo irc://libera.chat/#clergo
And in practice, one alternative that could be used right now, is google repo. It uses a manifest.xml file to specify the repositories and commit IDs of the various git repositories to clone to get a system and its dependencies.
I've started to write some code to extract the origins and dependencies of a quicklisp distributed system, to clone them into a directory, where you could edit and push modifications upstream (or in your forks). See the work in progress: https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/tools/d...
That could serve as basis to generate a manifest.xml for google repo, or to configure an ergo project.
-- __Pascal Bourguignon__
-- Wilfredo Velázquez-Rodríguez
I use a vanilla Quicklisp installation. For some local directory trees I configure ASDF to prefer those trees over the standard Quicklisp versions by placing text like the following in my $HOME/.config/common-lisp/source-registry.conf file:
(:source-registry (:tree "/home/brown/toe/open-source/") ;; For swank.asd (:tree "/home/brown/local/software/source/slime/") :inherit-configuration)
+1 for this as the simplest path to the desired outcome.
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
that system is a struggle in so many other ways (dll hell; all the /usr/include stuff; etc...). and from all the various linux distros, precious few can achieve the equivalent of the CL ecosystem WRT reproducibility and fine-grained control over the versions of the dependencies (NixOS and Guix are the ones i'm aware of).
the seeming simplicity of that ./configure dance has an enormous cost that only shows up when it doesn't work in apparent or in covertly surprising ways.
Right yeah, or you can use clpm and specifically target the versions of the thing you use. Alternatively you can vendor (copy/paste them in your repo). In CL you fo deal with per-platform thing, but generally it is isolated to some OS layer and move on
On Sun, Sep 24, 2023 at 7:00 AM Attila Lendvai attila.lendvai@gmail.com wrote:
I use a vanilla Quicklisp installation. For some local directory trees I configure ASDF to prefer those trees over the standard Quicklisp versions by placing text like the following in my $HOME/.config/common-lisp/source-registry.conf file:
(:source-registry (:tree "/home/brown/toe/open-source/") ;; For swank.asd (:tree "/home/brown/local/software/source/slime/") :inherit-configuration)
+1 for this as the simplest path to the desired outcome.
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
that system is a struggle in so many other ways (dll hell; all the /usr/include stuff; etc...). and from all the various linux distros, precious few can achieve the equivalent of the CL ecosystem WRT reproducibility and fine-grained control over the versions of the dependencies (NixOS and Guix are the ones i'm aware of).
the seeming simplicity of that ./configure dance has an enormous cost that only shows up when it doesn't work in apparent or in covertly surprising ways.
-- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “In his dealings with the world, the gentleman is not invariably for or against anything. He is on the side of what is moral.” — Confucius (551–479 BC)
Thank you all very much! It seems to me that changing QuickLisp to default to the current directory first would solve all of the problems. This way one can change to the application directory and all will load correctly without any configuration.
Until that change is made, I will use one of the suggestions kindly made.
Thank you all!
Blake McBride
------- Original Message ------- On Sunday, September 24th, 2023 at 7:31 AM, Wilfredo Velazquez zulu.inuoe@gmail.com wrote:
Right yeah, or you can use clpm and specifically target the versions of the thing you use. Alternatively you can vendor (copy/paste them in your repo). In CL you fo deal with per-platform thing, but generally it is isolated to some OS layer and move on
On Sun, Sep 24, 2023 at 7:00 AM Attila Lendvai attila.lendvai@gmail.com wrote:
I use a vanilla Quicklisp installation. For some local directory trees I configure ASDF to prefer those trees over the standard Quicklisp versions by placing text like the following in my $HOME/.config/common-lisp/source-registry.conf file:
(:source-registry (:tree "/home/brown/toe/open-source/") ;; For swank.asd (:tree "/home/brown/local/software/source/slime/") :inherit-configuration)
+1 for this as the simplest path to the desired outcome.
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
that system is a struggle in so many other ways (dll hell; all the /usr/include stuff; etc...). and from all the various linux distros, precious few can achieve the equivalent of the CL ecosystem WRT reproducibility and fine-grained control over the versions of the dependencies (NixOS and Guix are the ones i'm aware of).
the seeming simplicity of that ./configure dance has an enormous cost that only shows up when it doesn't work in apparent or in covertly surprising ways.
-- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “In his dealings with the world, the gentleman is not invariably for or against anything. He is on the side of what is moral.” — Confucius (551–479 BC)
--
Wilfredo Velázquez-Rodríguez
FWIW, ANSI Common Lisp does not *have* a current directory, only a current value of `*default-pathname-defaults*`. ANSI CL is happy to run on systems that have no notion of a process having a current directory.
So that accounts for why Quicklisp and ASDF don't support a notion of current working directory.
Best, R
On 24 Sep 2023, at 8:07, Blake McBride wrote:
Thank you all very much! It seems to me that changing QuickLisp to default to the current directory first would solve all of the problems. This way one can change to the application directory and all will load correctly without any configuration.
Until that change is made, I will use one of the suggestions kindly made.
Thank you all!
Blake McBride
------- Original Message ------- On Sunday, September 24th, 2023 at 7:31 AM, Wilfredo Velazquez zulu.inuoe@gmail.com wrote:
Right yeah, or you can use clpm and specifically target the versions of the thing you use. Alternatively you can vendor (copy/paste them in your repo). In CL you fo deal with per-platform thing, but generally it is isolated to some OS layer and move on
On Sun, Sep 24, 2023 at 7:00 AM Attila Lendvai attila.lendvai@gmail.com wrote:
I use a vanilla Quicklisp installation. For some local directory trees I configure ASDF to prefer those trees over the standard Quicklisp versions by placing text like the following in my $HOME/.config/common-lisp/source-registry.conf file:
(:source-registry (:tree "/home/brown/toe/open-source/") ;; For swank.asd (:tree "/home/brown/local/software/source/slime/") :inherit-configuration)
+1 for this as the simplest path to the desired outcome.
./configure make sudo make install
and it works! I can put the clone anywhere I want. I can change it anyway I want. The system doesn't fight me.
that system is a struggle in so many other ways (dll hell; all the /usr/include stuff; etc...). and from all the various linux distros, precious few can achieve the equivalent of the CL ecosystem WRT reproducibility and fine-grained control over the versions of the dependencies (NixOS and Guix are the ones i'm aware of).
the seeming simplicity of that ./configure dance has an enormous cost that only shows up when it doesn't work in apparent or in covertly surprising ways.
-- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “In his dealings with the world, the gentleman is not invariably for or against anything. He is on the side of what is moral.” — Confucius (551–479 BC)
--
Wilfredo Velázquez-Rodríguez
Robert P. Goldman Research Fellow Smart Information Flow Technologies (d/b/a SIFT, LLC)
319 N. First Ave., Suite 400 Minneapolis, MN 55401
Voice: (612) 326-3934 Email: rpgoldman@SIFT.net
(asdf:load-asd "thepackage.asd")
I believe load-asd requires an absolute pathname.
Have you tried:
(asdf:load-asd (uiop:merge-pathnames* "thepackage.asd" (uiop:getcwd)))
That should find "thepackage.asd" in the current working directory. I should note that the call to getcwd is redundant on most lisps, as the default pathname and the current working directory are usually the same, but nothing in the specification requires them to be.
Regards, Jason