Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f0184bc

Browse files
authoredDec 20, 2023
fix(compiler): Skip analysis of queries without a name annotation (#3072)
* fix(compiler): Skip analysis of queries without a `name` annotation Also update tests to work with new behavior * Only run builtins test in base context for now
1 parent 94c460d commit f0184bc

File tree

58 files changed

+819
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+819
-7
lines changed
 

‎internal/compiler/parse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query,
4646
return nil, err
4747
}
4848

49+
if name == "" {
50+
return nil, nil
51+
}
52+
4953
if err := validate.Cmd(raw.Stmt, name, cmd); err != nil {
5054
return nil, err
5155
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"contexts": ["base"]
3+
}

0 commit comments

Comments
 (0)
Please sign in to comment.