简体   繁体   中英

Managing Dependencies in Common Lisp

I come to Lisp from the Python world, which essentially runs on virtualenv and pip as the way to create containers and manage dependencies.

Currently, I am learning Common Lisp in more detail and wondering what its community's philosophy is on managing dependencies and packages.

For instance, if I run:

(ql:quickload '(cl-who hunchentoot parenscript elephant fiveam css-lite cl-json))

it is my understanding that all these packages will be installed somewhere within the quicklisp directory. (I am not sure in which form or where they are installed).

The question is whether sometime it is necessary to install a different version of a package, depending on the code at hand. That is, what does one do in that case? Does he simply rely on the backward compatibility of the package?

How does the Common Lisp world deal with this?

If you need a specific version of a package for development, you just have to clone it into a repository automatically found by Quicklisp ( ~/quicklisp/local-projects/ ). This version will be available for all projects. If you need this to be project-local, or to easily ship a list of dependencies with an application, you can use Qlot , which is really like a pip requirements file and a venv.

There's also Quicklisp bundles as pointed in this other answer.

Even more, there's Quicklisp controller to build dists, a whole set of packages that work together, just as does Quicklisp, but for your own related set of packages. That's what cl21 does for instance.

I'd advise not to bother with those yet until you know you need it ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM