Google: we open Code Search for Go, Angular, Dart, Flutter, TensorFlow and more

 

Technology: Developers can now search some of Google's major open-source projects. This is a great way to move their code development forward at high speed.

Google is implementing Code Search for many of its most popular open-source projects, giving its developer community what was until now one of Google's most popular internal tools. Code Search or "CS" for Google open-source projects currently supports Angular, Bazel, Dart, ExoPlayer, Firebase SDK, Flutter, Go, gVisor, Kythe, Nomulus, Outline and Tensorflow. Which in the end represents only a small part of Google's open source projects.

Code Search for Google's open-source projects follows the development and launch of a public code search interface for Android and Chromium projects. Kris Hildrum of Google's Code Search team said that Google plans to provide Code Search for other projects in the future.

 

According to Hildrum, Google engineers use Code Search on a daily basis to understand the code base, for example, to search for half-memorized features, to find out what the feature they are looking at is called, and to find out when a line of code has been changed. There is also a "blame" button that highlights the last user who changed each line of code.

A very powerful and selective search function

When users type a term, the search box offers on-the-fly suggestions with code object type, repository and path. For example, users who want to search for a "foo" function in a Google file can specify "lang:go function:foo" to avoid searching for files where foo is just a comment. Other filters include case sensitive, class name, content, file, and symbol.

Most popular languages can also be filtered, including C++, C, Java, Kotlin, Python, JavaScript, Go, JSON, HTML, Objective-C, Dart, Jango, Perl, PHP, PowerShell, Ruby, shell, SQL and Swift. Some open source code repositories have cross-references enabled by Kythe, Google's open-source tool for creating development tools. Projects with cross-references include Bazel, Go, gVisor, Kyth, Nomulus and Tensorflow.

"Open-source communities use a broader set of build systems than Google. To facilitate cross-referencing, Kythe has added drop-in support for Bazel, CMake, Maven and Go," Hildrum noted. "Projects using other build systems can use the packages provided by Kythe for clang and javac to instrument their builds; these are used by Chromium and Android AOSP to provide build information for Kythe.

Source : zdnet.fr