From 7904ec572527f6c65a42d9b23c45697b891bff6b Mon Sep 17 00:00:00 2001 From: John Mallery Date: Tue, 7 Apr 2026 08:34:29 +0200 Subject: [PATCH] Export slot names from http2/core used cross-package by with-slots payload-streams.lisp (in-package http2/stream-overlay) references slot names connection, peer-window-size, state, output-buffer, network-stream, and window-size via with-slots. These symbols are internal to http2/core. Per ANSI CL, :use only inherits exported symbols. Currently this works because mgl-pax:define-package shares all symbols, but with standard defpackage the with-slots forms would intern fresh symbols in http2/stream-overlay that don't match the actual slot names, causing slot-missing errors at runtime. Export the six slot names from http2/core so cross-package with-slots references resolve correctly regardless of the package definition macro used. This also enables downstream users who subclass http2-stream from other packages to access these slots without double-colon qualification. --- package.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package.lisp b/package.lisp index 8af824f..b161381 100644 --- a/package.lisp +++ b/package.lisp @@ -21,7 +21,13 @@ (:import-from #:mgl-pax #:defsection #:glossary-term #:section #:define-glossary-term) (:import-from :alexandria - #:read-stream-content-into-string #:read-stream-content-into-byte-vector)) + #:read-stream-content-into-string #:read-stream-content-into-byte-vector) + ;; Slot names referenced by with-slots in http2/stream-overlay + ;; (payload-streams.lisp). Without this export, :use only inherits + ;; exported symbols per ANSI CL, and with-slots would intern fresh + ;; symbols that don't match the actual slot names. + (:export #:connection #:peer-window-size #:window-size #:state + #:output-buffer #:network-stream)) (mgl-pax:define-package #:http2/cl+ssl (:use #:cl #:http2/core #:cl+ssl #:mgl-pax #:http2/openssl))