diff --git a/integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/SchemaDocument.java b/integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/SchemaDocument.java index 641075faa181..878a72a0afa0 100644 --- a/integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/SchemaDocument.java +++ b/integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/SchemaDocument.java @@ -110,9 +110,9 @@ public void updateFileContent(String content) { this.CST = parsingResult.CST().get(); lexer.setCST(CST); - logger.info("======== CST for file: " + fileURI + " ========"); + //logger.info("======== CST for file: " + fileURI + " ========"); - CSTUtils.printTree(logger, CST); + //CSTUtils.printTree(logger, CST); } diff --git a/integration/schema-language-server/language-server/src/test/java/ai/vespa/schemals/SchemaParserTest.java b/integration/schema-language-server/language-server/src/test/java/ai/vespa/schemals/SchemaParserTest.java index 63bb0de01b4f..cec99a4f07ea 100644 --- a/integration/schema-language-server/language-server/src/test/java/ai/vespa/schemals/SchemaParserTest.java +++ b/integration/schema-language-server/language-server/src/test/java/ai/vespa/schemals/SchemaParserTest.java @@ -337,6 +337,7 @@ Stream generateBadFileTests() { new BadFileTestCase("../../../config-model/src/test/examples/simple.sd", 5), // TODO: unused rank-profile functions should throw errors? Also rank-type doesntexist: ... in field? new BadFileTestCase("src/test/sdfiles/single/rankprofilefuncs.sd", 2), + new BadFileTestCase("src/test/sdfiles/single/onnxmodel.sd", 1), }; return Arrays.stream(tests) diff --git a/integration/schema-language-server/language-server/src/test/sdfiles/single/onnxmodel.sd b/integration/schema-language-server/language-server/src/test/sdfiles/single/onnxmodel.sd new file mode 100644 index 000000000000..c25c84431b6f --- /dev/null +++ b/integration/schema-language-server/language-server/src/test/sdfiles/single/onnxmodel.sd @@ -0,0 +1,26 @@ +schema onnxmodel { + document onnxmodel { + } + + rank-profile profile { + first-phase { + expression: sum( onnxModel(mymodel).output_name ) + } + + second-phase { + expression: sum( onnx(noexist).nooutput ) # should give error + } + + onnx-model mymodel { + file: files/something.onnx + } + + function func_a() { + expression: sum(xgboost("xgboost.json")) + } + + function func_b() { + expression: sum(lightbgm("/path/to/lightbgm-model.json")) + } + } +}