Skip to content

Commit 919353d

Browse files
ahilgerfacebook-github-bot
authored andcommitted
in-place migrate thrift-py3 [1/2]
Summary: __Context__: Thrift has two separate but complementary efforts underway to facilitate thrift-py3 migration to thrift-python. The in-place migrate option is a *fully interface compatible* evolution of thrift-py3 to remove as much Cython as possible. For more info, see this [post](https://fb.workplace.com/groups/3562416237359961/permalink/4069004626701117/). __Benefit__: ***2.5x faster build*** An incremental thrift build currently takes 3 minutes total on trunk, dominated by the cxx1-py3-types build, which takes ~2.5 minutes between the cython compiler and the cxx_compile. With these changes, the time is reduced to 1 minute total. Repro (on D77409225): ``` buck build @//mode/opt //glean/client/py3/example:example ``` Used py3_inplace codemod script to turn on in-place migrate for glean, since it's a relatively isolated build graph, w/r/t thrift_library edges only. This change requires updating the glean sync codegen to put the option in generated `thrift_library` TARGETS file. Ran the sync script and verified the `thrift_py3_options` is the only thing that changed: ``` ./glean/schema/sync ``` #buildall Reviewed By: pepeiborra Differential Revision: D77401593 fbshipit-source-id: ad7b821876a6c123570daf516a4172936bbab1b5
1 parent 8f419e3 commit 919353d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

glean/schema/gen/Glean/Schema/Gen/Thrift.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ genTargets slashVn info oncall =
9797
"\"types_cpp_splits=" <> cppSplits <> "\""
9898
] <> "],"
9999
, " thrift_py_options = \"utf8strings\","
100+
, " thrift_py3_options = [\"inplace_migrate\"],"
100101
, " languages = [" <> Text.intercalate ", " langs <> "],"
101102
, " thrift_srcs = { \"" <> namespace <> ".thrift\" : [] },"
102103
, " deps = [" <> Text.intercalate ","

0 commit comments

Comments
 (0)