Skip to content

Commit ed80830

Browse files
committed
nix crates/bindings dependency on spacetimedb_data_structures
1 parent 427250c commit ed80830

32 files changed

+127
-146
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/bindings/tests/snapshots/deps__spacetimedb_bindings_dependencies.snap

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
source: crates/bindings/tests/deps.rs
33
expression: "cargo tree -p spacetimedb -f {lib} -e no-dev"
44
---
5-
total crates: 66
5+
total crates: 61
66
spacetimedb
77
├── bytemuck
88
├── derive_more
@@ -69,22 +69,6 @@ spacetimedb
6969
│ ├── hex
7070
│ ├── itertools (*)
7171
│ ├── spacetimedb_bindings_macro (*)
72-
│ ├── spacetimedb_data_structures
73-
│ │ ├── ahash
74-
│ │ │ ├── cfg_if
75-
│ │ │ ├── once_cell
76-
│ │ │ └── zerocopy
77-
│ │ │ [build-dependencies]
78-
│ │ │ └── version_check
79-
│ │ ├── hashbrown
80-
│ │ │ └── equivalent
81-
│ │ ├── nohash_hasher
82-
│ │ ├── smallvec
83-
│ │ └── thiserror
84-
│ │ └── thiserror_impl
85-
│ │ ├── proc_macro2 (*)
86-
│ │ ├── quote (*)
87-
│ │ └── syn (*)
8872
│ ├── spacetimedb_primitives (*)
8973
│ ├── spacetimedb_sats
9074
│ │ ├── anyhow
@@ -117,8 +101,11 @@ spacetimedb
117101
│ │ │ └── keccak
118102
│ │ ├── smallvec
119103
│ │ ├── spacetimedb_bindings_macro (*)
120-
│ │ ├── spacetimedb_data_structures (*)
121104
│ │ ├── spacetimedb_primitives (*)
122-
│ │ └── thiserror (*)
105+
│ │ └── thiserror
106+
│ │ └── thiserror_impl
107+
│ │ ├── proc_macro2 (*)
108+
│ │ ├── quote (*)
109+
│ │ └── syn (*)
123110
│ └── thiserror (*)
124111
└── spacetimedb_primitives (*)

crates/bindings/tests/ui/reducers.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ error[E0277]: the reducer argument `Test` does not implement `SpacetimeType`
7070
= help: the following other types implement trait `SpacetimeType`:
7171
&T
7272
()
73+
AlgebraicType
7374
AlgebraicTypeRef
7475
Arc<T>
7576
ArrayType
7677
Box<T>
7778
ColId
78-
ColumnAttribute
7979
and $N others
8080
= note: required for `Test` to implement `ReducerArg`
8181

crates/bindings/tests/ui/tables.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ error[E0277]: the column type `Test` does not implement `SpacetimeType`
2121
= help: the following other types implement trait `SpacetimeType`:
2222
&T
2323
()
24+
AlgebraicType
2425
AlgebraicTypeRef
2526
Alpha
2627
Arc<T>
2728
ArrayType
2829
Box<T>
29-
ColId
3030
and $N others
3131
= note: required for `Test` to implement `TableColumn`
3232

@@ -40,12 +40,12 @@ error[E0277]: the trait bound `Test: SpacetimeType` is not satisfied
4040
= help: the following other types implement trait `SpacetimeType`:
4141
&T
4242
()
43+
AlgebraicType
4344
AlgebraicTypeRef
4445
Alpha
4546
Arc<T>
4647
ArrayType
4748
Box<T>
48-
ColId
4949
and $N others
5050

5151
error[E0277]: the trait bound `Test: Deserialize<'de>` is not satisfied
@@ -61,11 +61,11 @@ error[E0277]: the trait bound `Test: Deserialize<'de>` is not satisfied
6161
&'de [u8]
6262
&'de str
6363
()
64+
AlgebraicType
6465
AlgebraicTypeRef
6566
Alpha
6667
Arc<[T]>
6768
ArrayType
68-
Box<T>
6969
and $N others
7070
note: required by a bound in `spacetimedb::spacetimedb_lib::de::SeqProductAccess::next_element`
7171
--> $WORKSPACE/crates/sats/src/de.rs
@@ -83,11 +83,11 @@ error[E0277]: the trait bound `Test: Deserialize<'_>` is not satisfied
8383
&'de [u8]
8484
&'de str
8585
()
86+
AlgebraicType
8687
AlgebraicTypeRef
8788
Alpha
8889
Arc<[T]>
8990
ArrayType
90-
Box<T>
9191
and $N others
9292
note: required by a bound in `get_field_value`
9393
--> $WORKSPACE/crates/sats/src/de.rs
@@ -104,12 +104,12 @@ error[E0277]: the trait bound `Test: Serialize` is not satisfied
104104
= help: the following other types implement trait `Serialize`:
105105
&T
106106
()
107+
AlgebraicType
107108
AlgebraicTypeRef
109+
AlgebraicValue
108110
Alpha
109111
Arc<T>
110112
ArrayType
111-
ArrayValue
112-
Bound<T>
113113
and $N others
114114
note: required by a bound in `spacetimedb::spacetimedb_lib::ser::SerializeNamedProduct::serialize_element`
115115
--> $WORKSPACE/crates/sats/src/ser.rs
@@ -135,7 +135,7 @@ error[E0277]: `&'a Alpha` cannot appear as an argument to an index filtering ope
135135
&bool
136136
&ethnum::int::I256
137137
and $N others
138-
note: required by a bound in `UniqueColumn::<Tbl, <Col as spacetimedb::table::Column>::ColType, Col>::find`
138+
note: required by a bound in `UniqueColumn::<Tbl, <Col as Column>::ColType, Col>::find`
139139
--> src/table.rs
140140
|
141141
| pub fn find(&self, col_val: impl Borrow<Col::ColType>) -> Option<Tbl::Row>

crates/core/src/db/datastore/error.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
use super::system_tables::SystemTable;
22
use enum_as_inner::EnumAsInner;
3-
use spacetimedb_lib::buffer::DecodeError;
4-
use spacetimedb_lib::{
5-
db::{
6-
error::LibError,
7-
raw_def::{v9::RawSql, RawIndexDefV8},
8-
},
9-
AlgebraicType, AlgebraicValue, ProductValue,
10-
};
3+
use spacetimedb_lib::db::raw_def::{v9::RawSql, RawIndexDefV8};
114
use spacetimedb_primitives::{ColId, ColList, IndexId, SequenceId, TableId};
5+
use spacetimedb_sats::buffer::DecodeError;
126
use spacetimedb_sats::{product_value::InvalidFieldError, satn::Satn};
7+
use spacetimedb_sats::{AlgebraicType, AlgebraicValue, ProductValue};
8+
use spacetimedb_schema::def::error::LibError;
139
use spacetimedb_snapshot::SnapshotError;
1410
use spacetimedb_table::{
1511
bflatn_to, read_column,

crates/core/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ use thiserror::Error;
1616
use crate::client::ClientActorId;
1717
use crate::host::scheduler::ScheduleError;
1818
use spacetimedb_lib::buffer::DecodeError;
19-
use spacetimedb_lib::db::error::{LibError, RelationError, SchemaErrors};
20-
use spacetimedb_lib::relation::FieldName;
2119
use spacetimedb_primitives::*;
2220
use spacetimedb_sats::hash::Hash;
2321
use spacetimedb_sats::product_value::InvalidFieldError;
22+
use spacetimedb_schema::def::error::{LibError, RelationError, SchemaErrors};
23+
use spacetimedb_schema::relation::FieldName;
2424
use spacetimedb_vm::errors::{ErrorKind, ErrorLang, ErrorType, ErrorVm};
2525
use spacetimedb_vm::expr::Crud;
2626

crates/core/src/sql/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ use spacetimedb_data_structures::map::{HashCollectionExt as _, IntMap};
77
use spacetimedb_expr::check::SchemaView;
88
use spacetimedb_expr::statement::compile_sql_stmt;
99
use spacetimedb_lib::db::auth::StAccess;
10-
use spacetimedb_lib::db::error::RelationError;
1110
use spacetimedb_lib::identity::AuthCtx;
12-
use spacetimedb_lib::relation::{ColExpr, FieldName};
1311
use spacetimedb_primitives::{ColId, TableId};
1412
use spacetimedb_sats::{AlgebraicType, AlgebraicValue};
13+
use spacetimedb_schema::def::error::RelationError;
14+
use spacetimedb_schema::relation::{ColExpr, FieldName};
1515
use spacetimedb_schema::schema::{ColumnSchema, TableSchema};
1616
use spacetimedb_vm::errors::ErrorVm;
1717
use spacetimedb_vm::expr::{Expr, FieldExpr, FieldOp};

crates/core/src/sql/compiler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use crate::error::{DBError, PlanError};
77
use core::ops::Deref;
88
use spacetimedb_data_structures::map::IntMap;
99
use spacetimedb_lib::identity::AuthCtx;
10-
use spacetimedb_lib::relation::{self, ColExpr, DbTable, FieldName, Header};
1110
use spacetimedb_primitives::ColId;
11+
use spacetimedb_schema::relation::{self, ColExpr, DbTable, FieldName, Header};
1212
use spacetimedb_schema::schema::TableSchema;
1313
use spacetimedb_vm::expr::{CrudExpr, Expr, FieldExpr, QueryExpr, SourceExpr};
1414
use spacetimedb_vm::operator::OpCmp;

crates/core/src/sql/execute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use anyhow::anyhow;
1818
use spacetimedb_expr::statement::Statement;
1919
use spacetimedb_lib::identity::AuthCtx;
2020
use spacetimedb_lib::metrics::ExecutionMetrics;
21-
use spacetimedb_lib::relation::FieldName;
2221
use spacetimedb_lib::Timestamp;
2322
use spacetimedb_lib::{AlgebraicType, ProductType, ProductValue};
2423
use spacetimedb_query::{compile_sql_stmt, execute_dml_stmt, execute_select_stmt};
24+
use spacetimedb_schema::relation::FieldName;
2525
use spacetimedb_vm::eval::run_ast;
2626
use spacetimedb_vm::expr::{CodeResult, CrudExpr, Expr};
2727
use spacetimedb_vm::relation::MemTable;
@@ -314,10 +314,10 @@ pub(crate) mod tests {
314314
use spacetimedb_lib::bsatn::ToBsatn;
315315
use spacetimedb_lib::db::auth::{StAccess, StTableType};
316316
use spacetimedb_lib::error::{ResultTest, TestError};
317-
use spacetimedb_lib::relation::Header;
318317
use spacetimedb_lib::{AlgebraicValue, Identity};
319318
use spacetimedb_primitives::{col_list, ColId, TableId};
320319
use spacetimedb_sats::{product, AlgebraicType, ArrayValue, ProductType};
320+
use spacetimedb_schema::relation::Header;
321321
use spacetimedb_vm::eval::test_helpers::create_game_data;
322322

323323
pub(crate) fn execute_for_testing(

crates/core/src/sql/type_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use crate::error::PlanError;
22
use crate::sql::ast::From;
33
use crate::sql::ast::{Selection, SqlAst};
44
use spacetimedb_lib::operator::OpQuery;
5-
use spacetimedb_lib::relation::FieldName;
65
use spacetimedb_sats::algebraic_type::fmt::fmt_algebraic_type;
76
use spacetimedb_sats::{AlgebraicType, AlgebraicValue};
7+
use spacetimedb_schema::relation::FieldName;
88
use spacetimedb_schema::schema::ColumnSchema;
99
use spacetimedb_vm::errors::ErrorType;
1010
use spacetimedb_vm::expr::{FieldExpr, FieldOp};

0 commit comments

Comments
 (0)