Fixed bugs in Go thrift generation with services

Review Request #4177 - Created Aug. 20, 2016 and submitted

Matt Dee

Fixed bugs in Go thrift generation with services

Previously Pants would fail to work correctly for Go projects which tried to use Thrift services. This fixes two bugs related to that, and modifies a test to fail without these changes:

1) service_deps: the old way of accessing it raises an exception if service_deps is not found, but clearly None is expected when not found. The get function fixes this.

2) directory structure when symlinking files. Previously, the basename was always used as the place where the files were supposed to go. However, thrift generates a directory structure with services, and that is lost, leading to compile issues. But making source_iter contain a tuple of (source, relative_path_of_destination), we fix this issue.

Added a test that failed, confirmed that fixes make the test pass.

Matt Dee
Matt Dee
Stu Hood
Matt Dee
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 8dd2df9915a3d05d064d11ef674b5851ed9989ca