You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently at google they have enabled scanning #include directives in C/C++ files in bazel to perform dependency inference, but this isn't expected to be open sourced anytime soon (source: a bazel dev crashed a twitter conference once). We would love to be able to perform dep inference in pants's more well-supported languages such as python and scala by scanning import statements, but C/C++ has the benefit (?) that preprocessor directives can be parsed with simple regular expressions, which means it can be done without resorting to a compiler.
Dependency inference in general can be used to avoid typing out deps in BUILD files, which improves correctness, but it also allows for extremely granular virtual targets to be synthesized (single-file, potentially), which means without any effort on the part of the developer we can achieve the minimum invalidation possible upon edits to C/C++ sources.
With #7136 addressed, and especially with almost-magical process execution caching via #7171, this means we can obviate a lot of the need for C++ compilers to be made fast by making use of a powerful build tool, which lets compiler hackers get back to hacking compilers.
Closing because Pants does not currently support C++ to begin with. If/once we have a C++ backend in Pants 2.0, then this ticket would be relevant to re-open.
Apparently at google they have enabled scanning
#include
directives in C/C++ files in bazel to perform dependency inference, but this isn't expected to be open sourced anytime soon (source: a bazel dev crashed a twitter conference once). We would love to be able to perform dep inference in pants's more well-supported languages such as python and scala by scanningimport
statements, but C/C++ has the benefit (?) that preprocessor directives can be parsed with simple regular expressions, which means it can be done without resorting to a compiler.Dependency inference in general can be used to avoid typing out deps in BUILD files, which improves correctness, but it also allows for extremely granular virtual targets to be synthesized (single-file, potentially), which means without any effort on the part of the developer we can achieve the minimum invalidation possible upon edits to C/C++ sources.
With #7136 addressed, and especially with almost-magical process execution caching via #7171, this means we can obviate a lot of the need for C++ compilers to be made fast by making use of a powerful build tool, which lets compiler hackers get back to hacking compilers.
#include
scanning and deprecate explicitly-declared dependenciesThe text was updated successfully, but these errors were encountered: