From 60da89beb06dbf1fcab03de4545eb5f6a1726504 Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Mon, 22 Aug 2022 15:19:15 +0800 Subject: [PATCH 1/5] run salsa-2022-tests in CI --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e75af276..27bfe4e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,10 @@ jobs: with: command: test args: --all-features --all-targets + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --all-targets --package salsa-2022-tests - uses: actions-rs/cargo@v1 with: command: test From 9657247b2f10275f1563759d13b28280316b9191 Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Mon, 22 Aug 2022 15:27:09 +0800 Subject: [PATCH 2/5] trigger CI if you modify the relevent yaml --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27bfe4e5..0dc3e082 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: paths: - '**.rs' - '**/Cargo.*' + - '.github/workflows/**.yml' jobs: test: From 74e220ec393e3cd7fae3b59bb03ce84bcd6d4cbe Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Mon, 22 Aug 2022 15:32:29 +0800 Subject: [PATCH 3/5] update some tests --- salsa-2022-tests/tests/accumulate.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salsa-2022-tests/tests/accumulate.rs b/salsa-2022-tests/tests/accumulate.rs index c12298df..86932f8c 100644 --- a/salsa-2022-tests/tests/accumulate.rs +++ b/salsa-2022-tests/tests/accumulate.rs @@ -2,7 +2,6 @@ //! //! * entities not created in a revision are deleted, as is any memoized data keyed on them. -use salsa::DebugWithDb; use salsa_2022_tests::{HasLogger, Logger}; use expect_test::expect; @@ -70,7 +69,7 @@ struct Database { } impl salsa::Database for Database { - fn salsa_event(&self, event: salsa::Event) {} + fn salsa_event(&self, _event: salsa::Event) {} fn salsa_runtime(&self) -> &salsa::Runtime { self.storage.runtime() @@ -174,7 +173,8 @@ fn get_a_logs_after_changing_b() { [ "log_a(0 of 2)", "log_a(1 of 2)", - ]"#]] + ] + "#]] .assert_debug_eq(&logs); db.assert_logs(expect!["[]"]); } From 4fef5b8b2c9cb5bea673c8136bf9511ac68e3597 Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Mon, 22 Aug 2022 15:38:04 +0800 Subject: [PATCH 4/5] check fmt first --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dc3e082..daa3df24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,13 @@ jobs: toolchain: ${{ matrix.rust }} components: rustfmt, clippy default: true + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check + - uses: actions-rs/cargo@v1 + with: + command: clippy - uses: actions-rs/cargo@v1 with: command: check @@ -54,10 +61,3 @@ jobs: with: command: check args: --no-default-features - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check - - uses: actions-rs/cargo@v1 - with: - command: clippy From dfc3ff0f8041f34edb6aa55736e62e2a01aeb6d4 Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Mon, 22 Aug 2022 18:09:35 +0800 Subject: [PATCH 5/5] using cargo test --all --- .github/workflows/test.yml | 6 +----- calc-example/calc/src/parser.rs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index daa3df24..a3d1dc60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,11 +48,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: --all-features --all-targets - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --all-targets --package salsa-2022-tests + args: --all-features --all-targets --all - uses: actions-rs/cargo@v1 with: command: test diff --git a/calc-example/calc/src/parser.rs b/calc-example/calc/src/parser.rs index 5869e945..c01acb39 100644 --- a/calc-example/calc/src/parser.rs +++ b/calc-example/calc/src/parser.rs @@ -624,7 +624,7 @@ fn parse_error() { statements: [], }, [ - Diagnostic { position: 10, message: "unexpected character" }, + Diagnostic { start: 10, end: 11, message: "unexpected character" }, ], )"#]]; expected.assert_eq(&actual);