Skip to content

Commit b8b8202

Browse files
committed
Rebase patchset
1 parent e675606 commit b8b8202

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

packages/sqlite3_wasm_build/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ applied to link the [PowerSync SQLite extension][core] statically.
66

77
### Working on patches
88

9-
To adapt the patches:
9+
To adapt the patches from an `$old` version to a `$new` version:
1010

1111
1. Clone `https://github.com/simolus3/sqlite3.dart.git` somewhere.
12-
2. Apply the existing patches to your clone: `git apply patches/*`.
13-
3. Rebase onto a new upstream release if necessary.
14-
4. Obtain a new patchset with `git format-patch upstreamref..HEAD`.
12+
2. Create a branch tracking the old version: `git switch -c powersync-patches sqlite3-$old`.
13+
3. Apply the existing patches: `git am patches/*`.
14+
4. Rebase onto a new upstream release if necessary: `git rebase --onto sqlite3-$new sqlite3-$old powersync-patches`
15+
5. Obtain a new patchset with `git format-patch sqlite3-$new..HEAD`.
1516

1617
[upstream]: https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3/assets/wasm
1718
[core]: https://github.com/powersync-ja/powersync-sqlite-core

packages/sqlite3_wasm_build/patches/0001-Link-PowerSync-core-extension.patch

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 04fd5a3a01be7b42ec97c2d9865e4c7501b5b6a8 Mon Sep 17 00:00:00 2001
1+
From 80ec8f3a54d938c6bf39b471aa26c4c77f9984a2 Mon Sep 17 00:00:00 2001
22
From: Simon Binder <simon@journeyapps.com>
33
Date: Mon, 27 Jan 2025 15:12:53 +0100
44
Subject: [PATCH] Link PowerSync core extension
@@ -10,7 +10,7 @@ Subject: [PATCH] Link PowerSync core extension
1010
3 files changed, 17 insertions(+), 3 deletions(-)
1111

1212
diff --git a/sqlite3/assets/wasm/CMakeLists.txt b/sqlite3/assets/wasm/CMakeLists.txt
13-
index e4283b3..5c52593 100644
13+
index 6597d86..81a5a41 100644
1414
--- a/sqlite3/assets/wasm/CMakeLists.txt
1515
+++ b/sqlite3/assets/wasm/CMakeLists.txt
1616
@@ -6,6 +6,7 @@ project(${PROJECT_NAME} LANGUAGES C)
@@ -43,11 +43,11 @@ index e4283b3..5c52593 100644
4343
)
4444

4545
diff --git a/sqlite3/assets/wasm/os_web.c b/sqlite3/assets/wasm/os_web.c
46-
index 04f2e97..666902d 100644
46+
index 4a1df1d..be9c3c9 100644
4747
--- a/sqlite3/assets/wasm/os_web.c
4848
+++ b/sqlite3/assets/wasm/os_web.c
49-
@@ -4,6 +4,15 @@
50-
49+
@@ -6,7 +6,16 @@
50+
#include "bridge.h"
5151
#include "sqlite3.h"
5252

5353
-int sqlite3_os_init(void) { return SQLITE_OK; }
@@ -63,11 +63,12 @@ index 04f2e97..666902d 100644
6363
+}
6464

6565
int sqlite3_os_end(void) { return SQLITE_OK; }
66+
6667
diff --git a/sqlite3/assets/wasm/sqlite_cfg.h b/sqlite3/assets/wasm/sqlite_cfg.h
67-
index 6f3e3c2..45847f8 100644
68+
index 74e8dd7..682acbf 100644
6869
--- a/sqlite3/assets/wasm/sqlite_cfg.h
6970
+++ b/sqlite3/assets/wasm/sqlite_cfg.h
70-
@@ -43,7 +43,7 @@
71+
@@ -42,7 +42,7 @@
7172
// Disable things we don't need
7273
#define SQLITE_OMIT_DEPRECATED
7374
#define SQLITE_OMIT_PROGRESS_CALLBACK

0 commit comments

Comments
 (0)