如何管理常见的Lisp依赖关系? [英] How do I manage common lisp dependencies?

查看:97
本文介绍了如何管理常见的Lisp依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pip需求文件,ruby gemfile,node package.json等的lisp等效项是什么?我不确定是否可以正确使用asdf和quicklisp之间的关系.

What's the lisp equivalent of a pip requirement file, ruby gemfile, node package.json, etc? I'm not entirely sure how asdf and quicklisp relate if those are the proper things to use.

推荐答案

.asd文件是需求文件.使用quicklisp安装要求.

A .asd file is a requirements file. Use quicklisp to install requirements.

使用ASDF定义系统".创建一个my-system.asd文件.

Use ASDF to define a "system". Create a my-system.asd file.

(asdf:defsystem #:my-system
  :serial t
  :description "Describe my-system here"
  :author "My Name <my.name@example.com>"
  :license "Specify license here"
  :depends-on (#:hunchentoot
               #:cl-who)
  :components ((:file "package")
               (:file "dispatch")))

这将创建名为#:my-system的系统.我实际上不确定#代表什么,因为我已经在源代码中看到了没有它的系统定义.仅第一行是必需的. :depends-on告诉ASDF在处理此新系统定义之前先加载其他系统.在这种情况下,它将加载#:hunchentoot#:cl-who. :components加载特定文件. package.lispdispatch.lisp已加载. :serial t告诉它按顺序加载它.如果说dispatch.lisp依赖于package.lisp中的某些内容,因此需要首先加载package.lisp,则这一点很重要.

This creates the system named #:my-system. I'm not actually sure what the # denotes as I've seen system definitions without it in source code. Only the first line is required. :depends-on tells ASDF to load other systems before this new system definition is processed. In this case it loads #:hunchentoot and #:cl-who. :components load specific files. package.lisp and dispatch.lisp are loaded. :serial t tells it to load it in order. This is important if say dispatch.lisp depends on something in package.lisp such that package.lisp needs to be loaded first.

使用quicklisp在:depends-on中下载并安装依赖项.跑 (ql:quickload "my-system").

Use quicklisp to download and install the dependencies in :depends-on. Run (ql:quickload "my-system").

我没有看到任何版本控制的迹象.

I haven't seen any sign of versioning.

这篇关于如何管理常见的Lisp依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆