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

Properly use EVAL-WHEN to compile with Bazel #15

Open
wants to merge 1 commit 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
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