fiasco icon indicating copy to clipboard operation
fiasco copied to clipboard

Fix define-test-package for abcl

Open appleby opened this issue 4 years ago • 0 comments

Copy/paste commit message:

Remove MAKE-PACKAGE call from DEFINE-TEST-PACKAGE

This was causing failures on ABCL. Previously, DEFINE-TEST-PACKAGE would define the package twice, once by calling MAKE-PACKAGE during the macro expansion, and once by including a DEFPACKAGE in the form returned by the macro expansion. The call to MAKE-PACKAGE at macro expansion time specified :USE NIL whereas the DEFPACKAGE would include any :USE clauses specified by the caller, plus an additional '(:USE :CL :FIASCO).

From the hyperspec entry for DEFPACKAGE

If defined-package-name already refers to an existing package, the name-to-package mapping for that name is not changed. If the new definition is at variance with the current state of that package, the consequences are undefined; an implementation might choose to modify the existing package to reflect the new definition. If defined-package-name is a symbol, its name is used.

Although many implementations take the suggested approach of updating the package to reflect the new definition, ABCL seemingly does not and thus the PACKAGE-USE-LIST of the resulting package would remain empty.

appleby avatar Jan 01 '22 23:01 appleby