Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions cl-json.asd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
;;; All rights reserved.
;;; See the file LICENSE for terms of use and distribution.

(in-package #:cl-user)

(defpackage #:json-system
(:use #:cl #:asdf))
(:use :cl :asdf :uiop))

(in-package #:json-system)

Expand All @@ -24,9 +22,8 @@
:version "0.5.0"
:maintainer "Henrik Hjelte <[email protected]>"
:licence "MIT"
:in-order-to ((test-op (test-op "cl-json.test")))
:components ((:static-file "cl-json.asd")
(:module :src
:in-order-to ((test-op (test-op "cl-json/test")))
:components ((:module "src"
:components ((:file "package")
(:file "common" :depends-on ("package"))
#+cl-json-clos
Expand All @@ -37,20 +34,17 @@
(:file "utils" :depends-on ("decoder" "encoder"))
(:file "json-rpc" :depends-on ("package" "common" "utils" "encoder" "decoder"))))))

(defsystem :cl-json.test
:depends-on (:cl-json :fiveam )
;; newer ASDF versions have this implicitly, but I know of no good way to detect this. [2010/01/02:rpg]
:in-order-to ((test-op (load-op "cl-json.test")))
:components ((:module :t
:components ((:file "package")
(:file "testmisc" :depends-on ("package" "testdecoder" "testencoder"))
(:file "testdecoder" :depends-on ("package"))
(:file "testencoder" :depends-on ("package"))))))

(defmethod perform ((op test-op) (c (eql (find-system :cl-json.test))))
(funcall (intern (symbol-name '#:run!) :it.bese.FiveAM)
(intern (symbol-name '#:json) :json-test)))
(defsystem "cl-json/test"
:depends-on ("cl-json" "fiveam")
:components ((:module "t"
:components ((:file "package")
(:file "testmisc" :depends-on ("package" "testdecoder" "testencoder"))
(:file "testdecoder" :depends-on ("package"))
(:file "testencoder" :depends-on ("package")))))
:perform (test-op (o c)
(symbol-call :it.bese.FiveAM :run! (find-symbol* :json :json-test))))

(defparameter *cl-json-directory*
(make-pathname :directory (pathname-directory *load-truename*)))
(pathname-directory-pathname (current-lisp-file-pathname)))


4 changes: 2 additions & 2 deletions src/common.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

;;; Custom variables

(eval-when (:compile-toplevel :load-toplevel)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defvar *custom-vars* nil)

Expand Down Expand Up @@ -44,7 +44,7 @@
)

(defmacro define-custom-var ((key name) &rest other-args)
`(eval-when (:compile-toplevel :load-toplevel)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(progn (pushnew '(,name . ,key) *custom-vars* :test #'equal)
(defvar ,name ,@other-args))))

Expand Down
4 changes: 2 additions & 2 deletions src/decoder-args.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

;;; Custom variables

(eval-when (:compile-toplevel :load-toplevel)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defvar *custom-vars* nil)

Expand All @@ -21,7 +21,7 @@
)

(defmacro define-custom-var ((key name) &rest other-args)
`(eval-when (:compile-toplevel :load-toplevel)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(progn (pushnew '(,name . ,key) *custom-vars* :test #'equal)
(defvar ,name ,@other-args))))

Expand Down
2 changes: 1 addition & 1 deletion src/encoder.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ characters in string S to STREAM."
(destructuring-bind (esc . (width . radix)) special
(format stream "\\~C~V,V,'0R" esc radix width code)))))

(eval-when (:compile-toplevel)
(eval-when (:compile-toplevel :execute)
(if (subtypep 'long-float 'single-float)
;; only one float type
(pushnew :cl-json-only-one-float-type *features*)
Expand Down
11 changes: 6 additions & 5 deletions src/objects.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ registered in the superclass."
(declare (ignore superclass subclass))
(values))

(defmethod validate-superclass ((class fluid-class)
(superclass standard-class))
"Any fluid class is also a standard class."
t)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmethod validate-superclass ((class fluid-class)
(superclass standard-class))
"Any fluid class is also a standard class."
t))

(finalize-inheritance
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass fluid-object (standard-object) ()
(:documentation "Any instance of a fluid class.")
(:metaclass fluid-class)))
Expand Down
2 changes: 1 addition & 1 deletion t/testdecoder.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ safe-symbols-parsing function here for a cure."


(defparameter *json-test-files-path*
(asdf:system-relative-pathname "cl-json.test" "t/"))
(asdf:system-relative-pathname "cl-json/test" "t/"))

(defun test-file (name)
(make-pathname :name name :type "json" :defaults *json-test-files-path*))
Expand Down