From c58f55c012e1970dab64e9b1f41762e0d04f9049 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 17 Dec 2024 11:46:34 +0100 Subject: [PATCH] chore: Make parse version error less sound --- .github/workflows/app.yml | 2 +- lib/src/utils/versions_comparator.dart | 5 ++--- scripts/test.sh | 2 +- test/client_test.dart | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 91e5529d..cdd83e2c 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -129,7 +129,7 @@ jobs: - name: Run tests run: | dart pub get - dart test test/box_test.dart --platform chrome + dart test test/box_test.dart --platform chrome --fail-fast pub-dev-dry-run: runs-on: ubuntu-latest diff --git a/lib/src/utils/versions_comparator.dart b/lib/src/utils/versions_comparator.dart index 8e1928bd..d08ba33d 100644 --- a/lib/src/utils/versions_comparator.dart +++ b/lib/src/utils/versions_comparator.dart @@ -13,11 +13,10 @@ bool isVersionGreaterThanOrEqualTo(String version, String target) { } return true; - } catch (e, s) { - Logs().e( + } catch (e) { + Logs().w( '[_isVersionGreaterThanOrEqualTo] Failed to parse version $version', e, - s, ); return false; } diff --git a/scripts/test.sh b/scripts/test.sh index 84207a80..3aa45815 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -6,7 +6,7 @@ if [ -n "$NO_OLM" ]; then tagFlag="-x olm" fi -dart test --concurrency=$thread_count --coverage=coverage_dir $tagFlag +dart test --concurrency=$thread_count --coverage=coverage_dir $tagFlag --fail-fast TEST_CODE=$? # lets you do more stuff like reporton diff --git a/test/client_test.dart b/test/client_test.dart index 162fb222..0cf30862 100644 --- a/test/client_test.dart +++ b/test/client_test.dart @@ -109,7 +109,7 @@ void main() { }); test('Login', () async { - matrix = Client( + final matrix = Client( 'testclient', httpClient: FakeMatrixApi(), databaseBuilder: getDatabase,