CL-PACKAGE-LOCKS
A unified way of dealing with package locks on those implementations that support them (or that's the eventual goal anyways).

I would say it's in the spirit of other compatibility layers, but since not all implementations support package locks it really can't be considered a ANSI compatibility layer.

Background

The need for this library came up when trying to load LISA on SBCL and encountering a package lock violation. Looking around I didn't see a package that provided a uniform way of dealing with the problem across multiple implementations.

Supported Implementations

Currently only SBCL has been tested (with :sb-package-locks enabled), but untested code is in place for acl, cmucl, and clisp.

Source

Can be fetched from my github repo.

If a request comes to package it, I'll do so.

Tips

Many times the forms that are needing WITHOUT-PACKAGE-LOCKS or WITH-PACKAGES-UNLOCKED often need to be wrapped in an EVAL-WHEN like so:

(eval-when (:compile-toplevel :load-toplevel :execute)
  (without-package-locks
    (try-not :to #(break stuff) "here")))

Thanks

To Zach Beane for QuickProject as well as his license file, which I tweaked a bit. Zach if you'd like me to change anything about the license, let me know.


Topics: language extension