Live data from Hacker News

Kythe: A pluggable ecosystem for building tools that work with code

kythe.io

21–22 of 22 posts

Re: Kythe: A pluggable ecosystem for building tools that work with code

#21
post #18

Kythe seems like an awesome project, and kudos to Google for releasing this in the open. For those interested in code analysis and dev tools, another library you might want to check out is srclib (I'm one of the authors). srclib is an open-source polyglot code analysis library designed for editors and code explorers. Its mission, supporting a common language-independent schema to support building better language-awar…

My usecase is that I have c# and java code that call each other but I need some kind of checker that validates "yes, the c# method signature is still compatible with the java method signature". It sounds like Kythe is the right tool for that, what is your take on that? Does srclib support something like this too? It's not as easy as it sounds because the c# or java method signature may have attributes which alter the compatability in custom ways, so I cant just compare "yes all 3 params are compatible and the name is correct". I'd have to plug in some custom logic that takes into account what the attribute does. What do you think?

Re: Kythe: A pluggable ecosystem for building tools that work with code

#22
post #21
post #18

Kythe seems like an awesome project, and kudos to Google for releasing this in the open. For those interested in code analysis and dev tools, another library you might want to check out is srclib (I'm one of the authors). srclib is an open-source polyglot code analysis library designed for editors and code explorers. Its mission, supporting a common language-independent schema to support building better language-awar…

My usecase is that I have c# and java code that call each other but I need some kind of checker that validates "yes, the c# method signature is still compatible with the java method signature". It sounds like Kythe is the right tool for that, what is your take on that? Does srclib support something like this too? It's not as easy as it sounds because the c# or java method signature may have attributes which alter the…

It's hard for me to say without more details about your specific problem. srclib does provide a Data field where information like method signatures is typically emitted, so you can compare the signature for the C# method with that of the Java one, but I'm not sure if that includes the other attributes you need to know for your problem.

If there's a lot of custom logic, then it might be better to write an ad hoc tool that checks the AST of the Java against the AST of the C#. srclib and I think also Kythe are designed for building tools that want to be language-agnostic, rather than digging into specific language behavior.

Post reply on HN