Previous: Package Locks in Compiled Code, Up: Package Lock Concepts


10.1.5 Operations Violating Package Locks

10.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.

  1. Shadowing a symbol in a package.
  2. Importing a symbol to a package.
  3. Uninterning a symbol from a package.
  4. Exporting a symbol from a package.
  5. Unexporting a symbol from a package.
  6. Changing the packages used by a package.
  7. Renaming a package.
  8. Deleting a package.
10.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)))
  1. Binding or altering its value lexically or dynamically, or establishing it as a symbol-macro.

    Exceptions:

  2. Defining, undefining, or binding it, or its setf name as a function.

    Exceptions:

  3. Defining, undefining, or binding it as a macro or compiler macro.

    Exceptions:

  4. Defining it as a type specifier or structure.
  5. Defining it as a declaration with a declaration proclamation.
  6. Declaring or proclaiming it special.
  7. Declaring or proclaiming its type or ftype.

    Exceptions:

  8. Defining a setf expander for it.
  9. Defining it as a method combination type.
  10. Using it as the class-name argument to setf of find-class.