-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Huge dependency #1847
Comments
some result through goweight |
It should be better we thinking to use other msgpack libraries instead of it. |
Just realized just the same thing. That's ridiculously large for a hello world http server. I would argue that MsgPack support shouldn't be part of core Gin anyway. It's not a super common format like Json. Some goes probably for IMHO it would make more sense to have a gin-msgpack and gin-protobuf dependency. Looking at it this would probably require making default content-type bindings and renderers plugable, but this seems to be a good idea anyway... |
i agree, those dependencies should be someway optional or as another plugin package, in most cases i don't think a user would need those dependencies. |
Good frameworks are built up in modules. As we don't expect gin to have other useful stuff like jwt, it shouldn't include by default a relatively more obscure encoding for no reason, in my own opinion. |
So I don't really like the build tags option either. Last thing I want to think about is all the build tags we end up adding add then having to support in the future. Now that binding has been refactored into a nice interface. Seems like we should be able to get all none builtin encoding's moved out into something that registers itself with |
@dmarkham the build flag is mainly to have non-breaking optimization but a system like sql drivers should be better and should not be that difficult to setup. The most difficult point would be the current select of content-type in the binding module. The rest could already be 'pluggable' but that would break reverse compat with older version and would need a v2 versioning. |
@sapk technically I don't think msgpack / protobuff have been in a released yet. They are being proposed to be included in With that being said, I don't feel super strongly about it, and I guess I would been better if i thought about it back when #1479 was getting talked about. |
If you remove github.com/ugorji/go/codec, it will automatically build faster for me. |
About the issue, I may remove
|
And |
Using go 1.12, latest version of gin to date, I analysed my executable and I see that 11MB are occupied by the dependency
github.com/ugorji/go/codec
. Does really gin need all of this package?The text was updated successfully, but these errors were encountered: