Adding multiple nicknames for a single package to another package, for example like this
(add-package-local-nickname "a" package2 package1)
(add-package-local-nickname "b" package2 package1)
leads to two kinds of inconsistent behavior. The first slight problem is that package2 is reported as being "nicknamed twice" by package1:
(package-locally-nicknamed-by-list "package2")
→ (#<Package "package1"> #<Package "package1">)
The second issue issue is that removing one of the local nicknames clears the locally nicknamed by list entirely:
(remove-package-local-nickname "b" "package1") → T
(package-locally-nicknamed-by-list "package2")
→ ()
I believe more consistent behavior would be like this (which is how SBCL behaves):
(add-package-local-nickname "a" package2 package1)
(add-package-local-nickname "b" package2 package1)
(package-locally-nicknamed-by-list "package2") → (#<Package "package1">)
(remove-package-local-nickname "b" "package1") → T
(package-locally-nicknamed-by-list "package2") → (#<Package "package1">)
(remove-package-local-nickname "a" "package1") → T
(package-locally-nicknamed-by-list "package2") → ()
I suggested adding a test for this behavior in this pull request.
Adding multiple nicknames for a single package to another package, for example like this
leads to two kinds of inconsistent behavior. The first slight problem is that
package2is reported as being "nicknamed twice" bypackage1:The second issue issue is that removing one of the local nicknames clears the locally nicknamed by list entirely:
I believe more consistent behavior would be like this (which is how SBCL behaves):
I suggested adding a test for this behavior in this pull request.