Remove apache::thrift::Client<Foo>::header_ methods by default

Summary:
Re-do of D60793177 with the `fb303_core.thrift`-related stuff fixed. This prevents build failures like:
```
$ buck2 build servicefoundry/experimental/marios:thrift-ast
Action failed: fbcode//servicefoundry/experimental/marios:thrift-ast-thrift/qos_basecontroller_test.thrift (genrule_thrift)
Local command returned non-zero exit code 1
Reproduce locally: `env -- 'ASAN_OPTIONS=detect_leaks=0,detect_odr_violation=0' 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/fbcod ...<omitted>... ervicefoundry/experimental/marios/__thrift-ast-thrift/qos_basecontroller_test.thrift__/sh/genrule.sh (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
ln: ./thrift: cannot overwrite directory
```
Which is caused by Thrift files being in a different directory than their owning `TARGETS` file.

This enforces the contract outlined in {D60782227}. In short, we're going to stop generating `AsyncClient::header_*` variants of methods. We've already added annotations for existing code that use the `header_*` methods. As long as the builds don't break, this is deleting unused code. This should help us reclaim some binary size headroom so we can implement `ClientInterceptor`s.

Reviewed By: sazonovkirill

Differential Revision: D61552181

fbshipit-source-id: 1b460dfb425aa93afcb90cefdaae8def5abb866c
This commit is contained in:
Pranjal Raihan 2024-08-29 13:18:27 -07:00 committed by Facebook GitHub Bot
parent 3f9f422a1c
commit bf1c11ffdd

View File

@ -49,12 +49,15 @@ service BaseService {
/**
* Gets the status of this service
*/
fb303_status getStatus() (priority = 'IMPORTANT');
fb303_status getStatus() (
priority = 'IMPORTANT',
cpp.generate_deprecated_header_client_methods,
);
/**
* Returns a descriptive name of the service
*/
string getName();
string getName() (cpp.generate_deprecated_header_client_methods);
/**
* Returns the version of the service