jshs2 icon indicating copy to clipboard operation
jshs2 copied to clipboard

The thrift dependency is bloated

Open Downchuck opened this issue 9 years ago • 6 comments

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 avatar Jan 04 '16 07:01 Downchuck

@Downchuck Your right, we don't need to whole thrift for jshs2. I will check it after change thrift to node-thrift.

imjuni avatar Jan 26 '16 02:01 imjuni

@imjuni I've not found a minimal distribution of thrift on npm. Have you had any success?

Downchuck avatar Jan 31 '16 20:01 Downchuck

@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 avatar Feb 03 '16 05:02 imjuni

@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.

Downchuck avatar Feb 03 '16 07:02 Downchuck

https://issues.apache.org/jira/browse/THRIFT-3485 https://github.com/apache/thrift/pull/741

Downchuck avatar Feb 03 '16 07:02 Downchuck

@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.

imjuni avatar Feb 05 '16 02:02 imjuni