#282: Spurious macros redefinition warnings -----------------------+---------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: new Priority: minor | Milestone: Component: compiler | Version: Keywords: | -----------------------+---------------------------------------------------- Compiling and loading a file with
{{{ (defmacro foo ()) }}}
{{{ CL-USER(1): (compile-file "foo") #P"/tmp/foo.abcl" NIL NIL CL-USER(2): (load *) STYLE-WARNING: redefining COMMON-LISP-USER::FOO in #P"/tmp/foo.lisp" (previously defined in #P"/tmp/foo.lisp") T }}}
But it's the same file, turns out, the old source is different because it has :host :unspecific.
The place where it does comparison http://trac.common- lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/fdefinition.lisp#L40
And where it sets *source* http://trac.common- lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/compile- file.lisp#L723
So, it does TRUENAME. truename sets :unspecific on non-windows platforms for pathname-host. http://trac.common- lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/Pathname.java#L2185
And the compiler saves the source patname as just (setq *source* #"path"), so :unspecific is lost when read: http://trac.common- lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/compile- file.lisp#L685
#282: Spurious macros redefinition warnings -----------------------+---------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: new Priority: minor | Milestone: Component: compiler | Version: Keywords: | -----------------------+---------------------------------------------------- Changes (by sboukarev):
* cc: stassats@… (added)
#282: Spurious macros redefinition warnings -----------------------+---------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: new Priority: minor | Milestone: 1.2.0 Component: compiler | Version: 1.2.0-dev Keywords: pathname | -----------------------+---------------------------------------------------- Changes (by mevenson):
* keywords: => pathname * version: => 1.2.0-dev * milestone: => 1.2.0
#282: Spurious macros redefinition warnings -----------------------+---------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: new Priority: minor | Milestone: 1.2.0 Component: compiler | Version: 1.2.0-dev Keywords: pathname | -----------------------+----------------------------------------------------
Comment(by sboukarev):
Should read "device", instead of "host".
#282: Spurious macros redefinition warnings ------------------------+--------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: closed Priority: minor | Milestone: 1.2.0 Component: compiler | Version: 1.2.0-dev Resolution: fixed | Keywords: pathname ------------------------+--------------------------------------------------- Changes (by mevenson):
* status: new => closed * resolution: => fixed
Comment:
(In [14403]) No longer warn on spurious redefinitions.
Fixes #282.
#282: Spurious macros redefinition warnings ------------------------+--------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: closed Priority: minor | Milestone: 1.2.0 Component: compiler | Version: 1.2.0-dev Resolution: fixed | Keywords: pathname ------------------------+---------------------------------------------------
Comment(by sboukarev):
This commit broke redefinition at the REPL: CL-USER(1): (defmacro foo ()) FOO CL-USER(2): (defmacro foo ()) #<THREAD "interpreter" {2EAC0B4}>: Debugger invoked on condition of type TYPE-ERROR The value :TOP-LEVEL is not of type (OR PATHNAME STRING FILE-STREAM SYSTEM:JAR-STREAM SYSTEM:URL-STREAM). Restarts: 0: TOP-LEVEL Return to top level. [1] CL-USER(3)
#282: Spurious macros redefinition warnings ------------------------+--------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: closed Priority: minor | Milestone: 1.2.0 Component: compiler | Version: 1.2.0-dev Resolution: fixed | Keywords: pathname ------------------------+---------------------------------------------------
Comment(by mevenson):
(In [14404]) Fix error on form redefition introduced with r14403.
Addresses #282 comment 5.
armedbear-ticket@common-lisp.net