From 7f63a23688662d24e507cef872e6b9559cd09fa4 Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 11:00:17 +0100 Subject: [PATCH 1/8] No special handling for linux --- lib/src/metadata/meta_data_collector.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/metadata/meta_data_collector.dart b/lib/src/metadata/meta_data_collector.dart index 30eb04cf..0769c74a 100644 --- a/lib/src/metadata/meta_data_collector.dart +++ b/lib/src/metadata/meta_data_collector.dart @@ -96,11 +96,11 @@ class MetaDataCollector { } Future _collectDeviceInfo() async { - if (!kIsWeb && Platform.isLinux) { - // it just hangs on linux for some reason - // https://github.com/fluttercommunity/plus_plugins/issues/1552 - return const DeviceInfo(); - } + // if (!kIsWeb && Platform.isLinux) { + // // it just hangs on linux for some reason + // // https://github.com/fluttercommunity/plus_plugins/issues/1552 + // return const DeviceInfo(); + // } try { final deviceInfo = await DeviceInfoPlugin().deviceInfo; From a5eeef4feb3235cdbd5e8daf47acd23135562f7c Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 11:14:55 +0100 Subject: [PATCH 2/8] Remove code --- lib/src/metadata/meta_data_collector.dart | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/src/metadata/meta_data_collector.dart b/lib/src/metadata/meta_data_collector.dart index 0769c74a..678a0be4 100644 --- a/lib/src/metadata/meta_data_collector.dart +++ b/lib/src/metadata/meta_data_collector.dart @@ -96,12 +96,6 @@ class MetaDataCollector { } Future _collectDeviceInfo() async { - // if (!kIsWeb && Platform.isLinux) { - // // it just hangs on linux for some reason - // // https://github.com/fluttercommunity/plus_plugins/issues/1552 - // return const DeviceInfo(); - // } - try { final deviceInfo = await DeviceInfoPlugin().deviceInfo; From 12c8823177d83bff4db4a0348c381f556e23a8ab Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 11:15:04 +0100 Subject: [PATCH 3/8] Show exact dependencies --- .github/workflows/pr.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 91dcc0f8..dbf54c2b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -34,6 +34,8 @@ jobs: run: flutter doctor -v - name: Download dependencies run: ./wiresdk deps + - name: print deps + run: cd examples/theming && ./../../wiresdk flutter pub deps - name: Test run: ./wiresdk test - name: Build From ec52645a2fc40218f0f39fc620373a4c3402f0fc Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 11:18:09 +0100 Subject: [PATCH 4/8] Also test on 3.7.3 --- .github/workflows/pr.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index dbf54c2b..8b7efe62 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -41,6 +41,23 @@ jobs: - name: Build run: cd examples/theming && ./../../wiresdk flutter build web + pr-flutter_3_7_3: + runs-on: ubuntu-latest + container: + image: cirrusci/flutter:3.7.3 + steps: + - uses: actions/checkout@v3 + - name: Flutter version + run: flutter doctor -v + - name: Download dependencies + run: ./wiresdk deps + - name: print deps + run: cd examples/theming && ./../../wiresdk flutter pub deps + - name: Test + run: ./wiresdk test + - name: Build + run: cd examples/theming && ./../../wiresdk flutter build web + pr-stable: runs-on: ubuntu-latest container: From ecbe8dc6e18431d8b7b8d28266b170a02368fd50 Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 11:41:06 +0100 Subject: [PATCH 5/8] Try Flutter 3.3.10 --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8b7efe62..917ea364 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -41,10 +41,10 @@ jobs: - name: Build run: cd examples/theming && ./../../wiresdk flutter build web - pr-flutter_3_7_3: + pr-flutter_3_3_10: runs-on: ubuntu-latest container: - image: cirrusci/flutter:3.7.3 + image: cirrusci/flutter:3.3.10 steps: - uses: actions/checkout@v3 - name: Flutter version From 637113b3f074359de78e0a1d94043e91ad94bbbc Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 12 Feb 2024 13:44:33 +0100 Subject: [PATCH 6/8] Do now swallow error --- lib/src/metadata/meta_data_collector.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/src/metadata/meta_data_collector.dart b/lib/src/metadata/meta_data_collector.dart index 678a0be4..1beb9cee 100644 --- a/lib/src/metadata/meta_data_collector.dart +++ b/lib/src/metadata/meta_data_collector.dart @@ -150,13 +150,15 @@ class MetaDataCollector { // there's not way to get the model of windows or linux devices } catch (e, stack) { - const issue1552 = - "type 'BaseDeviceInfo' is not a subtype of type 'LinuxDeviceInfo' in type cast"; - if (e.toString().contains(issue1552)) { - // ignore, will be fixed in an upcoming device_info_plus release - // https://github.com/fluttercommunity/plus_plugins/issues/1552 - return const DeviceInfo(); - } + // const issue1552 = + // "type 'BaseDeviceInfo' is not a subtype of type 'LinuxDeviceInfo' in type cast"; + // if (e.toString().contains(issue1552)) { + // // ignore, will be fixed in an upcoming device_info_plus release + // // https://github.com/fluttercommunity/plus_plugins/issues/1552 + // return const DeviceInfo(); + // } + print(e); + print(stack); reportWiredashError( e, From e9a9df68da27b3bcffd58df3d37d95efb2b78e23 Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 6 May 2024 01:42:33 +0200 Subject: [PATCH 7/8] Swallow linux error again --- lib/src/metadata/meta_data_collector.dart | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/src/metadata/meta_data_collector.dart b/lib/src/metadata/meta_data_collector.dart index 4e0968aa..d7b497c7 100644 --- a/lib/src/metadata/meta_data_collector.dart +++ b/lib/src/metadata/meta_data_collector.dart @@ -1,8 +1,6 @@ import 'dart:async'; -import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; -import 'package:flutter/foundation.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:wiredash/src/_wiredash_internal.dart'; import 'package:wiredash/wiredash.dart'; @@ -149,16 +147,13 @@ class MetaDataCollector { // there's not way to get the model of windows or linux devices } catch (e, stack) { - // const issue1552 = - // "type 'BaseDeviceInfo' is not a subtype of type 'LinuxDeviceInfo' in type cast"; - // if (e.toString().contains(issue1552)) { - // // ignore, will be fixed in an upcoming device_info_plus release - // // https://github.com/fluttercommunity/plus_plugins/issues/1552 - // return const DeviceInfo(); - // } - print(e); - print(stack); - + const issue1552 = + "type 'BaseDeviceInfo' is not a subtype of type 'LinuxDeviceInfo' in type cast"; + if (e.toString().contains(issue1552)) { + // ignore, will be fixed in an upcoming device_info_plus release + // https://github.com/fluttercommunity/plus_plugins/issues/1552 + return const DeviceInfo(); + } reportWiredashInfo( e, stack, From 731f088e68c866a27263f286d3f45999f9f63b54 Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Mon, 6 May 2024 01:51:09 +0200 Subject: [PATCH 8/8] Fix override --- .github/workflows/pr.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index a041f0cb..a32e34b4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -60,11 +60,7 @@ jobs: - name: Download dependencies run: | # Override dependencies - printf "dependency_overrides:\n checks: 0.2.2\n meta: 1.9.0\n test_api: 0.4.9" >> pubspec.yaml - - # The override syntax does not work with Flutter 3.0 - #./wiresdk flutter pub add 'override:checks:0.2.2' - + printf "dependency_overrides:\n checks: 0.2.2\n meta: 1.9.0\n test_api: 0.4.12" >> pubspec.yaml ./wiresdk deps - name: Test run: ./wiresdk test