Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update the newlinify macro to not externalize its environment

The newlinify macro was externalizing its environment unnecessarily.
Though not necessarily a bug, it made the code both less efficient
and more fragile to the Lisp implementation (there is no guarantee
that environments _be_ externalizable!). Dave Cooper noticed the problem
in ACL 9.0 (where there had been changes in the environment
implementation). Now it's been improved and so no longer a problem.
  • Loading branch information...
commit ee24169028992ad0e74c6a4d4a5eec68438c1681 1 parent 6db065f
@gwkkwg authored
View
4 .gitignore
@@ -15,3 +15,7 @@ lift-local.config
*.fasl
benchmark-data/
+
+# new ASDF stuff
+*.*-warnings
+*.build-report
View
8 dev/macros.lisp
@@ -570,10 +570,10 @@ test failure is generated instead of a warning"
(defmacro newlinify (format &environment e)
(declare (ignorable e))
#+allegro
- `(if (and (constantp ,format ,e)
- (stringp (sys:constant-value ,format ,e)))
- (excl::newlinify-format-string (sys:constant-value ,format ,e))
- ,format)
+ (if (and (constantp format e)
+ (stringp (sys:constant-value format e)))
+ (excl::newlinify-format-string (sys:constant-value format e))
+ `(excl::newlinify-format-string ,format))
#-allegro
format)
View
16 test/lift-test.lisp
@@ -1092,18 +1092,18 @@ these cancel testing instead.)")
until (eq line :eof) collect line))))
(deftestsuite test-log-file (lift-test)
- (log-file)
+ (my-log-file)
(:setup
- (setf log-file (format nil "/tmp/~a" (gensym "file-")))
- (when (probe-file log-file)
- (delete-file log-file))))
+ (setf my-log-file (format nil "/tmp/~a" (gensym "file-")))
+ (when (probe-file my-log-file)
+ (delete-file my-log-file))))
(deftestsuite test-log-file-helper ()
- (log-file))
+ (my-log-file))
(addtest (test-log-file-helper)
test-1
- (let ((lines (slurp log-file)))
+ (let ((lines (slurp my-log-file)))
(ensure (plusp (length lines)))
(let* ((last-line (first (last lines)))
(datum (read-from-string last-line nil nil)))
@@ -1115,8 +1115,8 @@ these cancel testing instead.)")
test-1
(let ((r (lift:run-tests
:suite 'test-log-file-helper
- :report-pathname log-file
- :testsuite-initargs `(:log-file ,log-file))))
+ :report-pathname my-log-file
+ :testsuite-initargs `(:log-file ,my-log-file))))
(ensure-null (errors r))
(ensure-null (failures r))
(ensure (plusp (length (tests-run r))))))
View
1  timeout/package.lisp
@@ -8,7 +8,6 @@
(defpackage #:com.metabang.trivial-timeout
(:use #:common-lisp)
(:nicknames #:trivial-timeout)
-; #+no
(:export
#:with-timeout
#:timeout-error)))
Please sign in to comment.
Something went wrong with that request. Please try again.