Skip to content

Commit d75cd60

Browse files
committed
extract spacetimedb-memory-usage & bindings: nix spacetimedb-data-structures dep
1 parent ef0b256 commit d75cd60

Some content is hidden

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

49 files changed

+469
-424
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ spacetimedb-durability = { path = "crates/durability", version = "1.2.0" }
108108
spacetimedb-execution = { path = "crates/execution", version = "1.2.0" }
109109
spacetimedb-expr = { path = "crates/expr", version = "1.2.0" }
110110
spacetimedb-lib = { path = "crates/lib", default-features = false, version = "1.2.0" }
111+
spacetimedb-memory-usage = { path = "crates/memory-usage", version = "1.2.0", default-features = false }
111112
spacetimedb-metrics = { path = "crates/metrics", version = "1.2.0" }
112113
spacetimedb-paths = { path = "crates/paths", version = "1.2.0" }
113114
spacetimedb-physical-plan = { path = "crates/physical-plan", version = "1.2.0" }

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/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spacetimedb-lib = { workspace = true, features = ["serde", "metrics_impls"] }
2121
spacetimedb-client-api-messages.workspace = true
2222
spacetimedb-commitlog.workspace = true
2323
spacetimedb-durability.workspace = true
24+
spacetimedb-memory-usage.workspace = true
2425
spacetimedb-metrics.workspace = true
2526
spacetimedb-primitives.workspace = true
2627
spacetimedb-paths.workspace = true

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;

0 commit comments

Comments
 (0)