Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to reexport nested sections #13

Open
daewok opened this issue May 17, 2021 · 1 comment
Open

Add ability to reexport nested sections #13

daewok opened this issue May 17, 2021 · 1 comment

Comments

@daewok
Copy link

daewok commented May 17, 2021

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.

@melisgl
Copy link
Owner

melisgl commented Oct 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants