I’m getting style warnings for undefined functions when using IMPORT or SHADOWING-IMPORT.
The package where this occurs is split in two files. An „interface“ and an „implementation“ part.
The „interface“ file is compiled first and it defines the package and uses IMPORT-FROM for some functions.
The „implementation“ part imports more functions via IMPORT / SHADOWING-IMPORT (after IN-PACKAGE).
When compiling, or loading via ASDF I’m getting the ‚undefined function‘ style warnings where the functions are used in the „implementation“ file.
But why? Looking at the package symbols (do-symbols) the functions are there.
I could of course also import those function via IMPORT-FROM, in which case I don’t get warnings.
But the functions are not yet used there, so I only want to import those in the file that extends the package.
Cheers,
Manfred
_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
;bar.lisp
;---------
(defpackage :bar
(:use :cl)
(:export #:bar1
#:bar2))
(in-package :bar)
(defun bar1 ()
(format t "bar1~%"))
(defun bar2 ()
(format t "bar2~%"))
;foo1.lisp
;----------
(defpackage :foo
(:use :cl)
(:import-from #:bar
#:bar1))
(in-package :foo)
;foo2.lisp
;-----------
(in-package :foo)
(shadowing-import '(bar:bar2))
(bar1)
(bar2) ;; style-warning
So I’m not sure why the style warning for (bar2).
Anyone knows?
Cheers,
Manfred