-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
cmd: Unwrap adapter modules to get underlying modules #5624
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks for this!
I was kind of thinking that we should rethink this command...
Technically, by "modules" I mean "config modules" i.e. an extension of the configuration.
I wonder if this command should actually be "list-plugins" to list all the plugins.
Or maybe the semantics shouldn't matter and we should just print everything.
The problem is that config adapters don't keep the same interface as a Caddy module... so we'd have to figure that out.
Can we talk about a fix where we don't wrap the adapters in the first place? I think I'd like that better. 😁
You mean adapters are not part of modules, and will not show as so. However, they will show in the new They are of course affected by add / remove package commands. |
What should be the definition of a plugin? Maybe just |
Well, I'm not sure if a new |
Revisiting this...
Are you sure this doesn't work? It should still "plug in" the adapters and download the resulting build, even if they don't appear in the list. I still hesitate to print adapters as if they were config modules with names like I think perhaps there is a solution, but probably not this PR. I hope that's OK. Thank you for working on this nonetheless. What I think we should do instead, to describe the config adapters supported by a Caddy build, is to properly set the Accept header in the admin API, since the Content-Type header is what determines which config adapters to use. I'm going to close this, but we can open a new PR to set the Accept header. Thanks for understanding, @WeidiDeng. You are great. |
Fix 5621.
In addition, this also fixed several
add(remove)-package
related commands as they can't be used to add or remove adapter related modules.Before,
After,