<div dir="ltr">Hi<div><br></div><div>I am developing a simple package system and stumbled in the issue described below:</div><div><br></div><div>Very rudimentary description (by example) of the simple package system:</div>
<div><br></div><div>Files:</div><div> /root</div><div> foo.lisp</div><div> bar.lisp</div><div> tools/</div><div> upcase.lisp</div><div><br></div><div>File foo.lisp <<</div><div>@::use (common-lisp bar tools/upcase)</div>
<div>;; everything after this point and before the next @::public is not exported</div><div>....</div><div>@::public<br></div><div>;; everything after this point is exported (external)</div><div>(defun foofun (a) ...)</div>
<div>>> end file</div><div><br></div><div><div>File bar.lisp <<</div><div>@::use (common-lisp tools/upcase)</div><div>;;; private section</div><div>(defun ....) ....</div><div>@::public</div><div>;; public section</div>
<div>(defun barfun (a) ...)</div><div>>> end file</div></div><div><br></div><div>File upcase.lisp <<</div><div>@::use (common-lisp)</div><div>;;; private section</div><div>....</div><div>@::public</div><div>;;; public section</div>
<div>....</div><div>>> end file</div><div><br></div><div>Now from ccl</div><div>? (mb:use 'foo) </div><div>;; this will create a package "/ROOT/FOO.LISP" with nickname "FOO"</div><div>;; along all packages (files) used by foo (/ROOT/BAR.LISP, </div>
<div>;; /ROOT/TOOLS/UPCASE.LISP) in @::use instruction</div><div><br></div><div>All created packages has a symbol **MB-PACKAGE-TIMESTAMP** that is equal to the creation time of the package</div><div><br></div><div><br></div>
<div>Now, the issue (or annoyance) I encountered is the following:</div><div><br></div><div><div><div>(make-package :test1 :use :common-lisp)</div></div><div><div>(make-package :test2 :use :common-lisp)</div></div><div>(in-package :test2)</div>
<div>(defun foo (e) (if (eq e 'azerty) 'ok))</div><div>(export 'foo)</div><div>(in-package :test1)</div><div>(use-package :test2)</div><div>? (foo 'test2::azerty)<br></div></div><div><div>TEST2::OK</div><div>
? (foo 'azerty)</div><div>NIL</div><div>? </div></div><div><br></div><div>I understand that this is how it should be. </div><div><br></div><div>But this poses an issue for me, because I have to use</div><div>(string= (symbol-name e) "AZERTY") in foo:</div>
<div><br></div><div>(defun foo (e) (if (string= (symbol-name e) "AZERTY") 'ok))<br></div><div><br></div><div>But then the 'ok will be returned as TEST2::OK, this means that TEST1 package has to use symbol-name and intern it</div>
<div><br></div><div>This is annoying, how do you solve this issue</div><div><br></div><div>Thanks for your help</div><div><br></div><div>Taoufik</div><div><br></div></div>