Replace github-linguist with go-enry
Gitaly uses github-linguist
to implement the "Commit.Languages" RPC. This shells out to a Ruby binary on demand. The performance of the DetectRepositoryLanguagesWorker
has been frequently mentioned as an issue in scalability discussions (cc @oswaldo).
We've been looking at alternatives in various languages (like tokei
which is written in Rust and was suggested by @poffey21
), but we've landed at https://github.com/go-enry/go-enry. It's written in pure Go and is fully compatible with github-linguist as it uses the same heuristics.
Edited by Toon Claes