Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support "exports" for thrift targets #4564
Currently, with "exports" feature, if exported targets of a dependency are thrift targets, then they are directly added to strict dependencies list of the dependee. However, only library targets will be added to classpaths during compilation, thus we need to do a conversion from thrift target to its corresponding synthetic target and then add to dependee's strict dependencies list.
If a target A has dependency on a thrift target B, then the synthetic target of B will be injected to A's dependency list as well. Thus we can iterate over A's dependency list to find the synthetic target for B.
When iterating over a target's exports list, if an exports target is a thrift target, the above logic will be executed to yield a synthetic target as exports target.
All the logic is in 'src/python/pants/backend/jvm/tasks/jvm_compile/compile_context.py'.