[ 
https://issues.apache.org/jira/browse/THRIFT-5937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-5937.
--------------------------------
    Fix Version/s: 0.23.0
       Resolution: Fixed

> nodejs episodic generation does not handle extending services 
> --------------------------------------------------------------
>
>                 Key: THRIFT-5937
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5937
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.21.0, 0.22.0
>            Reporter: Carel
>            Assignee: Carel
>            Priority: Major
>             Fix For: 0.23.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The episodic compilation added in THRIFT-4809 does not handle extending 
> services.
> The generated code imports services relative and not based on the generated 
> episode. 
> This also applies when generating TS code, the `reference path` is relative 
> which is not correct.
> For a service that extends from the episode the following is generated
> {code}
> const BaseService_ttypes = require('<package_name>/<path>/BaseService_types');
> const BaseService = require('./BaseService');
> {code}
> The above must be
> {code}
> const BaseService_ttypes = require('<package_name>/<path>/BaseService_types');
> const BaseService = require('<package_name>/<path>/BaseService');
> {code}
> The same is seen in the "*.d.ts" can be seen
> {code}
> /// <reference path="BaseService.d.ts" />
> ...
> import BaseService_ttypes = 
> require('<package_name>/<path>/BaseService_types');
> ...
> import BaseService = require('./BaseService');
> {code}
> That should probably not contain the reference from what I understand since 
> it is for relative paths to become
> {code}
> ...
> import BaseService_ttypes = 
> require('<package_name>/<path>/BaseService_types');
> ...
> import BaseService = require('<package_name>/<path>/BaseService');
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to