Skip to content

Commit c8581e2

Browse files
committed
merge master into add/cargo-ci
2 parents 4824f5f + e77b62f commit c8581e2

File tree

101 files changed

+2479
-1693
lines changed

Some content is hidden

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

101 files changed

+2479
-1693
lines changed

.cargo/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ rustflags = ["--cfg", "tokio_unstable"]
44
[alias]
55
bump-versions = "run -p upgrade-version --"
66
ci = "run -p ci --"
7+
8+
[target.x86_64-pc-windows-msvc]
9+
# Use a different linker. Otherwise, the build fails with some obscure linker error that
10+
# seems to be a result of us producing a massive PDB file.
11+
# I (@bfops) tried a variety of other link options besides switching linkers, but this
12+
# seems to be the only thing that worked.
13+
linker = "lld-link"

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
runs-on: ubuntu-latest
184184
timeout-minutes: 20 # on a successful run, runs in 8 minutes
185185
container:
186-
image: rust:1.88.0
186+
image: rust:1.90.0
187187
options: --privileged
188188
# filter for a comment containing 'benchmarks please'
189189
if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ jobs:
5858
$ErrorActionPreference = 'Stop'
5959
$PSNativeCommandUseErrorActionPreference = $true
6060
61-
# Use a different linker. Otherwise, the build fails with some obscure linker error that
62-
# seems to be a result of us producing a massive PDB file.
63-
# I (@bfops) tried a variety of other link options besides switching linkers, but this
64-
# seems to be the only thing that worked.
65-
$env:RUSTFLAGS='-Clinker=lld-link'
66-
6761
cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update
6862
Start-Process target/debug/spacetimedb-cli.exe -ArgumentList 'start --pg-port 5432'
6963
cd modules

.github/workflows/csharp-test.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,20 @@ jobs:
8383
CARGO_TARGET_DIR: demo/Blackholio/server-rust/target
8484

8585
- name: Check quickstart-chat bindings are up to date
86-
working-directory: sdks/csharp/examples~/quickstart-chat
86+
working-directory: sdks/csharp
8787
run: |
88-
bash ../../tools~/gen-quickstart.sh "${GITHUB_WORKSPACE}"
89-
# This was copied from tools/check-diff.sh.
90-
# It's required because `spacetime generate` creates lines with the SpacetimeDB commit
91-
# version, which would make this `git diff` check very brittle if included.
92-
PATTERN='^// This was generated using spacetimedb cli version.*'
93-
git diff --exit-code --ignore-matching-lines="$PATTERN" -- . || {
94-
echo "Error: quickstart-chat bindings have changed. Please regenerate the bindings and commit them to this branch."
88+
bash tools~/gen-quickstart.sh
89+
"${GITHUB_WORKSPACE}"/tools/check-diff.sh examples~/quickstart-chat || {
90+
echo 'Error: quickstart-chat bindings have changed. Please run `sdks/csharp/tools~/gen-quickstart.sh`.'
91+
exit 1
92+
}
93+
94+
- name: Check client-api bindings are up to date
95+
working-directory: sdks/csharp
96+
run: |
97+
bash tools~/gen-client-api.sh
98+
"${GITHUB_WORKSPACE}"/tools/check-diff.sh src/SpacetimeDB/ClientApi || {
99+
echo 'Error: Client API bindings are dirty. Please run `sdks/csharp/tools~/gen-client-api.sh`.'
95100
exit 1
96101
}
97102
@@ -101,12 +106,8 @@ jobs:
101106

102107
- name: Check for changes
103108
run: |
104-
# This was copied from tools/check-diff.sh.
105-
# It's required because `spacetime generate` creates lines with the SpacetimeDB commit
106-
# version, which would make this `git diff` check very brittle if included.
107-
PATTERN='^// This was generated using spacetimedb cli version.*'
108-
git diff --exit-code --ignore-matching-lines="$PATTERN" -- demo/Blackholio/client-unity/Assets/Scripts/autogen || {
109-
echo "Error: Bindings are dirty. Please generate bindings again and commit them to this branch."
109+
tools/check-diff.sh demo/Blackholio/client-unity/Assets/Scripts/autogen || {
110+
echo 'Error: Bindings are dirty. Please run `demo/Blackholio/server-rust/generate.sh`.'
110111
exit 1
111112
}
112113
@@ -124,7 +125,12 @@ jobs:
124125
disown
125126
126127
- name: Run regression tests
127-
run: bash sdks/csharp/tools~/run-regression-tests.sh .
128+
run: |
129+
bash sdks/csharp/tools~/run-regression-tests.sh
130+
tools/check-diff.sh sdks/csharp/examples~/regression-tests || {
131+
echo 'Error: Bindings are dirty. Please run `sdks/csharp/tools~/gen-regression-tests.sh`.'
132+
exit 1
133+
}
128134
129135
- name: Publish unity-tests module to SpacetimeDB
130136
working-directory: demo/Blackholio/server-rust

.github/workflows/typescript-test.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ jobs:
7777
- name: Cache Rust dependencies
7878
uses: Swatinem/rust-cache@v2
7979
with:
80-
workspaces: modules/quickstart-chat
80+
workspaces: |
81+
.
82+
modules/quickstart-chat
8183
shared-key: quickstart-chat-test
8284

8385
- name: Install SpacetimeDB CLI from the local checkout
@@ -89,9 +91,6 @@ jobs:
8991
ln -s $HOME/.cargo/bin/spacetimedb-cli $HOME/.cargo/bin/spacetime
9092
# Clear any existing information
9193
spacetime server clear -y
92-
env:
93-
# Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
94-
CARGO_TARGET_DIR: modules/quickstart-chat/target
9594
9695
- name: Generate client bindings
9796
working-directory: modules/quickstart-chat
@@ -103,14 +102,10 @@ jobs:
103102
- name: Check for changes
104103
working-directory: crates/bindings-typescript
105104
run: |
106-
# This was copied from SpacetimeDB/tools/check-diff.sh.
107-
# It's required because `spacetime generate` creates lines with the SpacetimeDB commit
108-
# version, which would make this `git diff` check very brittle if included.
109-
PATTERN='^// This was generated using spacetimedb cli version.*'
110-
if ! git diff --exit-code --ignore-matching-lines="$PATTERN" -- examples/quickstart-chat/src/module_bindings; then
105+
"${GITHUB_WORKSPACE}"/tools/check-diff.sh examples/quickstart-chat/src/module_bindings || {
111106
echo "Error: Bindings are dirty. Please generate bindings again and commit them to this branch."
112107
exit 1
113-
fi
108+
}
114109
115110
# - name: Start SpacetimeDB
116111
# run: |

Cargo.lock

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

Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ debug = true
9696
version = "1.5.0"
9797
edition = "2021"
9898
# update rust-toolchain.toml too!
99-
rust-version = "1.88.0"
99+
rust-version = "1.90.0"
100100

101101
[workspace.dependencies]
102102
spacetimedb = { path = "crates/bindings", version = "=1.5.0" }
@@ -183,6 +183,7 @@ fs_extra = "1.3.0"
183183
fs2 = "0.4.3"
184184
futures = "0.3"
185185
futures-channel = "0.3"
186+
futures-util = "0.3"
186187
getrandom02 = { package = "getrandom", version = "0.2" }
187188
glob = "0.3.1"
188189
hashbrown = { version = "0.15", default-features = false, features = ["equivalent", "inline-more"] }
@@ -313,6 +314,7 @@ version = "25"
313314
default-features = false
314315
features = [
315316
"addr2line",
317+
"async",
316318
"cache",
317319
"cranelift",
318320
"demangle",
@@ -342,3 +344,11 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
342344
[workspace.lints.clippy]
343345
# FIXME: we should work on this lint incrementally
344346
result_large_err = "allow"
347+
348+
[patch.crates-io]
349+
# Note(bfops): We require this override because temporal_rs (pulled via core->v8->ry_temporal_capi)
350+
# depends on timezone_provider using a `~` which allows a roll-forward to an incompatible version.
351+
# Maybe this will no longer be an issue if we bump v8 to a version that depends on a post-0.1
352+
# version of temporal_rs, but I'm not holding my breath.
353+
timezone_provider = { git = "https://github.com/boa-dev/temporal", tag = "v0.0.11" }
354+
temporal_rs = { git = "https://github.com/boa-dev/temporal", tag = "v0.0.11" }

crates/bench/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See the README for commands to run.
44

55
# sync with: ../../rust-toolchain.toml
6-
FROM rust:1.88.0
6+
FROM rust:1.90.0
77

88
RUN apt-get update && \
99
apt-get install -y valgrind bash && \

crates/bench/benches/callgrind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ mod callgrind_benches {
408408
// ========================= FIND =========================
409409

410410
#[derive(Deserialize)]
411+
#[expect(unused)] // TODO
411412
struct FindBenchmark<DB: BenchDatabase, T: BenchTable + RandomTable> {
412413
bench: String,
413414
db: String,

crates/bindings-csharp/Runtime/Exceptions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public class NoSpaceException : StdbException
7272
public override string Message => "The provided bytes sink has no more room left";
7373
}
7474

75+
public class AutoIncOverflowException : StdbException
76+
{
77+
public override string Message => "The auto-increment sequence overflowed";
78+
}
79+
7580
public class UnknownException : StdbException
7681
{
7782
private readonly Errno code;

0 commit comments

Comments
 (0)