menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Open Source News

>

Indexing c...
source image

Fb

5d

read

237

img
dot

Image Credit: Fb

Indexing code at scale with Glean

  • Meta has released Glean, an open-source code indexing system. Glean can extract information about source code and produce it to developer tools through an efficient query language. Developed by Facebook to navigate scale on efficiently, Glean has since been expanded for use within Meta to better build code browsing, search, and documentation generation.
  • Code indexing, the job of collecting data from code, is essential for navigating code, such as code navigation (“Go to definition”) in an IDE or code browser; code documentation; and code analysis tools, such as dead code detection or linting.
  • The larger the codebase, the more important it is to do code indexing ahead of time as it becomes impractical to have the IDE process all the code at startup. Glean has been developed as a centralized indexing infrastructure that can power many powerful developer tools.
  • Glean’s query language is very general, enabling it to extend beyond just code navigation. Storing arbitrary language-specific data provides powerful elements such as detecting dead code, while providing a language-neutral view of the data.
  • Glean allows for incremental indexing, addressing the perennial problem of providing up-to-date data about the latest code. We can’t make indexing alertary, but Glean enables processing just the changes, obtaining O(changes) over O(repository).
  • Glean has been deployed within Meta to better build code browsing, search, and documentation generation. Our target was C++ developers initially due to the long compile times but we imagine other languages following the same path in the future. Glean can also be used to detect and remove dead code, track progress on API migrations, and automate data removal.
  • Glean is open-source and available for use. There’s a growing number of ad-hoc queries made by people and systems to solve a variety of problems, thanks to Glean’s general concept.

Read Full Article

like

14 Likes

For uninterrupted reading, download the app