-
Notifications
You must be signed in to change notification settings - Fork 18.8k
pluginrpc-gen: align generator with generated #49920
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
base: master
Are you sure you want to change the base?
Conversation
92ac3a1
to
1ef9003
Compare
@thaJeztah , exclusions:
# Mode of the generated files analysis.
#
# - `strict`: sources are excluded by strictly following the Go generated file convention.
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode
# - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
# - `disable`: disable the generated files exclusion.
#
# Default: strict
generated: lax |
Oh! I recall I looked at this once as well, and ISTR there was some discussion, but I really need to refresh my memory; |
cc32dd9
to
f78ece4
Compare
Kicked CI; looks like we're hitting GitHub's new rate-limits 😓 |
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.
Mostly seems fine, except for it looks like the generator is producing some not quite correct code.
I"m not sure about the short/long as the value this accepts.
I'd think supporting a duration string would be ideal... but I guess it really doesn't matter. We could support both... or just what is here and extend as needed.
fff3777
to
3b71494
Compare
@@ -1,4 +1,4 @@ | |||
// generated code - DO NOT EDIT | |||
// Code generated by pluginrpc-gen. DO NOT EDIT. | |||
|
|||
package drivers // import "github.com/docker/docker/volume/drivers" |
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.
Except the // import "github.com/docker/docker/volume/drivers"
Everything is directly generated by pluginrpc-gen
ccbe306
to
3477465
Compare
0330c7f
to
24cab3a
Compare
8661489
to
bd795de
Compare
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
- What I did
Updated pluginrpc-gen so its behavior is aligned with the generated version in
volume/drivers/proxy.go
- How I did it
Updated code and regenerate it.
Notice that pluginrpc-gen does not handle
package {{ .Name }} // import "{{fullPackageName}}"
generation- How to verify it
go build . in pluginrpc-gen package an then execute
pluginrpc-gen --type volumeDriver --name VolumeDriver -i volume/drivers/extpoint.go -o volume/drivers/proxy.go
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)