×

Google Announces a New Revamped Cloud Source Repositories in Beta

MMS Founder
MMS RSS

Article originally posted on InfoQ. Visit InfoQ

Google announced it is bringing code search with the newly revamped Cloud Source Repositories in beta availability. The overhaul of the service means an entirely new user interface and semantic code search capabilities.

The beta available Cloud Source Repositories is according to the announcement powered by the same underlying code search infrastructure that Google engineers perform their code searches on every day. Furthermore, code search in Cloud Source Repositories also uses the same document indexing and retrieval technologies that Google uses for their Search. Hence, this service can improve developer productivity, whether the code resides in Cloud Source Repositories or a developer mirrors their code from the cloud versions of GitHub or Bitbucket.

With Cloud Source Repositories developers have the benefit of leveraging the Google Search technology for their code base search – using a single query over all owned repositories either mirrored or added to Cloud Source Repositories. Furthermore, Cloud Source Repositories take identity and access management (IAM) permissions into account and do not show any code to developers who do not have access to view it. Also, Cloud Source Repositories support RE2 regular expressions in search patterns, allowing developers to perform complex search queries.


Source: https://cloud.google.com/blog/products/application-development/introducing-new-cloud-source-repositories

When a developer submits a search query in code search, that query goes to a root machine and sharded to hundreds of leaf machines. The query processing involves matching by file names, classes, functions and other symbols, and matching of the context and the namespace of the symbols. Note that search works across all languages. However, the semantic understanding of sources which enhances search is limited to Java, JavaScript, Go, C++, Python, TypeScript and Proto files.

Furthermore, if developers use a regular expression, then the code search runs an optimized algorithm to find potential matches for the regular expression quickly. Subsequently, it refines the results against the full regular expression to find the actual matches. Russell Wolf, product manager, said in a Hacker News thread on the announcement of Cloud Source Repositories in beta:

The more code you have, the more benefit you get from having fast search tools across your entire code base that can perform complex semantic and regular expression queries. Even with smaller codebases, I find it the fastest way to find the code I need.

Developers can try Cloud Source Repositories through the Google Cloud Platform (GCP) free trial and free tier. Furthermore, developers can create a new empty repository or mirror their code from the cloud version of GitHub or Bitbucket.
 

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.