Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20 # on a successful run, runs in 8 minutes
container:
image: rust:1.88.0
image: rust:1.90.0
options: --privileged
# filter for a comment containing 'benchmarks please'
if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ debug = true
version = "1.5.0"
edition = "2021"
# update rust-toolchain.toml too!
rust-version = "1.88.0"
rust-version = "1.90.0"

[workspace.dependencies]
spacetimedb = { path = "crates/bindings", version = "=1.5.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See the README for commands to run.

# sync with: ../../rust-toolchain.toml
FROM rust:1.88.0
FROM rust:1.90.0

RUN apt-get update && \
apt-get install -y valgrind bash && \
Expand Down
1 change: 1 addition & 0 deletions crates/bench/benches/callgrind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ mod callgrind_benches {
// ========================= FIND =========================

#[derive(Deserialize)]
#[expect(unused)] // TODO
struct FindBenchmark<DB: BenchDatabase, T: BenchTable + RandomTable> {
bench: String,
db: String,
Expand Down
226 changes: 113 additions & 113 deletions crates/bindings/tests/ui/reducers.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,25 @@ error: scheduled table missing required columns; add these to your struct:
28 | #[spacetimedb::table(name = scheduled_table_missing_rows, scheduled(scheduled_table_missing_rows_reducer))]
| ^^^^^^^^^

error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments
--> tests/ui/reducers.rs:37:56
|
37 | #[spacetimedb::table(name = scheduled_table, scheduled(scheduled_table_reducer))]
| -------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^---
| | |
| | expected function that takes 2 arguments
| required by a bound introduced by this call
...
48 | fn scheduled_table_reducer(_ctx: &ReducerContext, _x: u8, _y: u8) {}
| ----------------------------------------------------------------- takes 3 arguments
|
= note: required for `for<'a> fn(&'a ReducerContext, u8, u8) {scheduled_table_reducer}` to implement `Reducer<'_, (ScheduledTable,)>`
= note: required for `for<'a> fn(&'a ReducerContext, u8, u8) {scheduled_table_reducer}` to implement `ReducerForScheduledTable<'_, ScheduledTable>`
note: required by a bound in `scheduled_reducer_typecheck`
--> src/rt.rs
|
| pub const fn scheduled_reducer_typecheck<'de, Row>(_x: impl ReducerForScheduledTable<'de, Row>)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_reducer_typecheck`

error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:6:4
|
5 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
6 | fn bad_type(_ctx: &ReducerContext, _a: Test) {}
| ^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext, Test) {bad_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
5 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
6 | fn bad_type(_ctx: &ReducerContext, _a: Test) {}
| ^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext, Test) {bad_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`

error[E0277]: the reducer argument `Test` does not implement `SpacetimeType`
--> tests/ui/reducers.rs:6:40
Expand All @@ -82,44 +62,44 @@ error[E0277]: the reducer argument `Test` does not implement `SpacetimeType`
error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:6:4
|
5 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
6 | fn bad_type(_ctx: &ReducerContext, _a: Test) {}
| ^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext, Test) {bad_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
5 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
6 | fn bad_type(_ctx: &ReducerContext, _a: Test) {}
| ^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext, Test) {bad_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `invoke_reducer`
--> src/rt.rs
|
| pub fn invoke_reducer<'a, A: Args<'a>>(
| -------------- required by a bound in this function
| reducer: impl Reducer<'a, A>,
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`
--> src/rt.rs
|
| pub fn invoke_reducer<'a, A: Args<'a>>(
| -------------- required by a bound in this function
| reducer: impl Reducer<'a, A>,
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`

error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:9:4
|
8 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
9 | fn bad_return_type(_ctx: &ReducerContext) -> Test {
| ^^^^^^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext) -> Test {bad_return_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
8 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
9 | fn bad_return_type(_ctx: &ReducerContext) -> Test {
| ^^^^^^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext) -> Test {bad_return_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`

error[E0277]: `Test` is not a valid reducer return type
--> tests/ui/reducers.rs:9:46
Expand All @@ -135,44 +115,44 @@ error[E0277]: `Test` is not a valid reducer return type
error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:9:4
|
8 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
9 | fn bad_return_type(_ctx: &ReducerContext) -> Test {
| ^^^^^^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext) -> Test {bad_return_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `invoke_reducer`
--> src/rt.rs
|
| pub fn invoke_reducer<'a, A: Args<'a>>(
| -------------- required by a bound in this function
| reducer: impl Reducer<'a, A>,
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`

error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:23:4
|
22 | #[spacetimedb::reducer]
8 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
23 | fn missing_ctx(_a: u8) {}
| ^^^^^^^^^^^ this reducer signature is not valid
9 | fn bad_return_type(_ctx: &ReducerContext) -> Test {
| ^^^^^^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `fn(u8) {missing_ctx}`
= help: the trait `Reducer<'_, _>` is not implemented for fn item `for<'a> fn(&'a ReducerContext) -> Test {bad_return_type}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `register_reducer`
note: required by a bound in `invoke_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
| pub fn invoke_reducer<'a, A: Args<'a>>(
| -------------- required by a bound in this function
| reducer: impl Reducer<'a, A>,
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`

error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:23:4
|
22 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
23 | fn missing_ctx(_a: u8) {}
| ^^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `fn(u8) {missing_ctx}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`

error[E0277]: the first argument of a reducer must be `&ReducerContext`
--> tests/ui/reducers.rs:23:20
Expand Down Expand Up @@ -206,24 +186,24 @@ note: required by a bound in `invoke_reducer`
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`

error[E0277]: invalid reducer signature
--> tests/ui/reducers.rs:26:4
|
25 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
26 | fn ctx_by_val(_ctx: ReducerContext, _a: u8) {}
| ^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `fn(ReducerContext, u8) {ctx_by_val}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
--> tests/ui/reducers.rs:26:4
|
25 | #[spacetimedb::reducer]
| ----------------------- required by a bound introduced by this call
26 | fn ctx_by_val(_ctx: ReducerContext, _a: u8) {}
| ^^^^^^^^^^ this reducer signature is not valid
|
= help: the trait `Reducer<'_, _>` is not implemented for fn item `fn(ReducerContext, u8) {ctx_by_val}`
= note:
= note: reducer signatures must match the following pattern:
= note: `Fn(&ReducerContext, [T1, ...]) [-> Result<(), impl Display>]`
= note: where each `Ti` type implements `SpacetimeType`.
= note:
note: required by a bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
--> src/rt.rs
|
| pub fn register_reducer<'a, A: Args<'a>, I: ReducerInfo>(_: impl Reducer<'a, A>) {
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`

error[E0277]: the first argument of a reducer must be `&ReducerContext`
--> tests/ui/reducers.rs:26:21
Expand Down Expand Up @@ -255,3 +235,23 @@ note: required by a bound in `invoke_reducer`
| -------------- required by a bound in this function
| reducer: impl Reducer<'a, A>,
| ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer`

error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments
--> tests/ui/reducers.rs:37:56
|
37 | #[spacetimedb::table(name = scheduled_table, scheduled(scheduled_table_reducer))]
| -------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^---
| | |
| | expected function that takes 2 arguments
| required by a bound introduced by this call
...
48 | fn scheduled_table_reducer(_ctx: &ReducerContext, _x: u8, _y: u8) {}
| ----------------------------------------------------------------- takes 3 arguments
|
= note: required for `for<'a> fn(&'a ReducerContext, u8, u8) {scheduled_table_reducer}` to implement `Reducer<'_, (ScheduledTable,)>`
= note: required for `for<'a> fn(&'a ReducerContext, u8, u8) {scheduled_table_reducer}` to implement `ReducerForScheduledTable<'_, ScheduledTable>`
note: required by a bound in `scheduled_reducer_typecheck`
--> src/rt.rs
|
| pub const fn scheduled_reducer_typecheck<'de, Row>(_x: impl ReducerForScheduledTable<'de, Row>)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_reducer_typecheck`
Loading
Loading