fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.29k stars 301 forks source link

analyzer >=6.8.0 is incompatible with flutter from sdk. but frb require analyzer 6.11.0 #2408

Open cryuhy opened 1 week ago

cryuhy commented 1 week ago

Describe the bug

analyzer >=6.8.0 is incompatible with flutter from sdk. but frb require analyzer 6.11.0

Steps to reproduce

no

Logs

no

Expected behavior

No response

Generated binding code

No response

OS

No response

Version of flutter_rust_bridge_codegen

No response

Flutter info

[✓] Flutter (Channel stable, 3.24.4, on macOS 14.6.1 23G93 darwin-arm64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.79.1)
[✓] Connected device (5 available)
    ! Error: Browsing on the local area network for chenrui. Ensure the device
      is unlocked and attached with a cable or associated with the same local
      area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code
      -27)
[✓] Network resources

Version of clang++

No response

Additional context

our flutter is newest version

fzyzcjy commented 1 week ago

Hi, could you please show your pubspec.yaml? I am confused why latest flutter does not support recent analyzer...

cryuhy commented 1 week ago

name: redoc
description: Red Doc
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.20.3+1203500
environment:
  sdk: '>=3.0.0 <4.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  lib_im_sdk:
    path: ./lib_cask/lib_im_sdk
  flutter:
    sdk: flutter
  retrofit: '4.1.0'
  webview_flutter: ^3.0.4
  apm_flutter:
    git:
      url: git@code.devops.xiaohongshu.com:city_mobile/flutter_apm.git
      ref: 1.0.6
      #      本地依赖
#          path: ../flutter_apm
  network_type_reachability:
    git:
      url: git@code.devops.xiaohongshu.com:city_mobile/network_type_reachability_redcity.git
      ref: 1.0.1
#       path:  ../network_type_reachability_redcity
  flutter_inappwebview:
    git:
      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/flutter_inappwebview.git
#      ref: 0.0.7
      ref: fixios18
#     path:   ../flutter_inappwebview/
  cached_network_image: ^3.3.1
  flutter_cache_manager: ^3.3.1
  awesome_dio_interceptor: 1.2.0
  shared_preferences: ^2.0.15
  dio_proxy_plugin:
    git:
      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/dio_proxy_plugin.git
      ref: 0.0.1
  wecom_flutter:
#    path: /Users/chenrui/wecom_flutter/
    git:
      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/wecom_flutter.git
      ref: 0.0.3
  uni_links:
    git:
      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/uni_links.git
      ref: 0.0.1
      path: uni_links
  fluttertoast: ^8.2.1
  json_annotation: ^4.8.0
  easy_refresh: ^3.3.0
  badges: ^3.0.2
  event_bus: ^2.0.0
  archive: 3.6.1
  flutter_app_badger: ^1.5.0
  visibility_detector: ^0.4.0+2
  photo_view: ^0.14.0
  web_socket_channel: ^2.3.0
#  flutter_advanced_switch: ^3.1.0
  image_gallery_saver: ^2.0.3
  permission_handler: ^9.2.0
  xml: ^6.2.2
  stream_transform: ^2.1.0
  url_launcher: ^6.1.10
  app_install_date: ^0.1.2
  package_info_plus: ^8.0.2
  provider: ^6.0.0
  diff_match_patch: ^0.4.1
  cupertino_icons: ^1.0.6
  flutter_image_compress: ^2.3.0
  image_cropper:
    git:
      url: git@code.devops.xiaohongshu.com:city_mobile/image_cropper.git
      ref: main
  skeletonizer: ^1.4.2
  encrypt: ^5.0.0
  pointycastle: ^3.4.0
  ## crash、log
  sentry_flutter:
#    path: /Users/chenrui/red_sentry_flutter/
    git:
      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/red_sentry_flutter.git
      ref: 0.0.1
  ## config
  flutter_config: ^2.0.0
  ## networ check
  connectivity_plus: ^4.0.1
  ## 沙盒路径
  path_provider: ^2.0.2
  ## 骨架屏
  skeletons:
#      path: /Users/chenrui/red_skeletons/
      git:
        url: git@code.devops.xiaohongshu.com:red-flutter-2.0/red_skeletons.git
        ref: 0.0.3
  ## 左滑删除widget
  flutter_slidable: ^3.0.0
  watcher: ^1.1.0
  flutter_keyboard_visibility: ^5.4.1
  lottie: ^2.6.0
  easy_debounce: ^2.0.3
  flutter_sticky_header: ^0.6.5
  uuid: 4.1.0
  cookie_jar: ^3.0.1
  get: ^4.6.6
  system_info_plus: ^0.0.5
  battery_info: ^1.1.1
  curl_logger_dio_interceptor: 1.0.0
  restart_app: ^1.2.1
  super_clipboard: 0.8.24
  device_info_plus:  10.0.1
  android_id: ^0.3.6
  intl: ^0.19.0
  device_orientation: ^1.0.0
  orientation_lock_checker: ^0.0.1
  #MD5 hash
  crypto: 3.0.6
  image_picker: ^1.1.0
#  red_push:
#    path: /Users/chenrui/red_push/
#    git:
#      url: git@code.devops.xiaohongshu.com:red-flutter-2.0/red_push.git
#      ref: 0.0.2
  scrollable_positioned_list: ^0.3.8
  tencentcloud_cos_sdk_plugin:
    git:
      url: git@code.devops.xiaohongshu.com:city_mobile/xhs_tencentcloud_cos_sdk_plugin.git
      ref: 0.0.3
#       path: /Users/chenrui/xhs_tencentcloud_cos_sdk_plugin
  flutter_spinkit: ^5.1.0
  focus_detector_v2: ^3.1.0+1
#  logger: ^2.4.0
  just_audio: ^0.9.39
  just_audio_background: ^0.0.1-beta.13
  flutter_rust_bridge: 2.0.0-dev.33

dependency_overrides:
  package_info_plus: ^8.0.2
  web: 1.0.0
  dio: ^5.4.0

#  image_cropper: 8.0.0
  http: ^1.0.0
  win32: ^5.5.4

dev_dependencies:
  flutter_test:
    sdk: flutter
  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  retrofit_generator: '8.1.0'
  build_runner: '>2.3.0 <4.0.0'
  json_serializable: ^6.6.0
  cupertino_icons: ^1.0.6
  restart_app: ^1.2.1
  analyzer: ^6.4.1
  freezed: 2.5.2
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# 目前该配置没有生效,大家有兴趣一起探究下原因~
scripts:
  post_install: dart execute_commit_limit.dart

# The following section is specific to Flutter packages.
flutter:
  fonts:
    - family: iconfont
      fonts:
        - asset: assets/fonts/iconfont.ttf
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true
  # To add assets to your application, add an assets section, like this:
  assets:
    - image/
    - image/3.0x/
    - assets/lottie/
    - assets/lottie/images/
    - lib/document/
    - lib/document/controller/

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
#   - family: Schyler
#     fonts:
#       - asset: fonts/Schyler-Regular.ttf
#       - asset: fonts/Schyler-Italic.ttf
#         style: italic
#   - family: Trajan Pro
#     fonts:
#       - asset: fonts/TrajanPro.ttf
#       - asset: fonts/TrajanPro_Bold.ttf
#         weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
i change analyzer to 6.11.0 show this error
fzyzcjy commented 1 week ago

flutter_rust_bridge: 2.0.0-dev.33

Hmm, firstly could you please try latest frb and see whether it works?

cryuhy commented 1 week ago

ok thank you

fzyzcjy commented 1 week ago

You are welcome!