Commit Graph

92 Commits

Author SHA1 Message Date
dependabot[bot] 54977eea2a chore(deps): bump the shorebird_code_push-deps group (#333)
Bumps the shorebird_code_push-deps group in /shorebird_code_push with 2 updates: [ffigen](https://github.com/dart-lang/native/tree/main/pkgs) and [very_good_analysis](https://github.com/VeryGoodOpenSource/very_good_analysis).


Updates `ffigen` from 18.1.0 to 20.1.1
- [Release notes](https://github.com/dart-lang/native/releases)
- [Commits](https://github.com/dart-lang/native/commits/ffigen-v20.1.1/pkgs)

Updates `very_good_analysis` from 7.0.0 to 10.2.0
- [Release notes](https://github.com/VeryGoodOpenSource/very_good_analysis/releases)
- [Changelog](https://github.com/VeryGoodOpenSource/very_good_analysis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/VeryGoodOpenSource/very_good_analysis/compare/v7.0.0...v10.2.0)

---
updated-dependencies:
- dependency-name: ffigen
  dependency-version: 20.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
- dependency-name: very_good_analysis
  dependency-version: 10.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Seidel <eric@shorebird.dev>
2026-04-08 23:11:40 +00:00
Eric Seidel 563f1b773a fix: return UpdateInProgress status instead of erroring when another update is running (#335)
When `update()` is called while another update (typically the automatic
updater thread) is already running, the Rust updater previously bailed
with `UpdateError::UpdateAlreadyInProgress`, which surfaced in Dart as
`UpdateException: Update already in progress (unknown)`. This is the
single highest-volume `UpdateException` in customer telemetry, yet the
underlying situation is benign — the in-flight update continues on its
own, the caller simply did not start a new one.

Add a new `UpdateStatus::UpdateInProgress` variant and matching C
status code `SHOREBIRD_UPDATE_IN_PROGRESS = 4`. `updater::update()`
catches the `UpdateAlreadyInProgress` error from the lock helper and
maps it to `Ok(UpdateStatus::UpdateInProgress)`. The Dart wrapper
treats the new status as a successful return alongside
`SHOREBIRD_UPDATE_INSTALLED`, so `update()` no longer throws for this
case.

Update the existing `usage_during_hung_update` c_api test to assert the
new contract, and add a Dart test covering the in-progress return path.

Version skew: new Dart on an old engine still sees the legacy
`SHOREBIRD_UPDATE_ERROR` + "Update already in progress" message and
will still throw. The fix lands once both sides ship.

Partially addresses shorebirdtech/shorebird#3682 — does not resolve the
broader asymmetry of `update()` semantics (it still does not wait for
someone else's in-flight update to finish), which remains as v2 design
work in shorebirdtech/shorebird#3684.
2026-04-08 01:22:04 +00:00
Eric Seidel b8987364e3 fix: do not throw UpdateException on SHOREBIRD_NO_UPDATE (#334)
`ShorebirdUpdater.update()` previously threw `UpdateException: No update
(noUpdate)` whenever the patch check returned no available update, even
though that is a successful outcome of calling `update()` — the app is
already running the latest patch.

The wrapper only returned normally on `SHOREBIRD_UPDATE_INSTALLED`;
every other status (including `SHOREBIRD_NO_UPDATE`, value 0) fell
through to the generic `throw UpdateException(...)` path, which is
why callers saw `UpdateException: No update (noUpdate)` in their
exception telemetry.

Treat `SHOREBIRD_NO_UPDATE` as a successful return alongside
`SHOREBIRD_UPDATE_INSTALLED`. No FFI change, safe against any engine
version (status code 0 is stable).

Fixes shorebirdtech/shorebird#3681
2026-04-07 18:05:53 -07:00
Eric Seidel 6d0e4a1193 chore(deps): bump Rust and Dart dependencies (#315)
* chore(deps): bump Rust and Dart dependencies

Bump Rust dependencies in library/ and patch/:
- comde: 0.2.3 → 0.3.1 (library), 0.2.3 → 0.3.0 (patch)
- zip: 0.6.4 → 3.0.0 (breaking: FileOptions → SimpleFileOptions)
- android_logger: 0.13.0 → 0.15.0
- mockall: 0.12.1 → 0.13.1
- serial_test: 2.0.0 → 3.2.0
- cbindgen: 0.24.0 → 0.28.0

Bump Dart dev dependency in shorebird_code_push/:
- ffigen: upper bound <17.0.0 → <19.0.0

Updated zip API usage (FileOptions → SimpleFileOptions) and
adjusted test assertion for changed error message.

Binary size impact (macOS release, arm64):
- libupdater.a: +83 KB (+0.28%)
- libupdater.dylib: +34 KB (+0.75%)

Closes #206, #271, #273.

* chore: add EOCD to cspell dictionary

The zip 3.0 crate changed its error message to reference "EOCD"
(End of Central Directory), which cspell doesn't recognize.
2026-03-30 15:50:44 -07:00
Eric Seidel 6fe57f4ec8 fix: checkForUpdate reports restartRequired when current patch is rolled back (#312)
Previously, checkForUpdate returned upToDate after a rollback because
the condition `next != null && current?.number != next.number` treated
a null next patch as "up to date". After a rollback, the Rust updater
correctly uninstalls the patch (next becomes null), but the app is still
running the rolled-back patch (current is non-null). The simplified
condition `current?.number != next?.number` correctly detects this
mismatch and returns restartRequired.

Fixes https://github.com/shorebirdtech/shorebird/issues/3206
2026-03-30 14:45:00 -07:00
Eric Seidel dc2cd0a86a docs: warn that checkForUpdate/update make network calls (#311)
Users sometimes gate app startup on checkForUpdate() or update()
completing (e.g. awaiting in initState before showing content), which
can cause the app to appear stuck on the splash screen when the
network is slow.

Add warning doc comments to both methods recommending the .then()
pattern for startup code, and update README examples to use .then().

Fixes https://github.com/shorebirdtech/shorebird/issues/3179
2026-02-10 16:55:24 -08:00
dawn-ducky 504a0af1f6 Chore: Revise README for better structure and links (#303)
Updated README.md to improve branding, formatting and clarity.
2025-12-03 16:50:36 -06:00
Felix Angelov b2fbf7c3ee chore: various platforms updates (#295) 2025-09-17 16:48:24 -05:00
Eric Seidel abfc76662d fix(example): analysis warning (#293)
Co-authored-by: Felix Angelov <felix@shorebird.dev>
2025-09-12 16:58:13 -05:00
Felix Angelov dffafaff7a chore(shorebird_code_push): v2.0.5 (#294) 2025-09-12 16:51:27 -05:00
Nguyễn Văn Biên d47321b633 Update README.md: Update Discord logo (#283) 2025-06-22 04:43:32 +00:00
Bryan Oltman 5d7690cd37 chore: draft release 2.0.4 (#282) 2025-05-30 14:58:02 -04:00
Bryan Oltman f7b157f56f feat: allow for arbitrary track names (#281)
* feat: allow for arbitrary track names

* update readme
2025-05-29 17:58:05 -04:00
Albin PK 12f697d08b fix(shorebird_code_push): update error message to reflect desktop support (#279)
Co-authored-by: Bryan Oltman <bryanoltman@gmail.com>
2025-05-19 15:32:45 +00:00
Felix Angelov 8ec886b409 chore(example): update gradle 2025-05-16 10:16:13 -05:00
Bryan Oltman ab23721e35 fix: roll back patches in check_for_downloadable_update (#270)
* fix: roll back patches in check_for_downloadable_update

* Update docs
2025-02-12 20:29:06 +00:00
Felix Angelov 6edfb6eb78 refactor(shorebird_code_push): upgrade analysis_options (#269) 2025-02-07 16:09:32 -06:00
Felix Angelov cbe348ce3f chore(shorebird_code_push): v2.0.3 (#268) 2025-02-07 15:51:50 -06:00
0xcf2f 38efba0e6a feat(shorebird_code_push): override toString in exceptions (#266)
Co-authored-by: Felix Angelov <felix@shorebird.dev>
2025-02-07 15:47:56 -06:00
dependabot[bot] 4ca08d31bf chore(deps): bump very_good_analysis (#260)
Bumps the shorebird_code_push-deps group in /shorebird_code_push with 1 update: [very_good_analysis](https://github.com/VeryGoodOpenSource/very_good_analysis).


Updates `very_good_analysis` from 6.0.0 to 7.0.0
- [Release notes](https://github.com/VeryGoodOpenSource/very_good_analysis/releases)
- [Changelog](https://github.com/VeryGoodOpenSource/very_good_analysis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/VeryGoodOpenSource/very_good_analysis/compare/v6.0.0...v7.0.0)

---
updated-dependencies:
- dependency-name: very_good_analysis
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 17:43:34 -08:00
bryanoltman d735d107eb update gradle 2025-01-30 10:24:02 -05:00
bryanoltman dd6d4352d0 chore: update macOS project entitlements 2025-01-30 10:22:07 -05:00
dependabot[bot] c112de1229 chore(deps): bump ffigen (#245)
Bumps the shorebird_code_push-deps group in /shorebird_code_push with 1 update: [ffigen](https://github.com/dart-lang/native/tree/main/pkgs).


Updates `ffigen` from 15.0.0 to 16.0.0
- [Release notes](https://github.com/dart-lang/native/releases)
- [Commits](https://github.com/dart-lang/native/commits/HEAD/pkgs)

---
updated-dependencies:
- dependency-name: ffigen
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 09:24:59 -08:00
Eric Seidel 6298d37d86 chore: add cspell checking and make pass (#244)
* chore: add cspell checking and make pass

* chore(shorebird_code_push): minor improvements to example (#242)

* chore(shorebird_code_push): v2.0.2 (#243)

* chore: fix cspell

---------

Co-authored-by: Felix Angelov <felix@shorebird.dev>
2024-11-20 13:50:16 -05:00
Felix Angelov 7b124114ea chore(shorebird_code_push): v2.0.2 (#243) 2024-11-20 11:56:45 -06:00
Felix Angelov e0b533c3d6 chore(shorebird_code_push): minor improvements to example (#242) 2024-11-20 11:53:07 -06:00
Eric Seidel 2ae6afbb65 fix: unbreak web build for 2.x (#241)
* fix: unbreak web build

* chore: add cspell config
2024-11-20 11:35:49 -06:00
Bryan Oltman 8e40228558 fix typo 2024-11-20 09:51:02 -05:00
Bryan Oltman 60c38dc647 feat: 2.0.1 2024-11-20 09:50:21 -05:00
Bryan Oltman acfa307a94 fix: increase minimum flutter version to 3.24.5 (#240) 2024-11-20 09:47:18 -05:00
Bryan Oltman 7648128a1e chore: remove upper Flutter bound in shorebird_code_push as per pub validation warning 2024-11-14 16:33:49 -05:00
Bryan Oltman 47dd248f0e chore: prep version 2.0 (#237) 2024-11-14 16:31:05 -05:00
Bryan Oltman 13536daea1 docs: fix code sample in readme 2024-11-14 16:15:24 -05:00
Felix Angelov ee3f5ec669 feat(shorebird_code_push): track support (#232)
* feat(shorebird_code_push): track support

* cleanup and add todos

* docs

* run ffigen

* use c_char instead of char

* Add channel support

* tests

* tests

* update podfile.lock

* Update example to include tracks selector

---------

Co-authored-by: Bryan Oltman <bryan@shorebird.dev>
Co-authored-by: Bryan Oltman <bryanoltman@gmail.com>
2024-11-12 14:58:50 -05:00
Eric Seidel 59bcb311d5 docs: Clarify that update() Future only completes when download is done. (#236) 2024-11-11 14:56:10 -06:00
Felix Angelov 81894b56be docs(shorebird_code_push): minor improvements to snippet in README 2024-11-05 11:56:28 -06:00
Felix Angelov 488570d3f0 chore(shorebird_code_push): v2.0.0-dev.2 (#230) 2024-11-05 11:50:35 -06:00
Felix Angelov 099d5124f8 fix(shorebird_code_push): export ReadPatchException 2024-11-05 11:43:35 -06:00
Felix Angelov 25821df380 fix(shorebird_code_push): tighten library exports 2024-11-05 11:42:58 -06:00
Felix Angelov a2022e152e chore(shorebird_code_push): iOS project updates 2024-11-04 14:14:08 -06:00
Felix Angelov 6f1be35bd3 feat(shorebird_code_push): rewrite Dart API (#225) 2024-11-04 12:22:37 -06:00
dependabot[bot] daaea653b9 chore(deps): bump ffigen (#222)
Bumps the shorebird_code_push-deps group in /shorebird_code_push with 1 update: [ffigen](https://github.com/dart-lang/native/tree/main/pkgs).


Updates `ffigen` from 14.0.1 to 15.0.0
- [Release notes](https://github.com/dart-lang/native/releases)
- [Commits](https://github.com/dart-lang/native/commits/HEAD/pkgs)

---
updated-dependencies:
- dependency-name: ffigen
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 09:56:42 -04:00
Bryan Oltman 3384b91597 chore: prepare for release 1.1.6 2024-10-16 16:07:50 -04:00
Eric Seidel 3ad4166f23 feat: add a longer no-op message. (#218)
This is a common source of confusion, hopefully this will help.
2024-10-04 14:08:41 -05:00
dependabot[bot] 8dd189a739 chore(deps): bump ffigen (#214)
Bumps the shorebird_code_push-deps group with 1 update in the /shorebird_code_push directory: [ffigen](https://github.com/dart-lang/native/tree/main/pkgs).


Updates `ffigen` from 12.0.0 to 14.0.1
- [Release notes](https://github.com/dart-lang/native/releases)
- [Commits](https://github.com/dart-lang/native/commits/HEAD/pkgs)

---
updated-dependencies:
- dependency-name: ffigen
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: shorebird_code_push-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 15:43:11 -07:00
Eric Seidel de66ca0e78 docs: Add a bit more API docs for isNewPatchAvailableForDownload (#216) 2024-09-27 14:00:01 -04:00
Bryan Oltman 7324546a55 docs: update changelog for 1.1.5 2024-09-24 11:11:12 -04:00
Bryan Oltman ce9516acb3 chore: bump version to 1.1.5 2024-09-24 11:10:22 -04:00
Bryan Oltman 4c382e285a fix: add comment 2024-09-24 11:09:30 -04:00
Bryan Oltman db98cb1746 fix: show error if new update is not ready to install after running downloadUpdateIfAvailable 2024-09-24 11:06:35 -04:00