Skip to content

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

[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 #1441

Triggered via pull request November 27, 2024 18:16
Status Failure
Total duration 4m 47s
Artifacts 1

ci.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

13 errors
src/tests/consoleCommands.test.ts > command parser also handles cypher > can split cypher into statements: packages/language-support/src/tests/consoleCommands.test.ts#L26
AssertionError: expected [ { type: 'cypher', …(2) }, …(2) ] to deeply equal [ { …(2) }, …(2) ] - Expected + Received Array [ Object { - "statement": "CALL db.info()", + "statement": "CALL db.info();", "type": "cypher", + "version": undefined, }, Object { - "statement": "RETURN 123", + "statement": "RETURN 123;", "type": "cypher", + "version": undefined, }, Object { "statement": "SHOW DATABASES", "type": "cypher", + "version": undefined, }, ] ❯ expectParsedCommands src/tests/consoleCommands.test.ts:26:5 ❯ src/tests/consoleCommands.test.ts:655:5
src/tests/consoleCommands.test.ts > command parser also handles cypher > can weave cypher with cmds: packages/language-support/src/tests/consoleCommands.test.ts#L26
AssertionError: expected [ …(6) ] to deeply equal [ …(6) ] - Expected + Received Array [ Object { "database": "neo4j", "type": "use", }, Object { "parameters": Array [ Object { "expression": "23", "name": "x", }, ], "type": "set-parameters", }, Object { - "statement": "RETURN $x", + "statement": "RETURN $x;", "type": "cypher", + "version": undefined, }, Object { "database": "system", "type": "use", }, Object { - "statement": "SHOW DATABASES", + "statement": "SHOW DATABASES;", "type": "cypher", + "version": undefined, }, Object { "statement": "", "type": "cypher", }, ] ❯ expectParsedCommands src/tests/consoleCommands.test.ts:26:5 ❯ src/tests/consoleCommands.test.ts:663:5
src/tests/cypherVersion.test.ts > Cypher versions spec > SHOW INDEXES should error on BRIEF OUTPUT: packages/language-support/src/tests/cypherVersion.test.ts#L193
AssertionError: expected [ { severity: 1, …(3) }, …(1) ] to deeply equal [ { …(4) }, { …(4) } ] - Expected + Received Array [ Object { "message": "`SHOW INDEXES` no longer allows the `BRIEF` and `VERBOSE` keywords, - please omit `BRIEF` and use `YIELD *` instead of `VERBOSE`. (line 1, column 14 (offset: 13))", + please omit `BRIEF` and use `YIELD *` instead of `VERBOSE`. (line 1, column 14 (offset: 13))", "offsets": Object { "end": 40, "start": 27, }, "range": Object { "end": Object { "character": 39, "line": 1, }, "start": Object { "character": 26, "line": 1, }, }, "severity": 1, }, Object { "message": "Invalid input 'BRIEF': expected 'SHOW', 'TERMINATE', 'WHERE', 'YIELD' or <EOF> (line 1, column 14 (offset: 13))", "offsets": Object { "end": 81, "start": 68, }, "range": Object { "end": Object { "character": 40, "line": 2, }, "start": Object { "character": 27, "line": 2, }, }, "severity": 1, }, ] ❯ src/tests/cypherVersion.test.ts:193:42
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": "Invalid input 'WERE': expected a graph pattern, 'FOREACH', ',', 'ORDER BY', 'CALL', 'CREATE', 'LOAD CSV', 'DELETE', 'DETACH', 'FINISH', 'INSERT', 'LIMIT', 'MATCH', 'MERGE', 'NODETACH', 'OFFSET', 'OPTIONAL', 'REMOVE', 'RETURN', 'SET', 'SKIP', 'UNION', 'UNWIND', 'USE', 'USING', 'WHERE', 'WITH' or <EOF> (line 1, column 18 (offset: 17))", "offsets": Object { "end": 21, "start": 17, }, "range": Object { "end": Object { "character": 21, "line": 0, }, "start": Object { "character": 17, "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": "Invalid input 'WERE': expected a graph pattern, 'FOREACH', ',', 'ORDER BY', 'CALL', 'CREATE', 'LOAD CSV', 'DELETE', 'DETACH', 'FINISH', 'INSERT', 'LIMIT', 'MATCH', 'MERGE', 'NODETACH', 'OFFSET', 'OPTIONAL', 'REMOVE', 'RETURN', 'SET', 'SKIP', 'UNION', 'UNWIND', 'USE', 'USING', 'WHERE', 'WITH' or <EOF> (line 1, column 18 (offset: 17))", "offsets": Object { - "end": 21, + "end": 36, "start": 17, }, "range": Object { "end": Object { - "character": 21, + "character": 36, "line": 0, }, "start": Object { "character": 17, "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
Run eslint and check formatting
Process completed with exit code 1.
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
198 KB