问题描述
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 <[email protected]>"
:license "Specify license here"
:depends-on (#:hunchentoot
#:cl-who)
:components ((:file "package")
(:file "dispatch")))
这将创建名为#:my-system的系统.我实际上不确定#代表什么,因为我已经在源代码中看到了没有它的系统定义.仅第一行是必需的. :depends-on
告诉ASDF在处理此新系统定义之前先加载其他系统.在这种情况下,它将加载#:hunchentoot
和#:cl-who
. :components
加载特定文件. package.lisp
和dispatch.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依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!