-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement package-local nicknames #188
Conversation
Running the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, consider adding check-type assertions in the following places: find-package, %find-pkg, pkg-arg. It is not mandatory and exceeds scope of this task, but it will be beneficial to the overall quality of the code.
Thank you.
@sirherrbatka Added to the TODO list. |
I have run ACL2's
Please note that both of the runs have completed unsuccessfully (the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of trivial comments.
Notes toward confirming this builds for anyone else: I built CCL following the directions above, but the PLN tests didn't all pass for me:
Probably unrelated, but are the following warnings expected when loading the code from https://plaster.tymoon.eu/view/1144#1144 ?
They came up when I copied that code into a file and loaded it, but not when I pasted the contents into the REPL. Didn't seem to make a difference to the outcome of the tests. I assume they're harmless? |
You are correct, I can reproduce these failures. I will resolve them and these warnings before we proceed. |
@solswords I have fixed the tests - the packages created inside them were missing an explicit Currently the created packages use no packages and the test behavior should be consistent. Please verify with commit |
Yes, the CCL I previously built according to the instructions passes the new tests. |
@solswords Thanks! @pfdietz Could you take one more look at the contents of the tests, make sure that they do what they are supposed to do (they are based on SBCL sources), run them, and verify it yourself as well? |
Test test-package-local-nicknames-introspection should bind package, so its behavior is not dependent on the context in which it is run. You might consider a test that does some sanity checks with package bound to various packages, including CL, CL-USER, and KEYWORD. if INTERN is having something special happen with a compier macro, you should check that by putting a call to INTERN in a lambda and compiling that. (intern x :foo) ==> (funcall (compile () '(lambda (y) (intern y :foo))) x) and also with package bound to various things when the compiler is called. I think it is worth testing how PLNs interact with :use, :import, :export, :shadow, :shadowing-import-from, :import-from, and :intern. Do the local nicknames apply to the package specifiers in :import-from, :shadowing-import-from, and :use? Still looking the tests over, but these are first thoughts. |
I pushed some more test changes to https://github.com/pfdietz/package-local-nicknames-tests-1 This include everything in #188 until the paragraph "I think it is worth testing how PLNs...". |
I have merged the test PR and run it on the modified CCL.
I am now confident to say that package local nicknames have been tested and behave the same way on SBCL, ABCL, and CCL. What do we do next in order to merge this? |
We need to make new bootstrapping binaries very soon, but I wanted to get this in. |
Thanks! |
Thousands of thanks!! Wonderful!! |
This PR adds package-local nicknames to Clozure Common Lisp and aims to fix #111.
This implementation is adapted from SBCL code.
Bootstrapping steps:
(rebuild-ccl :full t)
The CCL image resulting from building 082ef8e passes all 16 tests specified in https://github.com/phoe/package-local-nicknames-tests.
Tested on linux64. No platform-dependent functionality was changed though, so other platforms should behave consistently.
TODO:
add✔️CHECK-TYPE
assertions tofind-package
,%find-pkg
,pkg-arg
performance tests against ACL2✔️