I have an ASDF system with the following code in it:
;; testproj.asd
(asdf:defsystem #:testproj
:serial t
:components ((:file "testproj")))
;; testproj.lisp
(defpackage #:testproj
(:use #:cl))
(in-package #:testproj)
(defun baz (x) x)
(defun bar ()
(macrolet ((mac ()
(baz 100)))
(mac)))
When I try to load it, SBCL sometimes complains that the function BAZ is undefined when trying to expand the macro, but sometimes it doesn't. I can't seem to reproduce this behavior when loading testproj.lisp directly, but I guess it doesn't prove much, since I can't reliably reproduce it otherwise, either. Am I doing something wrong and incurring undefined behavior? Is this a bug with ASDF/SBCL? What is going on? :S