Merge pull request #202 from bnema/feat/purego-sqlite
feat: replace ncruces/go-sqlite3 with purego-sqlite
6 files · +10 -28
M cmd/dumber/main.go +0 -3
| @@ -342,9 +342,6 @@ func handleParallelInitError(ctx context.Context, err error) { | |||
| 342 | 342 | ||
| 343 | 343 | func logDeferredInitResults(ctx context.Context, result bootstrap.DeferredInitResult) { | |
| 344 | 344 | log := logging.FromContext(ctx) | |
| 345 | - | if result.SQLiteErr != nil { | |
| 346 | - | log.Warn().Err(result.SQLiteErr).Msg("deferred sqlite wasm init failed") | |
| 347 | - | } | |
| 348 | 345 | if result.RuntimeErr != nil { | |
| 349 | 346 | if runtimeErr, ok := result.RuntimeErr.(*bootstrap.RuntimeRequirementsError); ok { | |
| 350 | 347 | runtimeErr.LogDetails(ctx) | |
| @@ -342,9 +342,6 @@ func handleParallelInitError(ctx context.Context, err error) { | |||||
| 342 | 342 | ||||
| 343 | func logDeferredInitResults(ctx context.Context, result bootstrap.DeferredInitResult) { | 343 | func logDeferredInitResults(ctx context.Context, result bootstrap.DeferredInitResult) { | ||
| 344 | log := logging.FromContext(ctx) | 344 | log := logging.FromContext(ctx) | ||
| 345 | - | if result.SQLiteErr != nil { | |||
| 346 | - | log.Warn().Err(result.SQLiteErr).Msg("deferred sqlite wasm init failed") | |||
| 347 | - | } | |||
| 348 | if result.RuntimeErr != nil { | 345 | if result.RuntimeErr != nil { | ||
| 349 | if runtimeErr, ok := result.RuntimeErr.(*bootstrap.RuntimeRequirementsError); ok { | 346 | if runtimeErr, ok := result.RuntimeErr.(*bootstrap.RuntimeRequirementsError); ok { | ||
| 350 | runtimeErr.LogDetails(ctx) | 347 | runtimeErr.LogDetails(ctx) | ||
M go.mod +1 -3
| @@ -3,6 +3,7 @@ module github.com/bnema/dumber | |||
| 3 | 3 | go 1.26.1 | |
| 4 | 4 | ||
| 5 | 5 | require ( | |
| 6 | + | github.com/bnema/purego-sqlite v0.1.1 | |
| 6 | 7 | github.com/bnema/puregotk v0.2.0 | |
| 7 | 8 | github.com/bnema/puregotk-webkit v0.0.15 | |
| 8 | 9 | github.com/charmbracelet/bubbles v1.0.0 | |
| @@ -11,7 +12,6 @@ require ( | |||
| 11 | 12 | github.com/ebitengine/purego v0.10.0 | |
| 12 | 13 | github.com/fsnotify/fsnotify v1.9.0 | |
| 13 | 14 | github.com/godbus/dbus/v5 v5.2.2 | |
| 14 | - | github.com/ncruces/go-sqlite3 v0.32.0 | |
| 15 | 15 | github.com/pelletier/go-toml/v2 v2.2.4 | |
| 16 | 16 | github.com/pressly/goose/v3 v3.27.0 | |
| 17 | 17 | github.com/rs/zerolog v1.34.0 | |
| @@ -49,7 +49,6 @@ require ( | |||
| 49 | 49 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | |
| 50 | 50 | github.com/muesli/cancelreader v0.2.2 // indirect | |
| 51 | 51 | github.com/muesli/termenv v0.16.0 // indirect | |
| 52 | - | github.com/ncruces/julianday v1.0.0 // indirect | |
| 53 | 52 | github.com/pmezard/go-difflib v1.0.0 // indirect | |
| 54 | 53 | github.com/rivo/uniseg v0.4.7 // indirect | |
| 55 | 54 | github.com/russross/blackfriday/v2 v2.1.0 // indirect | |
| @@ -61,7 +60,6 @@ require ( | |||
| 61 | 60 | github.com/spf13/pflag v1.0.10 // indirect | |
| 62 | 61 | github.com/stretchr/objx v0.5.3 // indirect | |
| 63 | 62 | github.com/subosito/gotenv v1.6.0 // indirect | |
| 64 | - | github.com/tetratelabs/wazero v1.11.0 // indirect | |
| 65 | 63 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | |
| 66 | 64 | go.uber.org/multierr v1.11.0 // indirect | |
| 67 | 65 | go.yaml.in/yaml/v3 v3.0.4 // indirect | |
| @@ -3,6 +3,7 @@ module github.com/bnema/dumber | |||||
| 3 | go 1.26.1 | 3 | go 1.26.1 | ||
| 4 | 4 | ||||
| 5 | require ( | 5 | require ( | ||
| 6 | + | github.com/bnema/purego-sqlite v0.1.1 | |||
| 6 | github.com/bnema/puregotk v0.2.0 | 7 | github.com/bnema/puregotk v0.2.0 | ||
| 7 | github.com/bnema/puregotk-webkit v0.0.15 | 8 | github.com/bnema/puregotk-webkit v0.0.15 | ||
| 8 | github.com/charmbracelet/bubbles v1.0.0 | 9 | github.com/charmbracelet/bubbles v1.0.0 | ||
| @@ -11,7 +12,6 @@ require ( | |||||
| 11 | github.com/ebitengine/purego v0.10.0 | 12 | github.com/ebitengine/purego v0.10.0 | ||
| 12 | github.com/fsnotify/fsnotify v1.9.0 | 13 | github.com/fsnotify/fsnotify v1.9.0 | ||
| 13 | github.com/godbus/dbus/v5 v5.2.2 | 14 | github.com/godbus/dbus/v5 v5.2.2 | ||
| 14 | - | github.com/ncruces/go-sqlite3 v0.32.0 | |||
| 15 | github.com/pelletier/go-toml/v2 v2.2.4 | 15 | github.com/pelletier/go-toml/v2 v2.2.4 | ||
| 16 | github.com/pressly/goose/v3 v3.27.0 | 16 | github.com/pressly/goose/v3 v3.27.0 | ||
| 17 | github.com/rs/zerolog v1.34.0 | 17 | github.com/rs/zerolog v1.34.0 | ||
| @@ -49,7 +49,6 @@ require ( | |||||
| 49 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | 49 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | ||
| 50 | github.com/muesli/cancelreader v0.2.2 // indirect | 50 | github.com/muesli/cancelreader v0.2.2 // indirect | ||
| 51 | github.com/muesli/termenv v0.16.0 // indirect | 51 | github.com/muesli/termenv v0.16.0 // indirect | ||
| 52 | - | github.com/ncruces/julianday v1.0.0 // indirect | |||
| 53 | github.com/pmezard/go-difflib v1.0.0 // indirect | 52 | github.com/pmezard/go-difflib v1.0.0 // indirect | ||
| 54 | github.com/rivo/uniseg v0.4.7 // indirect | 53 | github.com/rivo/uniseg v0.4.7 // indirect | ||
| 55 | github.com/russross/blackfriday/v2 v2.1.0 // indirect | 54 | github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
| @@ -61,7 +60,6 @@ require ( | |||||
| 61 | github.com/spf13/pflag v1.0.10 // indirect | 60 | github.com/spf13/pflag v1.0.10 // indirect | ||
| 62 | github.com/stretchr/objx v0.5.3 // indirect | 61 | github.com/stretchr/objx v0.5.3 // indirect | ||
| 63 | github.com/subosito/gotenv v1.6.0 // indirect | 62 | github.com/subosito/gotenv v1.6.0 // indirect | ||
| 64 | - | github.com/tetratelabs/wazero v1.11.0 // indirect | |||
| 65 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | 63 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | ||
| 66 | go.uber.org/multierr v1.11.0 // indirect | 64 | go.uber.org/multierr v1.11.0 // indirect | ||
| 67 | go.yaml.in/yaml/v3 v3.0.4 // indirect | 65 | go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
M go.sum +2 -6
| @@ -6,6 +6,8 @@ github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3v | |||
| 6 | 6 | github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= | |
| 7 | 7 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704 h1:0GaiO4102gOdp0es0MO2d0bRSvyeMw5A2D4F4WdIw0k= | |
| 8 | 8 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= | |
| 9 | + | github.com/bnema/purego-sqlite v0.1.1 h1:lH/F6/xxaI+LwWNHv3zof83bDJWQnib9OlNnBo/JnII= | |
| 10 | + | github.com/bnema/purego-sqlite v0.1.1/go.mod h1:nRVrkBt8dFOlSGGOOFM/ynlk34TOU1RlOvH4T9KM91s= | |
| 9 | 11 | github.com/bnema/puregotk v0.2.0 h1:lQ3zKbSRbAej/OWRlknrVTRxSzjxynamULjutV83bWM= | |
| 10 | 12 | github.com/bnema/puregotk v0.2.0/go.mod h1:Sl24sbCl02M/HLCNUgaYVCckkYcGOi8yxMuGuQVWsL8= | |
| 11 | 13 | github.com/bnema/puregotk-webkit v0.0.15 h1:CUcuoHfx+7AO1Diig7+NrEb7i5m/+MKTiQFUMH3j72k= | |
| @@ -84,12 +86,8 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU | |||
| 84 | 86 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= | |
| 85 | 87 | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= | |
| 86 | 88 | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= | |
| 87 | - | github.com/ncruces/go-sqlite3 v0.32.0 h1:hNBUXp88LrfQCsuyXLqWTbTUG35sUuktDsqhhgHvU20= | |
| 88 | - | github.com/ncruces/go-sqlite3 v0.32.0/go.mod h1:MIWTK60ONDl0oVY073zYvJP21C3Dly6P9bxVpgkLwdQ= | |
| 89 | 89 | github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= | |
| 90 | 90 | github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= | |
| 91 | - | github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= | |
| 92 | - | github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= | |
| 93 | 91 | github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= | |
| 94 | 92 | github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= | |
| 95 | 93 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |
| @@ -131,8 +129,6 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu | |||
| 131 | 129 | github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= | |
| 132 | 130 | github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= | |
| 133 | 131 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | |
| 134 | - | github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= | |
| 135 | - | github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= | |
| 136 | 132 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= | |
| 137 | 133 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= | |
| 138 | 134 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | |
| @@ -6,6 +6,8 @@ github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3v | |||||
| 6 | github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= | 6 | github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= | ||
| 7 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704 h1:0GaiO4102gOdp0es0MO2d0bRSvyeMw5A2D4F4WdIw0k= | 7 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704 h1:0GaiO4102gOdp0es0MO2d0bRSvyeMw5A2D4F4WdIw0k= | ||
| 8 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= | 8 | github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= | ||
| 9 | + | github.com/bnema/purego-sqlite v0.1.1 h1:lH/F6/xxaI+LwWNHv3zof83bDJWQnib9OlNnBo/JnII= | |||
| 10 | + | github.com/bnema/purego-sqlite v0.1.1/go.mod h1:nRVrkBt8dFOlSGGOOFM/ynlk34TOU1RlOvH4T9KM91s= | |||
| 9 | github.com/bnema/puregotk v0.2.0 h1:lQ3zKbSRbAej/OWRlknrVTRxSzjxynamULjutV83bWM= | 11 | github.com/bnema/puregotk v0.2.0 h1:lQ3zKbSRbAej/OWRlknrVTRxSzjxynamULjutV83bWM= | ||
| 10 | github.com/bnema/puregotk v0.2.0/go.mod h1:Sl24sbCl02M/HLCNUgaYVCckkYcGOi8yxMuGuQVWsL8= | 12 | github.com/bnema/puregotk v0.2.0/go.mod h1:Sl24sbCl02M/HLCNUgaYVCckkYcGOi8yxMuGuQVWsL8= | ||
| 11 | github.com/bnema/puregotk-webkit v0.0.15 h1:CUcuoHfx+7AO1Diig7+NrEb7i5m/+MKTiQFUMH3j72k= | 13 | github.com/bnema/puregotk-webkit v0.0.15 h1:CUcuoHfx+7AO1Diig7+NrEb7i5m/+MKTiQFUMH3j72k= | ||
| @@ -84,12 +86,8 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU | |||||
| 84 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= | 86 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= | ||
| 85 | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= | 87 | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= | ||
| 86 | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= | 88 | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= | ||
| 87 | - | github.com/ncruces/go-sqlite3 v0.32.0 h1:hNBUXp88LrfQCsuyXLqWTbTUG35sUuktDsqhhgHvU20= | |||
| 88 | - | github.com/ncruces/go-sqlite3 v0.32.0/go.mod h1:MIWTK60ONDl0oVY073zYvJP21C3Dly6P9bxVpgkLwdQ= | |||
| 89 | github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= | 89 | github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= | ||
| 90 | github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= | 90 | github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= | ||
| 91 | - | github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= | |||
| 92 | - | github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= | |||
| 93 | github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= | 91 | github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= | ||
| 94 | github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= | 92 | github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= | ||
| 95 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | 93 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
| @@ -131,8 +129,6 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu | |||||
| 131 | github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= | 129 | github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= | ||
| 132 | github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= | 130 | github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= | ||
| 133 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | 131 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | ||
| 134 | - | github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= | |||
| 135 | - | github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= | |||
| 136 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= | 132 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= | ||
| 137 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= | 133 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= | ||
| 138 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | 134 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | ||
M internal/bootstrap/gui.go +1 -10
| @@ -20,7 +20,6 @@ import ( | |||
| 20 | 20 | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |
| 21 | 21 | "github.com/bnema/dumber/internal/logging" | |
| 22 | 22 | "github.com/bnema/dumber/internal/ui/theme" | |
| 23 | - | sqlite3 "github.com/ncruces/go-sqlite3" | |
| 24 | 23 | ) | |
| 25 | 24 | ||
| 26 | 25 | // DatabaseResult holds database connection and cleanup function. | |
| @@ -43,7 +42,6 @@ type ParallelInitResult struct { | |||
| 43 | 42 | type DeferredInitResult struct { | |
| 44 | 43 | RuntimeErr error | |
| 45 | 44 | MediaErr error | |
| 46 | - | SQLiteErr error | |
| 47 | 45 | Duration time.Duration | |
| 48 | 46 | } | |
| 49 | 47 | ||
| @@ -155,17 +153,11 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult { | |||
| 155 | 153 | var ( | |
| 156 | 154 | runtimeErr error | |
| 157 | 155 | mediaErr error | |
| 158 | - | sqliteErr error | |
| 159 | 156 | wg sync.WaitGroup | |
| 160 | 157 | ) | |
| 161 | 158 | ||
| 162 | 159 | start := time.Now() | |
| 163 | - | wg.Add(3) | |
| 164 | - | ||
| 165 | - | go func() { | |
| 166 | - | defer wg.Done() | |
| 167 | - | sqliteErr = sqlite3.Initialize() | |
| 168 | - | }() | |
| 160 | + | wg.Add(2) | |
| 169 | 161 | ||
| 170 | 162 | go func() { | |
| 171 | 163 | defer wg.Done() | |
| @@ -182,7 +174,6 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult { | |||
| 182 | 174 | return DeferredInitResult{ | |
| 183 | 175 | RuntimeErr: runtimeErr, | |
| 184 | 176 | MediaErr: mediaErr, | |
| 185 | - | SQLiteErr: sqliteErr, | |
| 186 | 177 | Duration: time.Since(start), | |
| 187 | 178 | } | |
| 188 | 179 | } | |
| @@ -20,7 +20,6 @@ import ( | |||||
| 20 | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | 20 | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | ||
| 21 | "github.com/bnema/dumber/internal/logging" | 21 | "github.com/bnema/dumber/internal/logging" | ||
| 22 | "github.com/bnema/dumber/internal/ui/theme" | 22 | "github.com/bnema/dumber/internal/ui/theme" | ||
| 23 | - | sqlite3 "github.com/ncruces/go-sqlite3" | |||
| 24 | ) | 23 | ) | ||
| 25 | 24 | ||||
| 26 | // DatabaseResult holds database connection and cleanup function. | 25 | // DatabaseResult holds database connection and cleanup function. | ||
| @@ -43,7 +42,6 @@ type ParallelInitResult struct { | |||||
| 43 | type DeferredInitResult struct { | 42 | type DeferredInitResult struct { | ||
| 44 | RuntimeErr error | 43 | RuntimeErr error | ||
| 45 | MediaErr error | 44 | MediaErr error | ||
| 46 | - | SQLiteErr error | |||
| 47 | Duration time.Duration | 45 | Duration time.Duration | ||
| 48 | } | 46 | } | ||
| 49 | 47 | ||||
| @@ -155,17 +153,11 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult { | |||||
| 155 | var ( | 153 | var ( | ||
| 156 | runtimeErr error | 154 | runtimeErr error | ||
| 157 | mediaErr error | 155 | mediaErr error | ||
| 158 | - | sqliteErr error | |||
| 159 | wg sync.WaitGroup | 156 | wg sync.WaitGroup | ||
| 160 | ) | 157 | ) | ||
| 161 | 158 | ||||
| 162 | start := time.Now() | 159 | start := time.Now() | ||
| 163 | - | wg.Add(3) | 160 | + | wg.Add(2) |
| 164 | - | ||||
| 165 | - | go func() { | |||
| 166 | - | defer wg.Done() | |||
| 167 | - | sqliteErr = sqlite3.Initialize() | |||
| 168 | - | }() | |||
| 169 | 161 | ||||
| 170 | go func() { | 162 | go func() { | ||
| 171 | defer wg.Done() | 163 | defer wg.Done() | ||
| @@ -182,7 +174,6 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult { | |||||
| 182 | return DeferredInitResult{ | 174 | return DeferredInitResult{ | ||
| 183 | RuntimeErr: runtimeErr, | 175 | RuntimeErr: runtimeErr, | ||
| 184 | MediaErr: mediaErr, | 176 | MediaErr: mediaErr, | ||
| 185 | - | SQLiteErr: sqliteErr, | |||
| 186 | Duration: time.Since(start), | 177 | Duration: time.Since(start), | ||
| 187 | } | 178 | } | ||
| 188 | } | 179 | } | ||
M internal/infrastructure/persistence/sqlite/connection.go +1 -2
| @@ -8,8 +8,7 @@ import ( | |||
| 8 | 8 | "path/filepath" | |
| 9 | 9 | ||
| 10 | 10 | "github.com/bnema/dumber/internal/logging" | |
| 11 | - | _ "github.com/ncruces/go-sqlite3/driver" // SQLite driver (pure Go) | |
| 12 | - | _ "github.com/ncruces/go-sqlite3/embed" // Embed SQLite WASM binary | |
| 11 | + | _ "github.com/bnema/purego-sqlite/driver" // SQLite driver (purego, no WASM/CGo) | |
| 13 | 12 | ) | |
| 14 | 13 | ||
| 15 | 14 | // NewConnection creates a new SQLite database connection with optimized settings. | |
| @@ -8,8 +8,7 @@ import ( | |||||
| 8 | "path/filepath" | 8 | "path/filepath" | ||
| 9 | 9 | ||||
| 10 | "github.com/bnema/dumber/internal/logging" | 10 | "github.com/bnema/dumber/internal/logging" | ||
| 11 | - | _ "github.com/ncruces/go-sqlite3/driver" // SQLite driver (pure Go) | 11 | + | _ "github.com/bnema/purego-sqlite/driver" // SQLite driver (purego, no WASM/CGo) |
| 12 | - | _ "github.com/ncruces/go-sqlite3/embed" // Embed SQLite WASM binary | |||
| 13 | ) | 12 | ) | ||
| 14 | 13 | ||||
| 15 | // NewConnection creates a new SQLite database connection with optimized settings. | 14 | // NewConnection creates a new SQLite database connection with optimized settings. | ||
M internal/ui/component/omnibox.go +5 -4
| @@ -9,6 +9,11 @@ import ( | |||
| 9 | 9 | "time" | |
| 10 | 10 | "unicode/utf8" | |
| 11 | 11 | ||
| 12 | + | "github.com/bnema/puregotk/v4/gdk" | |
| 13 | + | "github.com/bnema/puregotk/v4/glib" | |
| 14 | + | "github.com/bnema/puregotk/v4/graphene" | |
| 15 | + | "github.com/bnema/puregotk/v4/gtk" | |
| 16 | + | ||
| 12 | 17 | "github.com/bnema/dumber/internal/application/usecase" | |
| 13 | 18 | "github.com/bnema/dumber/internal/domain/autocomplete" | |
| 14 | 19 | "github.com/bnema/dumber/internal/domain/entity" | |
| @@ -18,10 +23,6 @@ import ( | |||
| 18 | 23 | "github.com/bnema/dumber/internal/ui/input" | |
| 19 | 24 | "github.com/bnema/dumber/internal/ui/layout" | |
| 20 | 25 | "github.com/bnema/dumber/internal/ui/mainloop" | |
| 21 | - | "github.com/bnema/puregotk/v4/gdk" | |
| 22 | - | "github.com/bnema/puregotk/v4/glib" | |
| 23 | - | "github.com/bnema/puregotk/v4/graphene" | |
| 24 | - | "github.com/bnema/puregotk/v4/gtk" | |
| 25 | 26 | ) | |
| 26 | 27 | ||
| 27 | 28 | const ( | |
| @@ -9,6 +9,11 @@ import ( | |||||
| 9 | "time" | 9 | "time" | ||
| 10 | "unicode/utf8" | 10 | "unicode/utf8" | ||
| 11 | 11 | ||||
| 12 | + | "github.com/bnema/puregotk/v4/gdk" | |||
| 13 | + | "github.com/bnema/puregotk/v4/glib" | |||
| 14 | + | "github.com/bnema/puregotk/v4/graphene" | |||
| 15 | + | "github.com/bnema/puregotk/v4/gtk" | |||
| 16 | + | ||||
| 12 | "github.com/bnema/dumber/internal/application/usecase" | 17 | "github.com/bnema/dumber/internal/application/usecase" | ||
| 13 | "github.com/bnema/dumber/internal/domain/autocomplete" | 18 | "github.com/bnema/dumber/internal/domain/autocomplete" | ||
| 14 | "github.com/bnema/dumber/internal/domain/entity" | 19 | "github.com/bnema/dumber/internal/domain/entity" | ||
| @@ -18,10 +23,6 @@ import ( | |||||
| 18 | "github.com/bnema/dumber/internal/ui/input" | 23 | "github.com/bnema/dumber/internal/ui/input" | ||
| 19 | "github.com/bnema/dumber/internal/ui/layout" | 24 | "github.com/bnema/dumber/internal/ui/layout" | ||
| 20 | "github.com/bnema/dumber/internal/ui/mainloop" | 25 | "github.com/bnema/dumber/internal/ui/mainloop" | ||
| 21 | - | "github.com/bnema/puregotk/v4/gdk" | |||
| 22 | - | "github.com/bnema/puregotk/v4/glib" | |||
| 23 | - | "github.com/bnema/puregotk/v4/graphene" | |||
| 24 | - | "github.com/bnema/puregotk/v4/gtk" | |||
| 25 | ) | 26 | ) | ||
| 26 | 27 | ||||
| 27 | const ( | 28 | const ( | ||