isar / isar

Extremely fast, easy to use, and fully async NoSQL database for Flutter
https://isar.dev
Apache License 2.0
3.63k stars 355 forks source link

isar_generator: depends on analyzer >=4.6.0 <6.0.0 #1505

Open nickolight opened 11 months ago

nickolight commented 11 months ago

Steps to Reproduce

Could you update the package dependencies? I want to use the latest version of the analyzer.

Code sample

Your current `analyzer` version may not fully support your current SDK version.

Analyzer language version: 3.1.0
SDK language version: 3.2.0

Please update to the latest `analyzer` version (6.3.0) by running
`flutter packages upgrade`.

Details

• Flutter version 3.16.1
• Dart version 3.2.1
• Platform android-33, build-tools 33.0.2

ndelanou commented 11 months ago

It could be a great idea to publish a new version for the v3 supporting analyzer > 6.x.x I'm currently using a fork that does just that because every other builders I use are compatible with analyzer 6.3.0. This is really straight forward.

sohaibbg commented 10 months ago

@ndelanou could you link said fork here? It would be of immense help; thanks

ndelanou commented 10 months ago

@sohaibbg Here you go: https://github.com/ndelanou/isar/tree/analyzer-v6

jennie-metacast commented 10 months ago

This would also address: https://github.com/isar/isar/issues/1468

farzaaaan commented 10 months ago

I'd like to +1 this request, as currently I have to comment / uncomment isar_generator and riverpod_lints due to dependency conflict on analyzer.

farzaaaan commented 10 months ago

just adding a comment here in case someone else is looking for a solution to this. it appears that using the following versions we won't need isar_generator any longer, hence resolving the analyzer dependency conflict:

isar: ^4.0.0-dev.14
isar_flutter_libs: ^4.0.0-dev.14
Yukinosuke-Takada commented 10 months ago

+1 to this request. Why is the dependency locked in below analyzer 6.0.0 in the first place? Wondering if changing it to ^6.0.0 would be safe like what @ndelanou did.

farzaaaan commented 10 months ago

going to add on this reply: using v4.0 had its own limitation, namely android sdk version. so I ended up using dependency_overrides and seems to be working without any issues:

dependency_overrides:
  analyzer: ^6.0.0

with this in place I can have all of below working nicely together:

dependencies:
  isar: ^3.1.0+1
  isar_flutter_libs: ^3.1.0+1

dev_dependencies:
  isar_generator: ^3.1.0+1
   riverpod_lint: ^2.3.7

so I guess since isar_generator package has been removed from v4+, the only viable solution until v4 is released is to use dependency_overrides. and we could close this issue?

just adding a comment here in case someone else is looking for a solution to this. it appears that using the following versions we won't need isar_generator any longer, hence resolving the analyzer dependency conflict:

isar: ^4.0.0-dev.14
isar_flutter_libs: ^4.0.0-dev.14
nickolight commented 9 months ago

To summarize how to make it work: The analyzer definition must be overridden in the "_dependenciesoverrides" section (analyzer: ^6.0.0). To use analyzer version 6.3.0, you should also override the meta package:

dependency_overrides:
  analyzer: ^6.3.0
  meta: ^1.11.0

It's like an opportunity for developers to run a project and move on, but not a packaged solution or solution for that issue. That issue will be closed when package dependencies are updated!