[Git][cmucl/cmucl][master] 4 commits: Fix #30: compilation of (describe 'foo)
Raymond Toy
rtoy at common-lisp.net
Thu Sep 8 03:55:35 UTC 2016
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
53fe0a4f by Raymond Toy at 2016-09-07T20:28:36-07:00
Fix #30: compilation of (describe 'foo)
The debug-info-source isn't available until later in the fasl, so
don't try to print where the source was compiled from. This seems
like a small oversight since the next bit of code does nothing if the
debug-info-source isn't available.
- - - - -
5524c034 by Raymond Toy at 2016-09-07T20:29:38-07:00
Add test for issue #30.
- - - - -
6714a3a1 by Raymond Toy at 2016-09-07T20:52:29-07:00
Fix mistake in test.
- - - - -
f810fc97 by Raymond Toy at 2016-09-08T03:55:32+00:00
Merge branch 'rtoy-fix-30-describe-foo' into 'master'
Fix #30: compilation of describe foo
The debug-info-source isn't available until later in the fasl, so
don't try to print where the source was compiled from. This seems
like a small oversight since the next bit of code does nothing if the
debug-info-source isn't available.
See merge request !11
- - - - -
3 changed files:
- src/code/describe.lisp
- tests/issues.lisp
- + tests/resources/issue-30.lisp
Changes:
=====================================
src/code/describe.lisp
=====================================
--- a/src/code/describe.lisp
+++ b/src/code/describe.lisp
@@ -313,11 +313,12 @@
(let ((info (kernel:%code-debug-info code-obj)))
(when info
(let ((sources (c::debug-info-source info)))
- (format t (intl:gettext "~&On ~A it was compiled from:")
- (format-universal-time nil
- (c::debug-source-compiled
- (first sources))
- :style :iso8601))
+ (when sources
+ (format t (intl:gettext "~&On ~A it was compiled from:")
+ (format-universal-time nil
+ (c::debug-source-compiled
+ (first sources))
+ :style :iso8601)))
(dolist (source sources)
(let ((name (c::debug-source-name source)))
(ecase (c::debug-source-from source)
=====================================
tests/issues.lisp
=====================================
--- a/tests/issues.lisp
+++ b/tests/issues.lisp
@@ -298,3 +298,15 @@
(assert-eql (length in-string) (length out-string))
(assert-equal in-string out-string)))))
+
+
+(define-test issue.30
+ (:tag :issues)
+ (let* ((test-file #.(merge-pathnames #p"resources/issue-30.lisp" cl:*load-pathname*))
+ (fasl-file (compile-file-pathname test-file)))
+ ;; Compiling and loading the test file should succeed without
+ ;; errors.
+ (assert-true (pathnamep test-file))
+ (assert-true (pathnamep fasl-file))
+ (assert-equalp (list fasl-file nil nil)
+ (multiple-value-list (compile-file test-file :load t)))))
=====================================
tests/resources/issue-30.lisp
=====================================
--- /dev/null
+++ b/tests/resources/issue-30.lisp
@@ -0,0 +1,4 @@
+(defun foo ()
+ (print "Hello world"))
+
+(describe 'foo)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/a5175917df91f875c88e7206757f3903ff05707b...f810fc97740f2bd1405247fcc2dc56a0b00be8d7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20160908/919cd557/attachment-0001.html>
More information about the cmucl-cvs
mailing list