Skip to content

Commit f60bdbe

Browse files
committed
Revert "Procedures: fix scheduling (#3704)"
This reverts commit b2e37e8.
1 parent dbc3d86 commit f60bdbe

File tree

215 files changed

+319
-1451
lines changed

Some content is hidden

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

215 files changed

+319
-1451
lines changed

crates/bindings-typescript/src/lib/procedures.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ export function procedure<
4949
const paramsType: ProductType = {
5050
elements: Object.entries(params).map(([n, c]) => ({
5151
name: n,
52-
algebraicType: registerTypesRecursively(
53-
'typeBuilder' in c ? c.typeBuilder : c
54-
).algebraicType,
52+
algebraicType:
53+
'typeBuilder' in c ? c.typeBuilder.algebraicType : c.algebraicType,
5554
})),
5655
};
5756
const returnType = registerTypesRecursively(ret).algebraicType;

crates/codegen/src/rust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ impl {func_name} for super::RemoteReducers {{
423423
{callback_id}(self.imp.on_reducer(
424424
{reducer_name:?},
425425
Box::new(move |ctx: &super::ReducerEventContext| {{
426-
#[allow(irrefutable_let_patterns)]
427426
let super::ReducerEventContext {{
428427
event: __sdk::ReducerEvent {{
429428
reducer: super::Reducer::{enum_variant_name} {{

crates/codegen/tests/snapshots/codegen__codegen_rust.snap

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ impl add_player for super::RemoteReducers {
7272
AddPlayerCallbackId(self.imp.on_reducer(
7373
"add_player",
7474
Box::new(move |ctx: &super::ReducerEventContext| {
75-
#[allow(irrefutable_let_patterns)]
7675
let super::ReducerEventContext {
7776
event: __sdk::ReducerEvent {
7877
reducer: super::Reducer::AddPlayer {
@@ -182,7 +181,6 @@ impl add_private for super::RemoteReducers {
182181
AddPrivateCallbackId(self.imp.on_reducer(
183182
"add_private",
184183
Box::new(move |ctx: &super::ReducerEventContext| {
185-
#[allow(irrefutable_let_patterns)]
186184
let super::ReducerEventContext {
187185
event: __sdk::ReducerEvent {
188186
reducer: super::Reducer::AddPrivate {
@@ -296,7 +294,6 @@ age: u8,
296294
AddCallbackId(self.imp.on_reducer(
297295
"add",
298296
Box::new(move |ctx: &super::ReducerEventContext| {
299-
#[allow(irrefutable_let_patterns)]
300297
let super::ReducerEventContext {
301298
event: __sdk::ReducerEvent {
302299
reducer: super::Reducer::Add {
@@ -401,7 +398,6 @@ impl assert_caller_identity_is_module_identity for super::RemoteReducers {
401398
AssertCallerIdentityIsModuleIdentityCallbackId(self.imp.on_reducer(
402399
"assert_caller_identity_is_module_identity",
403400
Box::new(move |ctx: &super::ReducerEventContext| {
404-
#[allow(irrefutable_let_patterns)]
405401
let super::ReducerEventContext {
406402
event: __sdk::ReducerEvent {
407403
reducer: super::Reducer::AssertCallerIdentityIsModuleIdentity {
@@ -531,7 +527,6 @@ impl client_connected for super::RemoteReducers {
531527
ClientConnectedCallbackId(self.imp.on_reducer(
532528
"client_connected",
533529
Box::new(move |ctx: &super::ReducerEventContext| {
534-
#[allow(irrefutable_let_patterns)]
535530
let super::ReducerEventContext {
536531
event: __sdk::ReducerEvent {
537532
reducer: super::Reducer::ClientConnected {
@@ -641,7 +636,6 @@ impl delete_player for super::RemoteReducers {
641636
DeletePlayerCallbackId(self.imp.on_reducer(
642637
"delete_player",
643638
Box::new(move |ctx: &super::ReducerEventContext| {
644-
#[allow(irrefutable_let_patterns)]
645639
let super::ReducerEventContext {
646640
event: __sdk::ReducerEvent {
647641
reducer: super::Reducer::DeletePlayer {
@@ -751,7 +745,6 @@ impl delete_players_by_name for super::RemoteReducers {
751745
DeletePlayersByNameCallbackId(self.imp.on_reducer(
752746
"delete_players_by_name",
753747
Box::new(move |ctx: &super::ReducerEventContext| {
754-
#[allow(irrefutable_let_patterns)]
755748
let super::ReducerEventContext {
756749
event: __sdk::ReducerEvent {
757750
reducer: super::Reducer::DeletePlayersByName {
@@ -1073,7 +1066,6 @@ impl list_over_age for super::RemoteReducers {
10731066
ListOverAgeCallbackId(self.imp.on_reducer(
10741067
"list_over_age",
10751068
Box::new(move |ctx: &super::ReducerEventContext| {
1076-
#[allow(irrefutable_let_patterns)]
10771069
let super::ReducerEventContext {
10781070
event: __sdk::ReducerEvent {
10791071
reducer: super::Reducer::ListOverAge {
@@ -1178,7 +1170,6 @@ impl log_module_identity for super::RemoteReducers {
11781170
LogModuleIdentityCallbackId(self.imp.on_reducer(
11791171
"log_module_identity",
11801172
Box::new(move |ctx: &super::ReducerEventContext| {
1181-
#[allow(irrefutable_let_patterns)]
11821173
let super::ReducerEventContext {
11831174
event: __sdk::ReducerEvent {
11841175
reducer: super::Reducer::LogModuleIdentity {
@@ -3576,7 +3567,6 @@ impl query_private for super::RemoteReducers {
35763567
QueryPrivateCallbackId(self.imp.on_reducer(
35773568
"query_private",
35783569
Box::new(move |ctx: &super::ReducerEventContext| {
3579-
#[allow(irrefutable_let_patterns)]
35803570
let super::ReducerEventContext {
35813571
event: __sdk::ReducerEvent {
35823572
reducer: super::Reducer::QueryPrivate {
@@ -3862,7 +3852,6 @@ impl repeating_test for super::RemoteReducers {
38623852
RepeatingTestCallbackId(self.imp.on_reducer(
38633853
"repeating_test",
38643854
Box::new(move |ctx: &super::ReducerEventContext| {
3865-
#[allow(irrefutable_let_patterns)]
38663855
let super::ReducerEventContext {
38673856
event: __sdk::ReducerEvent {
38683857
reducer: super::Reducer::RepeatingTest {
@@ -4026,7 +4015,6 @@ impl say_hello for super::RemoteReducers {
40264015
SayHelloCallbackId(self.imp.on_reducer(
40274016
"say_hello",
40284017
Box::new(move |ctx: &super::ReducerEventContext| {
4029-
#[allow(irrefutable_let_patterns)]
40304018
let super::ReducerEventContext {
40314019
event: __sdk::ReducerEvent {
40324020
reducer: super::Reducer::SayHello {
@@ -4337,7 +4325,6 @@ impl test_btree_index_args for super::RemoteReducers {
43374325
TestBtreeIndexArgsCallbackId(self.imp.on_reducer(
43384326
"test_btree_index_args",
43394327
Box::new(move |ctx: &super::ReducerEventContext| {
4340-
#[allow(irrefutable_let_patterns)]
43414328
let super::ReducerEventContext {
43424329
event: __sdk::ReducerEvent {
43434330
reducer: super::Reducer::TestBtreeIndexArgs {
@@ -4891,7 +4878,6 @@ arg_4: NamespaceTestF,
48914878
TestCallbackId(self.imp.on_reducer(
48924879
"test",
48934880
Box::new(move |ctx: &super::ReducerEventContext| {
4894-
#[allow(irrefutable_let_patterns)]
48954881
let super::ReducerEventContext {
48964882
event: __sdk::ReducerEvent {
48974883
reducer: super::Reducer::Test {

crates/core/src/host/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use spacetimedb_lib::bsatn;
88
use spacetimedb_lib::de::{serde::SeedWrapper, DeserializeSeed};
99
use spacetimedb_lib::ProductValue;
1010
use spacetimedb_schema::def::deserialize::{ArgsSeed, FunctionDef};
11-
use spacetimedb_schema::def::ModuleDef;
1211

1312
mod disk_storage;
1413
mod host_controller;
@@ -42,14 +41,6 @@ pub enum FunctionArgs {
4241
}
4342

4443
impl FunctionArgs {
45-
fn into_tuple_for_def<Def: FunctionDef>(
46-
self,
47-
module: &ModuleDef,
48-
def: &Def,
49-
) -> Result<ArgsTuple, InvalidFunctionArguments> {
50-
self.into_tuple(module.arg_seed_for(def))
51-
}
52-
5344
fn into_tuple<Def: FunctionDef>(self, seed: ArgsSeed<'_, Def>) -> Result<ArgsTuple, InvalidFunctionArguments> {
5445
self._into_tuple(seed).map_err(|err| InvalidFunctionArguments {
5546
err,

0 commit comments

Comments
 (0)