diff --git a/build.gradle b/build.gradle index aa6e737..ab2278b 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ version = findProperty('cliVersion') ?: '0.1.0-SNAPSHOT' // branch instead (1.0.0-SNAPSHOT), which relix-core publishes to Central's snapshot // repository on every push. A release pins a released engine (checkEnginePin). // -PrelixEngineVersion= overrides it for one build, to try a candidate engine. -ext.relixEngineVersion = (findProperty('relixEngineVersion') ?: '1.0.0-rc11') as String +ext.relixEngineVersion = (findProperty('relixEngineVersion') ?: '1.0.0-rc12') as String def engineIsSnapshot = relixEngineVersion.endsWith('-SNAPSHOT') diff --git a/docs/command-examples/check.md b/docs/command-examples/check.md index a38dafa..90066b0 100644 --- a/docs/command-examples/check.md +++ b/docs/command-examples/check.md @@ -12,7 +12,7 @@ A problem is printed on standard error, and the status is 3: relix check scripts/broken.relix 2>&1; echo "exit $?" ``` ``` -scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' +scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' — did you mean 'Orders'? exit 3 ``` @@ -23,7 +23,7 @@ read: relix check --json scripts/broken.relix; echo "exit $?" ``` ``` -{"diagnostics":[{"file":"scripts/broken.relix","line":1,"column":30,"severity":"error","message":"Undefined relation: 'Ordrs'"}]} +{"diagnostics":[{"file":"scripts/broken.relix","line":1,"column":30,"severity":"error","message":"Undefined relation: 'Ordrs' — did you mean 'Orders'?"}]} exit 3 ``` diff --git a/docs/command-examples/doc.md b/docs/command-examples/doc.md index adc6a9b..319cfa7 100644 --- a/docs/command-examples/doc.md +++ b/docs/command-examples/doc.md @@ -16,12 +16,13 @@ SELECT (Relation) With no topic, `relix doc` lists the pages, as rows: ```shell -relix doc -o tsv | head -4 +relix doc -o tsv | head -5 ``` ``` topic category title summary getting-started guide Getting started Your first script — declare data, name a result, run it glossary guide Glossary The vocabulary — relation, tuple, bag vs set, materialisation, pushdown +operators-by-task guide Operators by task The operator for each task SQL has no operator for, named in a question's words σ operator Selection Filter rows by a condition ``` diff --git a/docs/guide/command-line/catalog.md b/docs/guide/command-line/catalog.md index 84ae32a..868bafd 100644 --- a/docs/guide/command-line/catalog.md +++ b/docs/guide/command-line/catalog.md @@ -98,7 +98,7 @@ relix -e 'Customers' 2>&1; echo "exit $?" ``` ``` relix: warning: skipping ~/shop/.relix, which is not trusted; to load it: relix catalog trust ~/shop --e:1:1: error: Undefined relation: 'Customers' +-e:1:1: error: Undefined relation: 'Customers' (defined: Regions) relix: Customers is declared in ~/shop/.relix/catalog/00-sources.relix, which is not trusted; to load it: relix catalog trust ~/shop exit 5 ``` diff --git a/docs/guide/command-line/commands/check.md b/docs/guide/command-line/commands/check.md index 253c6ca..9d99481 100644 --- a/docs/guide/command-line/commands/check.md +++ b/docs/guide/command-line/commands/check.md @@ -52,7 +52,7 @@ A problem is printed on standard error, and the status is 3: relix check scripts/broken.relix 2>&1; echo "exit $?" ``` ``` -scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' +scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' — did you mean 'Orders'? exit 3 ``` @@ -63,7 +63,7 @@ read: relix check --json scripts/broken.relix; echo "exit $?" ``` ``` -{"diagnostics":[{"file":"scripts/broken.relix","line":1,"column":30,"severity":"error","message":"Undefined relation: 'Ordrs'"}]} +{"diagnostics":[{"file":"scripts/broken.relix","line":1,"column":30,"severity":"error","message":"Undefined relation: 'Ordrs' — did you mean 'Orders'?"}]} exit 3 ``` diff --git a/docs/guide/command-line/commands/doc.md b/docs/guide/command-line/commands/doc.md index 5108066..e08bb14 100644 --- a/docs/guide/command-line/commands/doc.md +++ b/docs/guide/command-line/commands/doc.md @@ -53,12 +53,13 @@ SELECT (Relation) With no topic, `relix doc` lists the pages, as rows: ```shell -relix doc -o tsv | head -4 +relix doc -o tsv | head -5 ``` ``` topic category title summary getting-started guide Getting started Your first script — declare data, name a result, run it glossary guide Glossary The vocabulary — relation, tuple, bag vs set, materialisation, pushdown +operators-by-task guide Operators by task The operator for each task SQL has no operator for, named in a question's words σ operator Selection Filter rows by a condition ``` diff --git a/docs/guide/command-line/getting-started.md b/docs/guide/command-line/getting-started.md index ec838b0..2f12143 100644 --- a/docs/guide/command-line/getting-started.md +++ b/docs/guide/command-line/getting-started.md @@ -204,7 +204,7 @@ message`, the shape compilers use, so an editor or a CI annotator can jump to it relix check scripts/broken.relix 2>&1; echo "exit $?" ``` ``` -scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' +scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' — did you mean 'Orders'? exit 3 ``` diff --git a/docs/guide/command-line/output.md b/docs/guide/command-line/output.md index 580ac4e..163a0e2 100644 --- a/docs/guide/command-line/output.md +++ b/docs/guide/command-line/output.md @@ -225,7 +225,7 @@ is not there, a database that refuses the connection — is one line beginning ` relix -e 'SELECT amount > 100 (Ordrs)' 2>&1; echo "exit $?" ``` ``` --e:1:22: error: Undefined relation: 'Ordrs' +-e:1:22: error: Undefined relation: 'Ordrs' — did you mean 'Orders'? exit 3 ``` diff --git a/docs/guide/command-line/pipelines.md b/docs/guide/command-line/pipelines.md index 0b85f8d..646b4a8 100644 --- a/docs/guide/command-line/pipelines.md +++ b/docs/guide/command-line/pipelines.md @@ -139,7 +139,7 @@ script in a tree: find scripts -name '*.relix' | sort | xargs relix check 2>&1 || echo "a script has a problem" ``` ``` -scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' +scripts/broken.relix:1:30: error: Undefined relation: 'Ordrs' — did you mean 'Orders'? a script has a problem ``` diff --git a/src/test/java/com/darkcollective/relix/cli/command/ReportCommandsTest.java b/src/test/java/com/darkcollective/relix/cli/command/ReportCommandsTest.java index e097d05..d10b1c1 100644 --- a/src/test/java/com/darkcollective/relix/cli/command/ReportCommandsTest.java +++ b/src/test/java/com/darkcollective/relix/cli/command/ReportCommandsTest.java @@ -168,7 +168,7 @@ void xargs() { assertThat(result.status()).isEqualTo(3); assertThat(result.out()).isEmpty(); - assertThat(result.err()).isEqualTo("broken.relix:6:19: error: Undefined relation: 'Missing'\n"); + assertThat(result.err()).isEqualTo("broken.relix:6:19: error: Undefined relation: 'Missing' (defined: N, Bad)\n"); } @Test @@ -180,7 +180,7 @@ void json() { assertThat(result.err()).isEmpty(); assertThat(isJson(result.out())).as(result.out()).isTrue(); assertThat(result.out()).isEqualTo("{\"diagnostics\":[{\"file\":\"broken.relix\",\"line\":6," - + "\"column\":19,\"severity\":\"error\",\"message\":\"Undefined relation: 'Missing'\"}]}\n"); + + "\"column\":19,\"severity\":\"error\",\"message\":\"Undefined relation: 'Missing' (defined: N, Bad)\"}]}\n"); } @Test @@ -396,7 +396,7 @@ void broken() { assertThat(result.status()).isEqualTo(3); assertThat(isJson(result.out())).as(result.out()).isTrue(); assertThat(result.out()).contains("\"diagnostics\":[{\"severity\":\"error\"," - + "\"message\":\"Undefined relation: 'Missing'\",\"file\":\"broken.relix\",\"line\":6,\"column\":19}]"); + + "\"message\":\"Undefined relation: 'Missing' (defined: N, Bad)\",\"file\":\"broken.relix\",\"line\":6,\"column\":19}]"); } }