Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srcd parse: do not check the list of languages #449

Merged
merged 2 commits into from
Apr 22, 2019

Conversation

carlosms
Copy link
Contributor

This is a workaround for #297.

The command now does not try to check if the file language is in the list of bblfsh drivers. But if bblfsh reports that the parsing failed because of a missing driver, engine will still print the same nice error message with the current list of supported languages.

It works for

  • enry c# -> bblfsh csharp
  • enry c++ -> bblfsh cpp.

It still fails for

  • enry shell -> bblfsh bash.

Unfortunately now that the tests parse the cpp and csharp files, they fail, so I had to disable them.
See bblfsh/cpp-driver#31, bblfsh/bblfshd#259

@@ -123,6 +110,12 @@ func (cmd *parseUASTCmd) Execute(args []string) error {
}

if err != nil {
if strings.Contains(err.Error(), "missing driver for language") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have an issue in bblfsh to export this error instead of strings.Contains?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait. this is an issue in engine about aliasing.

I'm talking about an issue in bblfsh-sdk / bblfsh-go-client that would differentiate lang not found error from any other error.
I don't see any link or any conversation about it in 297.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlosms ping

Copy link
Contributor

@smacker smacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind to merge this but on another hand, it doesn't fix anything...

@carlosms carlosms merged commit c940c28 into src-d:master Apr 22, 2019
@carlosms carlosms deleted the 297-workaround branch April 22, 2019 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants