Skip to content

[DON'T MERGE] Moves syntax errors to the semantic analysis for supporting both Cypher25 and Cypher5 #1438

[DON'T MERGE] Moves syntax errors to the semantic analysis for supporting both Cypher25 and Cypher5

[DON'T MERGE] Moves syntax errors to the semantic analysis for supporting both Cypher25 and Cypher5 #1438

Triggered via pull request November 27, 2024 14:13
Status Failure
Total duration 5m 53s
Artifacts 1

ci.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

13 errors
Run eslint and check formatting
Process completed with exit code 1.
src/tests/syntaxValidation/semanticValidation.test.ts > Semantic validation spec > Transpiled semantic analysis includes the syntactic errors: packages/language-support/src/tests/syntaxValidation/semanticValidation.test.ts#L10
AssertionError: expected [] to deeply equal [ { …(4) } ] - Expected + Received - Array [ - Object { - "message": "Invalid input 'METCH': expected 'FOREACH', 'ALTER', 'ORDER BY', 'CALL', 'CREATE', 'LOAD CSV', 'START DATABASE', 'STOP DATABASE', 'DEALLOCATE', 'DELETE', 'DENY', 'DETACH', 'DROP', 'DRYRUN', 'FINISH', 'GRANT', 'INSERT', 'LIMIT', 'MATCH', 'MERGE', 'NODETACH', 'OFFSET', 'OPTIONAL', 'REALLOCATE', 'REMOVE', 'RENAME', 'RETURN', 'REVOKE', 'ENABLE SERVER', 'SET', 'SHOW', 'SKIP', 'TERMINATE', 'UNWIND', 'USE' or 'WITH' (line 1, column 1 (offset: 0))", - "offsets": Object { - "end": 18, - "start": 0, - }, - "range": Object { - "end": Object { - "character": 18, - "line": 0, - }, - "start": Object { - "character": 0, - "line": 0, - }, - }, - "severity": 1, - }, - ] + Array [] ❯ src/tests/syntaxValidation/semanticValidation.test.ts:10:42
src/tests/syntaxValidation/semanticValidation.test.ts > Semantic validation spec > Does not trigger semantic errors when there are syntactic errors: packages/language-support/src/tests/syntaxValidation/semanticValidation.test.ts#L36
AssertionError: expected [] to deeply equal [ { …(4) } ] - Expected + Received - Array [ - Object { - "message": "Unrecognized keyword. Did you mean MATCH?", - "offsets": Object { - "end": 5, - "start": 0, - }, - "range": Object { - "end": Object { - "character": 5, - "line": 0, - }, - "start": Object { - "character": 0, - "line": 0, - }, - }, - "severity": 1, - }, - ] + Array [] ❯ src/tests/syntaxValidation/semanticValidation.test.ts:36:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Misspelt keyword at the beginning of the statement: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L7
AssertionError: expected [] to deeply equal [ { …(4) } ] - Expected + Received - Array [ - Object { - "message": "Unrecognized keyword. Did you mean MATCH?", - "offsets": Object { - "end": 5, - "start": 0, - }, - "range": Object { - "end": Object { - "character": 5, - "line": 0, - }, - "start": Object { - "character": 0, - "line": 0, - }, - }, - "severity": 1, - }, - ] + Array [] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:7:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Misspelt keyword too different from the ones we know about does not trigger an error rewording: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L32
AssertionError: expected [] to deeply equal [ { …(4) } ] - Expected + Received - Array [ - Object { - "message": "Expected any of ALTER, CALL, CREATE, DEALLOCATE, DELETE, DENY, DETACH, DROP, DRYRUN, ENABLE, EXPLAIN, FINISH, FOREACH, GRANT, INSERT, LIMIT, LOAD, MATCH, MERGE, NODETACH, OFFSET, OPTIONAL, ORDER, PROFILE, REALLOCATE, REMOVE, RENAME, RETURN, REVOKE, SET, SHOW, SKIP, START, STOP, TERMINATE, UNWIND, USE, USING or WITH", - "offsets": Object { - "end": 3, - "start": 0, - }, - "range": Object { - "end": Object { - "character": 3, - "line": 0, - }, - "start": Object { - "character": 0, - "line": 0, - }, - }, - "severity": 1, - }, - ] + Array [] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:32:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Misspelt keyword at the end of the statement: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L58
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ Array(1) ] - Expected + Received Array [ Object { - "message": "Unexpected token. Did you mean WHERE?", + "message": "Query cannot conclude with MATCH (must be a RETURN clause, a FINISH clause, an update clause, a unit subquery call, or a procedure call with no YIELD).", "offsets": Object { "end": 21, - "start": 17, + "start": 0, }, "range": Object { "end": Object { "character": 21, "line": 0, }, "start": Object { - "character": 17, + "character": 0, "line": 0, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:58:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Misspelt keyword in the middle of the statement: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L83
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ Array(1) ] - Expected + Received Array [ Object { - "message": "Unexpected token. Did you mean WHERE?", + "message": "Query cannot conclude with MATCH (must be a RETURN clause, a FINISH clause, an update clause, a unit subquery call, or a procedure call with no YIELD).", "offsets": Object { - "end": 21, - "start": 17, + "end": 36, + "start": 0, }, "range": Object { "end": Object { - "character": 21, + "character": 36, "line": 0, }, "start": Object { - "character": 17, + "character": 0, "line": 0, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:83:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Syntax validation error in a multiline query: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L112
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ { …(4) } ] - Expected + Received Array [ Object { - "message": "Expected any of '}', AND, CALL, CREATE, DELETE, DETACH, FINISH, FOREACH, INSERT, LIMIT, LOAD, MATCH, MERGE, NODETACH, OFFSET, OPTIONAL, OR, ORDER, REMOVE, RETURN, SET, SKIP, UNION, UNWIND, USE, WITH, XOR or an expression", + "message": "Invalid input 'n': expected an expression, 'FOREACH', 'ORDER BY', 'CALL', 'CREATE', 'LOAD CSV', 'DELETE', 'DETACH', 'FINISH', 'INSERT', 'LIMIT', 'MATCH', 'MERGE', 'NODETACH', 'OFFSET', 'OPTIONAL', 'REMOVE', 'RETURN', 'SET', 'SKIP', 'UNION', 'UNWIND', 'USE', 'WITH' or '}' (line 3, column 47 (offset: 113))", "offsets": Object { - "end": 114, + "end": 148, "start": 113, }, "range": Object { "end": Object { - "character": 47, - "line": 2, + "character": 20, + "line": 3, }, "start": Object { "character": 46, "line": 2, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:112:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Misspelt keyword in the middle of the statement: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L138
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ Array(1) ] - Expected + Received Array [ Object { - "message": "Unexpected token. Did you mean WHERE?", + "message": "Query cannot conclude with MATCH (must be a RETURN clause, a FINISH clause, an update clause, a unit subquery call, or a procedure call with no YIELD).", "offsets": Object { - "end": 21, - "start": 17, + "end": 36, + "start": 0, }, "range": Object { "end": Object { - "character": 21, + "character": 36, "line": 0, }, "start": Object { - "character": 17, + "character": 0, "line": 0, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:138:47
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Syntax validation errors on missing label expression: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L460
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ { …(4) } ] - Expected + Received Array [ Object { - "message": "Expected a node label / rel type", + "message": "Invalid input ')': expected a node label/relationship type name, '$', '%' or '(' (line 1, column 10 (offset: 9))", "offsets": Object { - "end": 10, + "end": 17, "start": 9, }, "range": Object { "end": Object { - "character": 10, + "character": 17, "line": 0, }, "start": Object { "character": 9, "line": 0, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:460:7
src/tests/syntaxValidation/syntacticValidation.test.ts > Syntactic validation spec > Syntax validation errors shows correctly for SHOW commands: packages/language-support/src/tests/syntaxValidation/syntacticValidation.test.ts#L553
AssertionError: expected [ { severity: 1, …(3) } ] to deeply equal [ { …(4) } ] - Expected + Received Array [ Object { - "message": "Expected any of ALIAS, ALIASES, ALL, BTREE, BUILT, CONSTRAINT, CONSTRAINTS, CURRENT, DATABASE, DATABASES, DEFAULT, EXIST, EXISTENCE, EXISTS, FULLTEXT, FUNCTION, FUNCTIONS, HOME, INDEX, INDEXES, KEY, LOOKUP, NODE, POINT, POPULATED, PRIVILEGE, PRIVILEGES, PROCEDURE, PROCEDURES, PROPERTY, RANGE, REL, RELATIONSHIP, ROLE, ROLES, SERVER, SERVERS, SETTING, SETTINGS, SUPPORTED, TEXT, TRANSACTION, TRANSACTIONS, UNIQUE, UNIQUENESS, USER, USERS or VECTOR", + "message": "Invalid input '': expected 'ALIAS', 'ALIASES', 'ALL', 'CONSTRAINT', 'CONSTRAINTS', 'DATABASE', 'DEFAULT DATABASE', 'HOME DATABASE', 'DATABASES', 'EXIST', 'EXISTENCE', 'FULLTEXT', 'FUNCTION', 'FUNCTIONS', 'BUILT IN', 'INDEX', 'INDEXES', 'KEY', 'LOOKUP', 'NODE', 'POINT', 'POPULATED', 'PRIVILEGE', 'PRIVILEGES', 'PROCEDURE', 'PROCEDURES', 'PROPERTY', 'RANGE', 'REL', 'RELATIONSHIP', 'ROLE', 'ROLES', 'SERVER', 'SERVERS', 'SETTING', 'SETTINGS', 'SUPPORTED', 'TEXT', 'TRANSACTION', 'TRANSACTIONS', 'UNIQUE', 'UNIQUENESS', 'USER', 'CURRENT USER', 'USERS' or 'VECTOR' (line 1, column 5 (offset: 4))", "offsets": Object { "end": 4, "start": 4, }, "range": Object { "end": Object { "character": 4, "line": 0, }, "start": Object { "character": 4, "line": 0, }, }, "severity": 1, }, ] ❯ src/tests/syntaxValidation/syntacticValidation.test.ts:553:7
E2E tests
neo4j-for-vscode#test:e2e: command (/home/runner/work/cypher-language-support/cypher-language-support/packages/vscode-extension) /usr/local/bin/npm run test:e2e exited (1)
E2E tests
Process completed with exit code 1.

Artifacts

Produced during runtime
Name Size
playwright-report Expired
197 KB