From 76fc4cee06f173f0a2f8bc339ec699b7d2982d2c Mon Sep 17 00:00:00 2001 From: Tagir Magomedov Date: Thu, 3 May 2018 17:15:49 +0200 Subject: [PATCH] Add java namespace to meta.thrift ## Problem The classes generated for this file in Java by thrift compiler are currently put in default package, making them unusable from any other Java package. This also means that any other thrift files that `include` this one, but declare a `java namespace` will have their thrift compilation successful, error will only be surfaced by Java compiler when those thrift files are used in Java project making chain of updates very costly. One example of a workaround is in [separate copy of this file](https://github.com/uber/tchannel-java/blob/771a42174896f6f6ca7fbb6e37a2c227cda3f3b5/tchannel-core/src/main/thrift/meta.thrift) in Java tchannel library. ## Backwards compatibility concerns I don't expect this diff breaking anything because the generated files could only be referenced from default package and that is not a widely spread practice in Java to begin with. However, repos that commit generated files in the artifacts will have a lot of their code regenerated. --- idl/github.com/uber/tchannel/meta.thrift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/idl/github.com/uber/tchannel/meta.thrift b/idl/github.com/uber/tchannel/meta.thrift index b036c1e9a..f8f8cf469 100644 --- a/idl/github.com/uber/tchannel/meta.thrift +++ b/idl/github.com/uber/tchannel/meta.thrift @@ -1,3 +1,5 @@ +namespace java com.uber.tchannel.meta + // The HealthState provides additional information when the // health endpoint returns !ok. enum HealthState {