[
https://issues.apache.org/jira/browse/THRIFT-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953657#comment-14953657
]
ASF GitHub Bot commented on THRIFT-3380:
----------------------------------------
GitHub user mattwiller opened a pull request:
https://github.com/apache/thrift/pull/651
THRIFT-3380 nodejs Fix broken transport and protocol requires
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mattwiller/thrift package_json_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/651.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #651
----
commit 811a33320e3421f06f29ef2cae20eb917da4ae95
Author: Matt Willer <[email protected]>
Date: 2015-10-12T20:06:23Z
THRIFT-3380 nodejs Fix broken transport and protocol requires
----
> nodejs: 0.9.2 -> 0.9.3 upgrade breaks Protocol and Transport requires
> ---------------------------------------------------------------------
>
> Key: THRIFT-3380
> URL: https://issues.apache.org/jira/browse/THRIFT-3380
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Library
> Affects Versions: 0.9.3
> Reporter: Matt Willer
> Priority: Critical
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> Node.js projects that depend on Thrift and need to use a specific transport
> or protocol must require them in separately, like this:
> {code}
> var thrift = require('thrift'),
> ThriftTransports = require('thrift/lib/thrift/transport');
> {code}
> The new version (0.9.3) changed that directory structure of the thrift module
> so that the transport file is now located at
> thrift/lib/nodejs/lib/thrift/transport.js, which breaks any application that
> was requiring it at the old path. This type of breaking change is
> inappropriate for a patch version, and should be fixed immediately.
> The directory structure change also has the undesirable side effect of
> including every single language implementation of thrift in the Node.js
> module, bloating the size of the module with unnecessary files.
> Long-term, the right fix for this is to export useful parts of the library
> (e.g. transport and protocol constructors) from the main file, but since this
> is a patch version the immediate fix should be to maintain existing behavior.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)