Question

I know I can get the version number of ASDF itself with (asdf:asdf-version). But the same does not work with all other packages I load using ASDF, e.g. (my-system:my-system-version). Is there any programmatic way to get the value of a :version keyword in a system definition?

(defsystem my-system
   ...
   :version "0.1"
   ...)

I am writing a simple HTTP server and would like to include the version number in the Server HTTP header. Anyway, it is a common need for any program to be able to print out its version number somewhere for user information. Of course, I'd like the version number to be defined only in one place, since I may forget to update it in multiple places.

Was it helpful?

Solution

(slot-value (asdf:find-system 'my-system) 'asdf:version)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top