Point to enry and github/linguist
From @ajnavarro yesterday (more):
- I have the necessity of know the language of the file before hand to use bblfsh
- talk about enry on bblfsh documentation to fill that necessity
Somewhere in the documentation we should clarify that when we choose language keys, we use github/linguist as reference (languages.yml) and both enry in Go and linguist in Ruby will do the job if language detection is needed before passing to Babelfish.
This is actually not true that you need to know the language to parse files. Bblfshd will autodetect it if it's empty. Need to clarify this.
@dennwc Sure, but when you specify a language, we use language names as defined in enry.
when you specify a language, we use language names as defined in enry.
This is actually not true (currently) for Bash: https://github.com/bblfsh/bash-driver/issues/39#issuecomment-411044197
Could somebody please help me understand, what are the action items here now?
If that is to mention the language auto-detection + usage of enry/linguist language names on client API level - would https://docs.sourced.tech/babelfish/using-babelfish/clients be a good place for adding a new section on language detection? (Open to any other suggestions as well)
@bzz IMHO it would be mentioning how the language field works in requests:
- if empty, it autodetects using
src-d/enry. - it can be any language as defined in drivers: point to https://docs.sourced.tech/babelfish/languages ?
Not sure if it belongs to client or to the protocol description. Or even both.
@smola I see! But could you please help me understand how is that different from what we have in https://docs.sourced.tech/babelfish/using-babelfish/babelfish-protocol#parserequest ?
the client must provide ... the programming language in the language field (which must be one of the languages currently supported) or empty to enable auto-detection)
From what I can see, it's:
- the link to Enry is missing
- field Key from https://docs.sourced.tech/babelfish/languages is not mentioned
If that is all that's needed - will be happy to add it asap.
@bzz Yeah, a mention to the key would be enough I guess. Also, mention what's the behaviour regarding case sensitiveness (or lack of it).