Shinmera / trivial-arguments

Tiny CL library to retrieve the arguments list of a function.
zlib License
22 stars 6 forks source link

Improper ASDF-isms #3

Closed fare closed 7 years ago

fare commented 7 years ago

1- You use (eval-when ... (require ...)) in the lisp file, instead of (:feature :sbcl (:require :foo)) in the .asd file. ASDF 3.3.0 will reject that.

2- You don't need either in-package or the asdf: prefix to defsystem in the .asd file.

fare commented 7 years ago
0001-Clean-up-dependencies-so-it-works-with-ASDF-3.3.patch
Ubu ~/cl/THIRDPARTY/trivial-arguments> cat 0001-Clean-up-dependencies-so-it-works-with-ASDF-3.3.patch
From 13a93343458c26d127d9d2ce959df2339c714a4b Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <fare@tunes.org>
Date: Wed, 22 Mar 2017 17:47:52 -0400
Subject: [PATCH] Clean up dependencies so it works with ASDF 3.3

---
 arguments.lisp        | 1 -
 trivial-arguments.asd | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arguments.lisp b/arguments.lisp
index 8057226..3ddd8f7 100644
--- a/arguments.lisp
+++ b/arguments.lisp
@@ -11,7 +11,6 @@
    #:arglist))
 (in-package #:org.shirakumo.trivial-arguments)

-#+:sbcl (eval-when (:compile-toplevel :load-toplevel :execute) (require 'sb-introspect))
 #-(or :swank :abcl :allegro :ccl :clisp :ecl :lispworks :sbcl :scl :clasp)
 (warn "TRIVIAL-ARGUMENTS NOTICE: SWANK not present and implementation not directly supported. Falling back to FUNCTION-LAMBDA-EXPRESSION.")

diff --git a/trivial-arguments.asd b/trivial-arguments.asd
index 276138d..dac7400 100644
--- a/trivial-arguments.asd
+++ b/trivial-arguments.asd
@@ -4,8 +4,7 @@
  Author: Nicolas Hafner <shinmera@tymoon.eu>
 |#

-(in-package #:cl-user)
-(asdf:defsystem trivial-arguments
+(defsystem trivial-arguments
   :name "Trivial-Arguments"
   :version "1.0.1"
   :license "Artistic"
@@ -15,4 +14,4 @@
   :homepage "https://github.com/Shinmera/trivial-arguments"
   :serial T
   :components ((:file "arguments"))
-  :depends-on ())
+  :depends-on ((:feature :sbcl (:require :sb-introspect))))
--
2.7.4
Shinmera commented 7 years ago

How far back is this compatible?

fare commented 7 years ago

ASDF 2.32 (2013).

fare commented 7 years ago

Shell function I used to test (from asdf directory):

a () { ./build/asdf-tools extract-tagged-asdf $1 ; CL_SOURCE_REGISTRY=$HOME/cl/THIRDPARTY/trivial-arguments sbcl --load build/asdf-$1.lisp --eval '(asdf:load-system :trivial-arguments)' ; }
Shinmera commented 7 years ago

Great, thanks a lot!