Confusing error message when :LOCAL-NICKNAMES is given an unknown package
Minimal repro:
(uiop:define-package confusing
(:local-nicknames (#:foo #:this-package-doesnt-exist)))
=>
The name NIL does not designate any package.
[Condition of type SB-KERNEL:SIMPLE-PACKAGE-ERROR]
Restarts:
0: [RETRY] Retry SLY mREPL evaluation request.
1: [*ABORT] Return to SLY's top level.
2: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {1003AA4EB3}>)
Backtrace:
0: (SB-IMPL::SIGNAL-PACKAGE-ERROR "CONFUSING" "The name ~S does not designate any package." NIL)
1: (SB-IMPL::%ADD-PACKAGE-LOCAL-NICKNAME "FOO" NIL #<PACKAGE "CONFUSING">)
2: (ADD-PACKAGE-LOCAL-NICKNAME "FOO" NIL #<PACKAGE "CONFUSING">)
This is SBCL's (in this case) built-in error, so the wording is slightly different between implementations. It seems to be caused by UIOP:INSTALL-PACKAGE-LOCAL-NICKNAMES
calling FIND-PACKAGE
and blindly passing its return value to ADD-PACKAGE-LOCAL-NICKNAME
.