Move thrift language/rpc validation to codegen implementations

Review Request #3876 - Created May 12, 2016 and submitted

Information
Stu Hood
pants
3411, 3418
3823
Reviewers
pants-reviews
dturner-tw, patricklaw, peiyu

In the current engine, it's not possible to validate in a Target constructor the different ways that it might be consumed. For example, previously apache thrift would blindly accept 'finagle' as the rpc_style, but continue to generate synchronous code.

Additionally, as demonstrated on https://rbcommons.com/s/twitter/r/3823/ , this created an unnecessary coupling, because adding support for a new language to scrooge required modifying the target type it consumed.

  • Move language validation to individual codegen implementations.
  • Tested invalid language/rpc_style

https://travis-ci.org/pantsbuild/pants/builds/130751457
http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3418/2/

David Turner
Stu Hood
David Turner
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 9de33cfa066a938887fac2ecf0b8ccd702dc3aaf

(both ci failures are in unrelated tests, and appear to be network related)

Loading...