shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.31k stars 140 forks source link

feat: Install a specific Shorebird version #2591

Open alberto-sf opened 2 days ago

alberto-sf commented 2 days ago

Description

We have a big monorepo with many sub-packages and thus we're not always on latest Flutter. For example, right now the latest Flutter version is 3.24.4 but we're on 3.24.1.

We have noticed that the latest shorebird version (1.4.7) breaks our CI pipeline (it breaks while building the iOS app). We would like to try to install a previous shorebird version (1.4.6 for example) which should work again. However, we weren't able to find a command to install a specific Shorebird version. The install script points to stable so we always grab the latest version.

We would like to be able to somehow specify the shorebird version when installing the tool.

Requirements

Additional Context

As a temporary fix, we've forked the install script and updated install.sh to point to the previous release rather than stable

felangel commented 2 days ago

It sounds like the real bug here is that the latest version of shorebird breaks your iOS builds. Can you provide some more context regarding what’s breaking? You can still release and patch with older Flutter versions even when using the latest version of the Shorebird CLI, you just need to make sure to pass the --flutter-version flag to the release command.

opanitch commented 2 days ago

hey @felangel - I am on @alberto-sf's team as well and can provide some additional context.

here is the log from the first error we encountered after the 1.4.7 update. We run our CI/CD via CodeMagic, using Flutter v3.24.1, and have tried using the --flutter-version flag

shorebird release ios --flutter-version=3.24.1 --flavor development -t lib/main/main_development.dart --build-number=1831 -- --export-options-plist=ios/EnterpriseExportOptions.plist --release

Code Snippet ```sh IO : Writing 1155342 characters to text file /Users/builder/.pub-cache/log/pub_log.txt. [ +9 ms] Error (Xcode): Sandbox: rsync(25138) deny(1) file-write-create /Users/builder/Library/Developer/Xcode/DerivedData/Runner-eofjgqofdizcvkgieeconrzixyec/Build/Intermediates.noindex/ArchiveIntermediates/development/BuildProductsPath/Release-development-iphoneos/XCFrameworkIntermediates/EmbraceIO/Embrace.framework/.PrivacyInfo.xcprivacy.zygEw7 [ +1 ms] Encountered error while archiving for device. [ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:722:7) #2 BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:427:50) #3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1408:27) #4 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #5 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #6 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9) #7 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #8 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5) #9 run.. (package:flutter_tools/runner.dart:130:9) #10 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #11 main (package:flutter_tools/executable.dart:93:3) ```

We already have ENABLE_USER_SCRIPT_SANDBOXING set to NO

opanitch commented 2 days ago

might be a related issue: https://github.com/shorebirdtech/shorebird/issues/2590

opanitch commented 2 days ago

after attempting to downgrade to shorebird v1.4.6, we're now getting this error: https://stackoverflow.com/questions/79137784/after-updating-xcode-flutter-run-fails-with-memory-order-relaxed-semantic-issue

not sure if it's related

bryanoltman commented 2 days ago

I'd be curious to know if the underlying flutter build command works with non-shorebird flutter. If you run the shorebird release command with -v, you should see an invocation of flutter build ipa using Shorebird's version of Flutter. Would you mind trying that with non-Shorebird Flutter?

opanitch commented 2 days ago

unrelated, created a PR to the install script to add the ability to specify Shorebird version while troubleshooting: https://github.com/shorebirdtech/install/pull/35

am waiting for my CD run to complete

nguyendai-reddevil commented 1 day ago

same issue, i want to install version 0.18.4 but can't do it

bryanoltman commented 1 day ago

same issue, i want to install version 0.18.4 but can't do it

I would love to hear more about why. 0.18.4 came out almost a year ago and does not still work (you can test this yourself by navigating to the shorebird checkout and running git checkout v0.18.4)