Hacker News new | ask | show | jobs
by creachadair 4154 days ago
You can build the same tools as before -- the purpose of Kythe isn't to fundamentally change the kinds of tools you can make, it's intended to make it easier to glue those tools together.

Google uses this approach internally to generate cross-references for a huge, heterogeneous multi-language codebase. Linking across generated code, connecting documentation to its references, and exposing all those features in editors, code browsers, code-review tools, and so forth, are all a lot easier when that information has a common representation.

And of course, those problems exist even in much smaller codebases. Kythe isn't really a "product", but rather an interlanguage for tools that manipulate source code.

2 comments

Kythe isn't really a "product", but rather an interlanguage for tools that manipulate source code.

That's a concise explanation. Thanks.

Of course, the bottleneck is always in achieving widespread integration with existing tooling. Your overview lists requirements for compiler and build system instrumentation alike, as well as tools that then consume and filter the graph data. It'll be interesting to see if Kythe gains the needed mindshare for this.

It will indeed be interesting to see. :)

You're right that the work needed to connect (say) a compiler or static analyzer to (say) an editor is usually substantial.

Right now, projects typically duplicate this work over and over again, for each combination of language and editor. We've found that for a lot of common cases you can re-use the work you did to instrument a given compiler and/or editor for others to mix and match, if they can agree on a format for the data.

Obviously this doesn't work for every such problem, but in our experience it's surprisingly effective for most of the day-to-day tasks engineers need to solve, such as figuring out what will break if I commit this change to the repo.

I think a fair comparison is LLVM for developer tools.

Shared IR (graph schema) and optimizers. Pluggable front ends (syntax viewers, editors, etc.) and backends (languages).