I agree with Christophe, though the point stands that if you use a library that doesn't lock its packages ... things are currently harder than necessary to protect against.
Might be we could extend package locking in the inverse direction:
(defpackage :foo (:use :cl :some-big-unlocked-package) (:restrict t))
(in-package :foo)
(defun from-big-unlocked-package ...)
=> error "Restriction on package :FOO violated while redefining BIG:FROM-BIG..."
Ie. a "restricted package" works as if all other packages were locked, while in it.
I agree with Christophe, though the point stands that if you use a library that doesn't lock its packages ... things are currently harder than necessary to protect against.
Might be we could extend package locking in the inverse direction:
(defpackage :foo unlocked- package)
(:use :cl :some-big-
(:restrict t))
(in-package :foo)
(defun from-big- unlocked- package ...)
=> error "Restriction on package :FOO violated while redefining BIG:FROM-BIG..."
Ie. a "restricted package" works as if all other packages were locked, while in it.