Giter Site home page Giter Site logo

Comments (5)

simolus3 avatar simolus3 commented on September 6, 2024 1

No problems, and hopefully pub workspaces will eventually fix these kinds of problems :)

By the way, since drift is a pure Dart package you can just add the sqlite3_flutter_libs package as a dependency to your UI/main app package and remove it from the services package. That might avoid these problems in the future as well.

from sqlite3.dart.

simolus3 avatar simolus3 commented on September 6, 2024

The problem appears to come from clemensg/sqlite3pod@a2b935e. Can you check what the minimum ios deployment version is in your Podfile? XCode 15 apparently requires iOS 12 as a minimum which is why that was added to the upstream dependency. Do you need support for iOS 11 or older versions? Flutter claims to not support that either.

from sqlite3.dart.

chris-NR avatar chris-NR commented on September 6, 2024

I think the podfile is the default that ships with flutter (I have not modified it). It does not specify an iOS version.

Podfile contents
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

I am using XCode 14. I can't upgrade to 15+ until I get a new macbook 😕

from sqlite3.dart.

simolus3 avatar simolus3 commented on September 6, 2024

Does it work if you uncomment platform :ios, '12.0'?

from sqlite3.dart.

chris-NR avatar chris-NR commented on September 6, 2024

Hmmm, before updating the Podfile I unpinned sqlite3_flutter_libs, re-ran 'flutter pub upgrade' and checked to see that the original problem was still reproducible - and it wasn't !! Here is the latest output from the upgrade:

Upgrade output
Resolving dependencies... (1.8s)
Downloading packages... 
  _fe_analyzer_shared 67.0.0 (68.0.0 available)
  analyzer 6.4.1 (6.5.0 available)
> args 2.5.0 (was 2.4.2)
> build_daemon 4.0.2 (was 4.0.1)
> build_runner 2.4.10 (was 2.4.8)
> built_value 8.9.2 (was 8.9.1)
> coverage 1.8.0 (was 1.7.2)
> drift 2.18.0 (was 2.16.0)
> drift_dev 2.18.0 (was 2.16.0)
> flutter_lints 3.0.2 (was 3.0.1) (4.0.0 available)
> freezed 2.5.2 (was 2.4.7) (2.5.3 available)
> frontend_server_client 4.0.0 (was 3.2.0)
> js 0.7.1 (was 0.6.7)
> json_annotation 4.9.0 (was 4.8.1)
> json_serializable 6.8.0 (was 6.7.1)
  lints 3.0.0 (4.0.0 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.12.0 (1.15.0 available)
> path_provider 2.1.3 (was 2.1.2)
> path_provider_android 2.2.4 (was 2.2.2)
> path_provider_foundation 2.4.0 (was 2.3.2)
  shelf_web_socket 1.0.4 (2.0.0 available)
> sqlite3 2.4.3 (was 2.4.0)
> sqlite3_flutter_libs 0.5.21 (was 0.5.20)
> sqlparser 0.36.0 (was 0.34.1)
> test 1.25.2 (was 1.24.9) (1.25.5 available)
> test_api 0.7.0 (was 0.6.1) (0.7.1 available)
> test_core 0.6.0 (was 0.5.9) (0.6.2 available)
> vm_service 14.2.2 (was 13.0.0)
> web 0.5.1 (was 0.5.0)
> web_socket_channel 2.4.5 (was 2.4.4) (3.0.0 available)
> win32 5.5.1 (was 5.2.0)
Changed 26 dependencies!
12 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

This puzzled me as I wasn't expecting anything other than the sqlite3_flutter_libs to change. On further investigation I think I understand what may have happened...

I have two packages in separate git repos. One for the UI and one for the Drift Database and other services. The 'Services package' only depends on flutter to enable the loading of the database from an asset as well as a file. The 'UI package' specifies it's dependency on the 'Services Package' via a local path in it's pubspec. This allows me to work on both packages simultaneously in a vscode workspace (I am the sole developer). I use 'test' for the Services and 'flutter_test' for the UI.

I hadn't appreciated (until now) that a consequence of this setup is that running 'flutter pub upgrade' on the 'UI package' does not upgrade the dependencies inside the 'Services Package'. The output in my original post, except for the pubspec (which was from the Services package 🙄 ), is from the 'UI package' and the output in this comment is from the 'Services package'.

I think I need to restructure my codebase - I will look at using a mono repo (like Drift) or using a 'proper' dependency rather than the path. I think this issue can be closed. Thanks for your support (and the excellent Drift package) and sorry for the false alarm.

from sqlite3.dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.