jshs2
jshs2 copied to clipboard
The thrift dependency is bloated
The npm thrift project is not packaged for library use, and it requires about 30 megs of space. It's fine for devDependencies but should not be used for production (distribution) builds.
This is just a copy of the whole thrift repo, basically: https://www.npmjs.com/package/thrift
That's overkill, when we only need the JS thrift client.
@Downchuck Your right, we don't need to whole thrift for jshs2. I will check it after change thrift to node-thrift.
@imjuni I've not found a minimal distribution of thrift on npm. Have you had any success?
@Downchuck I've to confused between node-thrift and thrift. I think [email protected] is more than suitable for jshs2. But I will find more suitable library for jshs2.
@imjuni I've not found a thrift package that's appropriate. I think they both include the full set of source code for thrift, including code for go, java, php and python.
https://issues.apache.org/jira/browse/THRIFT-3485 https://github.com/apache/thrift/pull/741
@Downchuck I was to check the https://github.com/apache/thrift/pull/741, node-thrift 0.9.3 is not solve fat library problem. And I was to check https://github.com/apache/thrift/commit/f264884901d0e2a1197ae1511ee0fa0b8ca0d2aa, I see that commit log in this command,
> mkdir -p /tmp/thrift-module
> cp -r node_modules/thrift/lib/nodejs/{lib,README.md} /tmp/thrift-module
> du -sh /tmp/thrift-module
208K /tmp/thrift-module
If you need compact library at this time, you make compact library self. jshs2 aim to general and convenience, not aged like another library. So I don't want fix it this time. Sorry about that. But I will check node-thrift version or update, I will apply that.
thx.