-
-
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
"caddy add-package" could allow adding by version #6549
Comments
Note sure if it's a bug but Maybe it should match how the standard modules look, which is tidy and also importantly able to be parsed by the space delimiter, for basic automation:
Here is the current output: caddy list-modules --packages --versions
...
tls.stek.standard v2.8.4 github.com/caddyserver/caddy/v2
Standard modules: 121
exec v0.0.0-20240603212820-a42a5b2ae10f github.com/abiosoft/caddy-exec
http.handlers.exec v0.0.0-20240603212820-a42a5b2ae10f github.com/abiosoft/caddy-exec
Non-standard modules: 2
Unknown modules: 0 |
What do you mean "double listing"? Nothing is doubled there. Do you mean |
To me, it looks like it is the same module. but listed on 2 lines. Also the same version. Relevant code is here ? Line 360 in dcbf38d
|
They are separate. One is a Caddy app, the other is an http handler directive. Both come from the same package of course. |
So it’s 2 lines of the same package ? Did you decide what it is ?
Either way . It seems confusing visually to me. Probably to others too . What would you suggest we do ? |
Yes it's these two modules:
There's nothing confusing here. It's working exactly as intended. One is an App, one is HTTP handler, like I said. See the README for that package to understand the difference. The App is for "global config" and the handler is for per-site config. |
Reopening since we could still allow specifying versions in the command |
Hey @mholt do you mean that your open to adding a version flag ? |
It should probably match the xcaddy CLI syntax I think, i.e. |
Beat me to it, but yeah I think symmetry with the xcaddy CLI would be a good idea. |
At the moment we cant control the version of the package added ?
The golang module system could allow us to add by tag or branch.
I expect many developers would want to use a tag ( as in git tag ) to help remediate supply channel attacks or other things of this nature.
This would bring it inline with the
list-modules --packages --versions
command, which is version aware, so that its all consistent and all commands are version aware.list-modules --packages --versions Standard modules: 121 exec v0.0.0-20240603212820-a42a5b2ae10f github.com/abiosoft/caddy-exec http.handlers.exec v0.0.0-20240603212820-a42a5b2ae10f github.com/abiosoft/caddy-exec Non-standard modules: 2
There is no point making
caddy remove-package
version aware since the binary can only have one version of a package.final look and feel
For example, its is currently:
with versioning it becomes :
The text was updated successfully, but these errors were encountered: