Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Remove relative path checks in thrift includes #160

Merged
merged 7 commits into from Oct 4, 2018

Conversation

rajeshsegu
Copy link
Contributor

Rest of the thriftrw language clients have support for just having include "typedefs.thrift" instead of specifying relative path as in include "./typedefs.thrift"

@CLAassistant
Copy link

CLAassistant commented Oct 4, 2018

CLA assistant check
All committers have signed the CLA.

@kriskowal
Copy link
Contributor

kriskowal commented Oct 4, 2018

Does this preclude the possibility of supporting an IDL root path in the future? Have we surveyed the behavior of the Apache Thrift implementations? Do they all resolve paths relative to the file, or the working directory of the generator?

test/include.js Outdated Show resolved Hide resolved
test/include.js Show resolved Hide resolved
thrift.js Outdated
var ns = def.namespace && def.namespace.name;
var filename = path.join(this.dirname, def.id);

// If include isn't name, get filename sans *.thrift file extension.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still forbid paths that start with /.

thrift.js Outdated Show resolved Hide resolved
test/include.js Outdated Show resolved Hide resolved
Copy link
Contributor

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an entry to the changelog and land.

@kriskowal kriskowal merged commit a8f9550 into thriftrw:master Oct 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants