11.1.5 Operations Violating Package Locks
11.1.5.1 Operations on Packages
The following actions cause a package lock violation if the package
operated on is locked, and *package*
is not an implementation
package of that package, and the action would cause a change in the
state of the package (so e.g. exporting already external symbols is
never a violation). Package lock violations caused by these operations
signal errors of type sb-ext:package-locked-error
.
- Shadowing a symbol in a package.
- Importing a symbol to a package.
- Uninterning a symbol from a package.
- Exporting a symbol from a package.
- Unexporting a symbol from a package.
- Changing the packages used by a package.
- Renaming a package.
- Deleting a package.
11.1.5.2 Operations on Symbols
Following actions cause a package lock violation if the home package
of the symbol operated on is locked, and *package*
is not an
implementation package of that package. Package lock violations caused
by these action signal errors of type
sb-ext:symbol-package-locked-error
.
These actions cause only one package lock violation per lexically
apparent violated package.
Example:
;;; Packages FOO and BAR are locked.
;;;
;;; Two lexically apparent violated packages: exactly two
;;; package-locked-errors will be signalled.
(defclass foo:point ()
((x :accessor bar:x)
(y :accessor bar:y)))
- Binding or altering its value lexically or dynamically, or
establishing it as a symbol-macro.
Exceptions:
- If the symbol is not defined as a constant, global symbol-macro or a
global dynamic variable, it may be lexically bound or established as a
local symbol macro.
- If the symbol is defined as a global dynamic variable, it may be
assigned or bound.
- Defining, undefining, or binding it, or its setf name as a function.
Exceptions:
- If the symbol is not defined as a function, macro, or special operator
it and its setf name may be lexically bound as a function.
- Defining, undefining, or binding it as a macro or compiler macro.
Exceptions:
- If the symbol is not defined as a function, macro, or special operator
it may be lexically bound as a macro.
- Defining it as a type specifier or structure.
- Defining it as a declaration with a declaration proclamation.
- Declaring or proclaiming it special.
- Declaring or proclaiming its type or ftype.
Exceptions:
- If the symbol may be lexically bound, the type of that binding may be
declared.
- If the symbol may be lexically bound as a function, the ftype of that
binding may be declared.
- Defining a setf expander for it.
- Defining it as a method combination type.
- Using it as the class-name argument to setf of find-class.
- Defining it as a hash table test using
sb-ext:define-hash-table-test
.