mgl-pax icon indicating copy to clipboard operation
mgl-pax copied to clipboard

Add ability to reexport nested sections

Open daewok opened this issue 3 years ago • 1 comments

I have some projects that define multiple packages (both with and without package-inferred-systems). In many of these cases, I want these packages to be an implementation detail the user shouldn't have to care about, so I reexport all the symbols from some toplevel package.

Complicating things, some packages export symbols that are meant for project-internal use only. So I can't use the :reexport option of uiop:define-package to do what I want.

I'd like to use mgl-pax for this since I have defsections in each package that document the symbols that should be exported from the top-level. But unless I'm missing something, it's not really possible to use mgl-pax to reexport all those public symbols.

I currently work around this with my own defsection that basically expands to mgl-pax:defsection but has another key :export-children. If :export-children is non-NIL, then all the symbols exported by any referenced section are also exported. If you think such a feature would be useful to upstream, I'd be happy to put together a PR.

daewok avatar May 17 '21 19:05 daewok

Sounds like a useful feature. As far as I can tell right now, the proposed addition of an :export-children argument to defsection is the way to go.

melisgl avatar Oct 10 '21 22:10 melisgl