Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

semantic: multiple transformation failures #31

Open
21 tasks
bzz opened this issue Mar 21, 2019 · 2 comments
Open
21 tasks

semantic: multiple transformation failures #31

bzz opened this issue Mar 21, 2019 · 2 comments
Labels
Milestone

Comments

@bzz
Copy link
Contributor

bzz commented Mar 21, 2019

Discovered as part of the bblfsh/bblfshd#268 (comment)

This is an ☂️ issue for driver failures due errors while semantic normalization of some files.

  • 5 string literal escape sequence handling cases semantic: string literal escape sequence handing #35
  • check: key "Prop_DeclSpecifier": unused field(s) on node CPPASTNamedTypeSpecifier: Prop_AttributeSpecifiers"
  • check: key "Prop_Declarator": key "Prop_Parameters": elem 0 (nodes.Object): unused field(s) on node CPPASTArrayDeclarator: Prop_NesteDeclarator"
  • heck: key "Prop_Declarator": key "Prop_Parameters": elem 1 (nodes.Object): unused field(s) on node CPPASTArrayDeclarator: Prop_NestedDeclarator"
  • check: key "Prop_Declarator": unused field(s) on node CPPASTFunctionDeclarator: Prop_AttributeSpecifiers"
  • check: key "Prop_Declarator": unused field(s) on node CPPASTFunctionDeclarator: Prop_Attributes"
  • check: key "Prop_Declarator": unused field(s) on node CPPASTFunctionDeclarator: TrailingComments"
  • check: unused field(s) on node CPPASTLiteralExpression: ExpandedFromMacro"
  • check: unused field(s) on node CPPASTLiteralExpression: LeadingComments"
  • check: unused field(s) on node CPPASTLiteralExpression: TrailingComments"
  • check: unused field(s) on node CPPASTName: LeadingComments"
  • check: unused field(s) on node CPPASTName: TrailingComments"
  • check: unused field(s) on node CPPASTQualifiedName: TrailingComments"
  • construct: key "@role": unhandled value: arrow -> in map[!=:
  • onstruct: key "@role": unhandled value: arrow -> in map[&&:
  • construct: key "@role": unhandled value: arrow -> in map[-:
  • construct: key "@role": unhandled value: arrow -> in map[>:
  • construct: key "@role": unhandled value: arrow -> in map[^=:
  • construct: key "@role": unhandled value: arrow -> in map[max:
  • construct: key "@role": unhandled value: arrow -> in map[unknown_operator:
  • construct: key "@role": unhandled value: arrow -> in map[|:

Normalization mapping for semantic mode needs to be updated.

The list was produced with

grep "language=cpp$" bblfshd.log | grep "error" | grep -v "native driver is not running" | grep -oP "FailedPrecondition desc = (.*) elapsed" | sort | uniq

186 files for the fixtures to reproduce the failures can be obtained with

grep "language=cpp$" bblfshd.log | grep "error" | grep -v "native driver is not running" | grep -oP "FailedPrecondition desc = \K(.*)" | sort | less
@bzz bzz added the bug label Mar 21, 2019
@bzz bzz added this to the v1.2.3 milestone Mar 21, 2019
@bzz bzz changed the title 25 semantic normalization failures semantic: multiple transformation failures Apr 15, 2019
@bzz
Copy link
Contributor Author

bzz commented Apr 15, 2019

String literal cases moved out to #35

@carlosms
Copy link

carlosms commented Apr 19, 2019

I found an issue that seems to be related to this one. Adding here in case it helps.

File hello.cpp

#include <iostream> // include API

using namespace std;

int main() // the main code portion of a C++ program
{
   cout << "Hello World" << endl;  //print Hello World on the screen 
   return 0; // conventional
}

Bblfsh image bblfsh/bblfshd:v2.12.1-drivers. Logs:

time="2019-04-19T10:25:53Z" level=error msg="request processed content 214 bytes error: rpc error: code = FailedPrecondition desc = check: key "Prop_Declarator": unused field(s) on node CPPASTFunctionDeclarator: TrailingComments" elapsed=6.92455ms filename="/home/cmartin/go/src/github.com/src-d/engine/cmdtests/testdata/hello.cpp" language=cpp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants