Skip to content

Commit b467137

Browse files
committed
Include wasm build files in cache key
1 parent 9063c16 commit b467137

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.github/workflows/compile_sqlite.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
id: cache_build
1818
with:
1919
path: sqlite-src/
20-
key: sqlite-src-${{ hashFiles('tool/sqlite_build_id') }}
20+
key: sqlite-src-${{ hashFiles('tool/sqlite_build_id', 'sqlite3_wasm_build/src/*') }}
2121

2222
- uses: dart-lang/setup-dart@v1
2323
if: steps.cache_build.outputs.cache-hit != 'true'
@@ -49,7 +49,7 @@ jobs:
4949
id: cache_build
5050
with:
5151
path: sqlite-compiled
52-
key: sqlite-prebuilt-${{ runner.os }}-${{ hashFiles('tool/sqlite_build_id') }}
52+
key: sqlite-prebuilt-${{ runner.os }}-${{ hashFiles('tool/sqlite_build_id', 'sqlite3_wasm_build/src/*') }}
5353

5454
- name: Download sqlite3 sources
5555
if: steps.cache_build.outputs.cache-hit != 'true'
@@ -90,7 +90,7 @@ jobs:
9090
id: cache_build
9191
with:
9292
path: sqlite3_wasm_build/out/
93-
key: sqlite-prebuilt-wasm2-${{ hashFiles('tool/sqlite_build_id') }}
93+
key: sqlite-prebuilt-wasm-${{ hashFiles('tool/sqlite_build_id', 'sqlite3_wasm_build/src/*') }}
9494

9595
# clang 18 that ships on ubuntu crashes when compiling the wasm sources
9696
- name: Install LLVM and Clang

sqlite3/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dev_dependencies:
4242
build_runner: ^2.1.7
4343
build_web_compilers: ^4.0.3
4444
dart_style: ^3.0.1
45-
ffigen: ^20.0.0
45+
ffigen: ^20.1.0
4646
http: ^1.2.1
4747
lints: ^6.0.0
4848
shelf: ^1.4.0

sqlite3/tool/generate_bindings.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:ffigen/src/code_generator.dart';
88
import 'package:ffigen/src/context.dart';
99
import 'package:ffigen/src/header_parser.dart' as ffigen;
1010
import 'package:logging/logging.dart';
11-
import 'package:pub_semver/pub_semver.dart';
1211

1312
import '../../sqlite3_wasm_build/tool/wasm_symbols.dart';
1413

sqlite3_wasm_build/src/external_objects.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ static __externref_t host_objects[0];
1010

1111
// Note: Inlining these functions seems to cause linker errors (something about
1212
// clang attempting to take the address of host_objects).
13-
void host_table_set(int index, __externref_t value) {
14-
__builtin_wasm_table_set(host_objects, index, value);
13+
void host_table_set(size_t index, __externref_t value) {
14+
__builtin_wasm_table_set(host_objects, (int) index, value);
1515
}
1616

17-
static __externref_t host_table_get(int index) {
18-
return __builtin_wasm_table_get(host_objects, index);
17+
static __externref_t host_table_get(size_t index) {
18+
return __builtin_wasm_table_get(host_objects, (int) index);
1919
}
2020

21-
static int host_table_grow(int delta) {
22-
return __builtin_wasm_table_grow(host_objects,
23-
__builtin_wasm_ref_null_extern(), delta);
21+
static size_t host_table_grow(size_t delta) {
22+
return (size_t)__builtin_wasm_table_grow(
23+
host_objects, __builtin_wasm_ref_null_extern(), delta);
2424
}
2525

26-
static int host_table_size() { return __builtin_wasm_table_size(host_objects); }
26+
static size_t host_table_size() {
27+
return (size_t)__builtin_wasm_table_size(host_objects);
28+
}
2729

2830
// A simple slab allocator to find free indices in the host objects table.
2931
typedef struct {

0 commit comments

Comments
 (0)