Re: missing methods
Christopher Stacy <[email protected]> Thu, 2 Apr 2026 08:00:12 -0400
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============7471087595903297228==
Content-Type: multipart/alternative;
boundary="------------0MM7qk2lCP96Hdo8a1yizzxC"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------0MM7qk2lCP96Hdo8a1yizzxC
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 4/2/26 7:30 AM, Michał Herda | Keepit wrote:
> Compiling Lisp code is not equivalent to loading it.
>
> Compilation causes only compile-time side effects, so e.g. macro
> definitions become loaded into the compiler during compilation; plenty
> of other stuff is not, unless there's an explicit EVAL-WHEN
> :COMPILE-TOPLEVEL surrounding the forms.
>
> If you want your code to be loaded, you need to /actually/ load it.
> Doesn't matter if it's a single file or a whole ASDF system.
Most of the system was seemingly loaded,
because all the functions and variables
(hundreds of them) not just macros
were defined and working.
Only those two methods were sometimes,
depending on their order in the source file,
one right after the other,
are not getting defined.
My system is a library, and after compiling it,
I compiled (but did not ask to load) a second
system that :depends-on it. Both the library
and the subsequent application are loaded,
with all their thousands of functions.
Except for the mystery methods in the library.
All the other functions and stuff in that same
library source file with the defmethods
are also loaded.
I thought ASDF was loading the system for me,
because all I ever said was COMPILE, and yet
everything is always there and working.
Except for the mystery methods.
My recent Eureka with calling LOAD-SYSTEM
was some kind of fake-out. It did not actually
solve the problem. Actually, I had tried that
before to no avail, now that I think about it.
So it's still not solved.
I will again try to create a smaller system to
replicate the bug.
I am beginning to wonder if this is some kind
of ASDF bug, though. But how could that affect
just two methods out of a hundred methods
and hundreds more functions and macros?
That would seem to indicate the compiler.
By the way, I've been a full-time Lisp developer for over 45 years (and
been programming since 1972). That certainly doesn't mean I can't do
something dumb, but I do know which end is up.
--------------0MM7qk2lCP96Hdo8a1yizzxC
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 4/2/26 7:30 AM, Michał Herda |
Keepit wrote:<br>
</div>
<blockquote type="cite"
cite="mid:VI0PR03MB104207C91160116B08F594BF8C451A@VI0PR03MB10420.eurprd03.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Compiling Lisp code is not equivalent to loading it.</div>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Compilation causes only compile-time side effects, so e.g. macro
definitions become loaded into the compiler during compilation;
plenty of other stuff is not, unless there's an explicit
EVAL-WHEN :COMPILE-TOPLEVEL surrounding the forms.</div>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you want your code to be loaded, you need to <i>actually</i> load
it. Doesn't matter if it's a single file or a whole ASDF system.<br>
</div>
</blockquote>
Most of the system was seemingly loaded,<br>
because all the functions and variables<br>
(hundreds of them) not just macros<br>
were defined and working.<br>
<br>
Only those two methods were sometimes,<br>
depending on their order in the source file,<br>
one right after the other,<br>
are not getting defined.<br>
<br>
My system is a library, and after compiling it,<br>
I compiled (but did not ask to load) a second<br>
system that :depends-on it. Both the library<br>
and the subsequent application are loaded,<br>
with all their thousands of functions.<br>
Except for the mystery methods in the library.<br>
All the other functions and stuff in that same<br>
library source file with the defmethods<br>
are also loaded.<br>
<br>
I thought ASDF was loading the system for me,<br>
because all I ever said was COMPILE, and yet<br>
everything is always there and working.<br>
Except for the mystery methods.<br>
<br>
My recent Eureka with calling LOAD-SYSTEM<br>
was some kind of fake-out. It did not actually<br>
solve the problem. Actually, I had tried that<br>
before to no avail, now that I think about it.<br>
<br>
So it's still not solved.<br>
I will again try to create a smaller system to<br>
replicate the bug.<br>
<br>
I am beginning to wonder if this is some kind<br>
of ASDF bug, though. But how could that affect<br>
just two methods out of a hundred methods<br>
and hundreds more functions and macros?<br>
That would seem to indicate the compiler.<br>
<br>
By the way, I've been a full-time Lisp developer for over 45 years
(and been programming since 1972). That certainly doesn't mean I
can't do something dumb, but I do know which end is up.<br>
<br>
</body>
</html>
--------------0MM7qk2lCP96Hdo8a1yizzxC--
--===============7471087595903297228==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============7471087595903297228==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help
--===============7471087595903297228==--