Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 3816 - commented camerawesome #3824

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • awesome_flash.dart: commented everything
  • camera_scan_page.dart: commented references to camerawesome
  • Info.plist: wtf
  • Podfile.lock: wtf
  • project.pbxproj: wtf
  • pubspec.lock: wtf
  • pubspec.yaml: commented camerawesome and google_mlkit_barcode_scanning
  • smooth_barcode_scanner_awesome.dart: commented everything
  • smooth_barcode_scanner_visor.dart: commented everything

What

  • There were recent changes regarding the barcode scanners/flutter 3.7 (feat: 3712 - new mlkit and zxing scanners on flutter 3.7 #3767), and the focus (haha) was on android devices.
  • The results were good. Good enough to merge and upgrade to flutter 3.7.
  • Unfortunately, we didn't test on ios, and it looks like some minor language version issues (in mobile_scanner) prevent us from even compiling (iOS build is failing due to mobile_scanner #3780).
  • I PR'ed some fixes in fix: 544 - explicit returned type for compactMap juliansteenbakker/mobile_scanner#568, and those fixes need to be tested "for real".
  • Unfortunately it's not possible to test everything on my macbook because apple basterds are big fans of planned obsolescence.
  • In addition to that, @M123-dev added another layer of complexity by adding a barcode scanner (let's call it "camerawesome"). That was an appropriate timing because we were in a "test new barcode scanner options" phase. Unfortunately, this causes other ios compilation issues, which looks like incompatible mlkit versions.
  • The purpose of the current PR is to:
    • deactivate the brand new "camerawesome" code
    • in order to test the mobile_scanner PR without "camerawesome" turbulences
    • and hopefully give a "go for it!" to @juliansteenbakker
  • Once the tests are OK, we can put back the "camerawesome" code if relevant, assuming that we can fix the mlkit versions incompabilities

Part of

Impacted files:
* `awesome_flash.dart`: commented everything
* `camera_scan_page.dart`: commented references to `camerawesome`
* `Info.plist`: wtf
* `Podfile.lock`: wtf
* `project.pbxproj`: wtf
* `pubspec.lock`: wtf
* `pubspec.yaml`: commented `camerawesome` and `google_mlkit_barcode_scanning`
* `smooth_barcode_scanner_awesome.dart`: commented everything
* `smooth_barcode_scanner_visor.dart`: commented everything
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner March 29, 2023 12:43
@github-actions github-actions bot added dependencies 🍎 iOS iOS specific issues or PRs 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… labels Mar 29, 2023
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with commenting it out👍🏻

Lets hope it works

@monsieurtanuki monsieurtanuki merged commit f22cf52 into openfoodfacts:develop Mar 29, 2023
@monsieurtanuki
Copy link
Contributor Author

Thank you very much @M123-dev!
We'll see what happens.

@monsieurtanuki
Copy link
Contributor Author

@M123-dev I didn't work this time either.
It looks like the command for ios is (edited version):

cd ./packages/smooth_app
cd ios
pod update Sentry
cd ..
flutter build ios --release --no-codesign -t lib/entrypoints/ios/main_ios.dart

We have the same error message:

Updating local specs repositories
Adding spec repo `trunk` with CDN `[https://cdn.cocoapods.org/`](https://cdn.cocoapods.org/%60)
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleMLKit/BarcodeScanning":
  In snapshot (Podfile.lock):
    GoogleMLKit/BarcodeScanning (= 3.2.0, ~> 3.2.0)

  In Podfile:
    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 3.2.0, which depends on
      GoogleMLKit/BarcodeScanning (~> 4.0.0)


You have either:
 * changed the constraints of dependency `GoogleMLKit/BarcodeScanning` inside your development pod `mobile_scanner`.
   You should run `pod update GoogleMLKit/BarcodeScanning` to apply changes you've made.

It looks like GoogleMLKit/BarcodeScanning is a pain in the neck, like Sentry.
Would it be possible to add a specific refresh in the command list of the ios build?

cd ./packages/smooth_app
cd ios
pod update Sentry
pod update GoogleMLKit/BarcodeScanning
cd ..
flutter build ios --release --no-codesign -t lib/entrypoints/ios/main_ios.dart

@monsieurtanuki
Copy link
Contributor Author

ping @teolemon: btw if think you too have access to the CI/CD settings.

@juliansteenbakker
Copy link

@monsieurtanuki if you change the following in the pubspec, it will work. Please keep in mind that you should still fix the dependency issue by either forking & upgrading the camerawesome package in order to use the latest version of the mlkit library for ios.

  mobile_scanner:
    git:
      url: https://github.com/juliansteenbakker/mobile_scanner.git
      ref: master

to

  mobile_scanner:
    git:
      url: https://github.com/juliansteenbakker/mobile_scanner.git
      ref: ios-mlkit-3.2.0

@monsieurtanuki
Copy link
Contributor Author

Thank you @juliansteenbakker for your suggestion.
I will try it if what I've just tried in #3832 fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 🍎 iOS iOS specific issues or PRs 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants