-
Notifications
You must be signed in to change notification settings - Fork 18
Manual update to 2026.04 artifacts #671
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
Changes from all commits
a302862
5f4b9aa
0d37e70
6c03be3
4f083cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@neo4j-cypher/language-support": patch | ||
| "@neo4j-cypher/lint-worker": patch | ||
| --- | ||
|
|
||
| Update grammar and semantic analysis to 2026.04 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,6 +107,7 @@ clause | |
| | withClause | ||
| | filterClause | ||
| | unwindClause | ||
| | forListClause | ||
| | letClause | ||
| | callClause | ||
| | subqueryClause | ||
|
|
@@ -265,6 +266,10 @@ unwindClause | |
| : UNWIND expression AS variable | ||
| ; | ||
|
|
||
| forListClause | ||
| : FOR variable IN expression | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think we should add formatter handling for this new clause. Realised that we didnt consider this for a lot of new rules in the past, so thinking maybe I skip it for now and have a look at it all at once later? (this also lets us get in the updated artifacts to upx quicker - before the browser bundling on thursday)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made a linear card about it here https://linear.app/neo4j/issue/DEV-534/look-into-formatting-of-new-rules-from-grammar-updates
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PS. I think it can be confusing that I made changes in |
||
| ; | ||
|
|
||
| letClause | ||
| : LET letItem (COMMA letItem)* | ||
| ; | ||
|
|
@@ -544,6 +549,7 @@ expression8 | |
|
|
||
| expression7 | ||
| : expression6 comparisonExpression6? | ||
| | propertyExistsPredicate | ||
| ; | ||
|
|
||
| // Making changes here? Consider looking at extendedWhen too. | ||
|
|
@@ -558,7 +564,7 @@ comparisonExpression6 | |
| | IS NOT? NULL # NullComparison | ||
| | (IS NOT? (TYPED | COLONCOLON) | COLONCOLON) type # TypeComparison | ||
| | IS NOT? normalForm? NORMALIZED # NormalFormComparison | ||
| | labelExpression # LabelComparison | ||
| | (IS NOT? LABELED? | COLON) labelExpression4 # LabelComparison | ||
| ; | ||
|
|
||
| normalForm | ||
|
|
@@ -779,6 +785,10 @@ existsExpression | |
| : EXISTS LCURLY (queryWithLocalDefinitions | matchMode? patternList whereClause?) RCURLY | ||
| ; | ||
|
|
||
| propertyExistsPredicate | ||
| : PROPERTY_EXISTS LPAREN variable COMMA propertyKeyName RPAREN | ||
| ; | ||
|
|
||
| countExpression | ||
| : COUNT LCURLY (queryWithLocalDefinitions | matchMode? patternList whereClause?) RCURLY | ||
| ; | ||
|
|
@@ -2288,6 +2298,7 @@ unescapedSymbolicNameString_ | |
| | JOIN | ||
| | KEY | ||
| | LABEL | ||
| | LABELED | ||
| | LABELS | ||
| | LANGUAGE | ||
| | LEADING | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -745,25 +745,6 @@ meaning that it expects at least 3 arguments of types NODE, STRING, ANY | |
| dbSchema: testData.mockSchema, | ||
| }), | ||
| ).toEqual([ | ||
| { | ||
| severity: 1, | ||
| message: | ||
| 'Procedure call inside a query does not support naming results implicitly (name explicitly using `YIELD` instead)', | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like semantic analysis got smart enough to realise the procedure doesnt yield any columns at all, so this error doesnt make sense. Added another test below with a procedure that does have return columns |
||
| range: { | ||
| start: { | ||
| line: 1, | ||
| character: 8, | ||
| }, | ||
| end: { | ||
| line: 2, | ||
| character: 36, | ||
| }, | ||
| }, | ||
| offsets: { | ||
| start: 9, | ||
| end: 73, | ||
| }, | ||
| }, | ||
| { | ||
| message: 'Type mismatch: expected Integer but was String', | ||
| offsets: { | ||
|
|
@@ -804,24 +785,39 @@ meaning that it expects at least 1 argument of type STRING | |
| }, | ||
| severity: 1, | ||
| }, | ||
| ]); | ||
| }); | ||
|
|
||
| test('Provides "name explicitly using `YIELD` instead" error when calling procedure inside query, if call has return columns', () => { | ||
| const query = ` | ||
| MATCH (n) | ||
| CALL db.schema.visualization() | ||
| RETURN n | ||
| `; | ||
| expect( | ||
| getDiagnosticsForQuery({ | ||
| query, | ||
| dbSchema: testData.mockSchema, | ||
| }), | ||
| ).toEqual([ | ||
| { | ||
| severity: 1, | ||
| message: | ||
| 'Procedure call inside a query does not support naming results implicitly (name explicitly using `YIELD` instead)', | ||
| offsets: { | ||
| end: 57, | ||
| start: 27, | ||
| }, | ||
| range: { | ||
| start: { | ||
| end: { | ||
| character: 38, | ||
| line: 2, | ||
| character: 8, | ||
| }, | ||
| end: { | ||
| start: { | ||
| character: 8, | ||
| line: 2, | ||
| character: 28, | ||
| }, | ||
| }, | ||
| offsets: { | ||
| start: 53, | ||
| end: 73, | ||
| }, | ||
| severity: 1, | ||
| }, | ||
| ]); | ||
| }); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| neo4j-2026.03 | ||
| neo4j-2026.04 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not forgetting it this time! |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had a clash with oxfmtrc for cypher.json. This file called oxfmt on all .json files, but oxfmtrc (rightly, since it's generated) removed cypher.json, causing an "Expected at least one target file"-error.