Skip to content

Commit 34448c6

Browse files
James Youngbloodmarkharding
authored andcommitted
Add turbo clean script and note to README on stale turbo caches
1 parent b77d957 commit 34448c6

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ The following commands will get you up and running:
3030
nvm install
3131

3232
# Check you have the correct dependencies
33-
34-
```
35-
3633
apt-get install \
3734
protobuf-compiler \
3835
cmake \
@@ -41,8 +38,6 @@ apt-get install \
4138
libssl-dev \
4239
libsasl2-dev
4340

44-
```
45-
4641
# Add the WASM target to the rust toolchain
4742
rustup target add wasm32-unknown-unknown
4843

@@ -67,6 +62,24 @@ If you're using Podman, ensure `docker compose` resolves to Compose v2.
6762

6863
To run the server from source instead, see [`services/server/README.md`](services/server/README.md).
6964

65+
### Clearing stale build caches
66+
67+
Builds are cached by [Turbo](https://turborepo.com). The cache key does not
68+
track changes to installed dependencies, so after switching branches or updating
69+
deps (e.g. a `uniffi-bindgen-react-native` / `@ubjs/core` bump) `pnpm build` can
70+
restore a stale cached output and fail with mismatched generated bindings — for
71+
example a TypeScript error that two `Query` / `UniffiEnum` types "are unrelated".
72+
73+
If that happens, clear the build cache and rebuild:
74+
75+
```sh
76+
pnpm clean:cache
77+
pnpm build
78+
```
79+
80+
If the generated uniffi bindings themselves are stale (not just their cache),
81+
also regenerate them with `pnpm ubrn:clean` followed by `pnpm build`.
82+
7083
## Project Structure
7184

7285
### Packages

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"dev": "turbo run dev",
77
"build": "turbo run build",
8+
"clean:cache": "rm -rf .turbo node_modules/.cache/turbo",
89
"format": "biome check",
910
"format:fix": "biome check --write",
1011
"generate": "turbo run generate",

0 commit comments

Comments
 (0)