Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yitzchak/trivial-package-locks
A standard interface to the various package lock implementations of Common Lisp.
https://github.com/yitzchak/trivial-package-locks
common-lisp package-lock
Last synced: 5 days ago
JSON representation
A standard interface to the various package lock implementations of Common Lisp.
- Host: GitHub
- URL: https://github.com/yitzchak/trivial-package-locks
- Owner: yitzchak
- License: mit
- Created: 2021-12-18T17:42:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T15:27:18.000Z (4 months ago)
- Last Synced: 2024-12-04T15:40:05.592Z (2 months ago)
- Topics: common-lisp, package-lock
- Language: Common Lisp
- Homepage:
- Size: 21.5 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# trivial-package-locks
A standard interface to the various package lock implementations. Currently
supported implementations are ACL, CLISP, CMUCL, ECL and SBCL. On all other
implementations the following functions are exported but will evaluate to a
NOOP where appropriate.## Package Locks Interface
Implementations that support this interface will have the keyword
`:package-locks` present in `*features*`.```common-lisp
(package-locked-p &optional (package *package*)) => lock-state
(setf (package-locked-p &optional (package *package*)) new-lock-state)
```Accesses the lock state of a package. `t` indicates that the package is
locked and `nil` indicates that it is not locked.```common-lisp
(without-package-locks &body body) => results
```Disables the checking of package locks during the evaluation of `body`.
For implementations that do not have the ability to disable all package
locks via a dynamic variable `(list-all-packages)` will be used to unlock
each package before the evaluation of `body` and then relock each package
that was locked after the evaluation of `body`. For implementations that
do not have package locks but have some other mechanism to prevent changes
to the kernel that mechanism will be disabled.```common-lisp
(with-unlocked-packages (&rest packages) &body body) => results
```Unlocks and relocks each of the named `packages` around the evaluation of
`body`.```common-lisp
(with-locked-packages (&rest packages) &body body) => results
```Locks and then unlocks each of the named `packages` around the evaluation of
`body`.## Implementation Packages Interface
Implementations that support this interface will have the keyword
`:implementation-packages` present in `*features*`. Currently ACL and SBCL
are the only implementations that support this interface.```common-lisp
(package-implementation-packages (&optional (package *package*)) => packages
(setf (package-implementation-packages &optional (package *package*)) packages)
```Accesses the list of packages that are considered implementation packages of
`package`.```common-lisp
(package-implements-package-p (implementation-package
&optional (package *package*)) => state
(setf (package-implements-package-p implementation-package
&optional (package *package*))
new-state)
```Access the implementation state of an individual package.