Jaguar-dart / jaguar_orm

Source-generated ORM with relations (one-to-one, one-to-many, many-to-many), preloading, cascading, polymorphic relations, etc
https://jaguar-dart.github.io
BSD 3-Clause "New" or "Revised" License
217 stars 52 forks source link

Compatibility issues with build_runner #194

Open adrianseraspi12 opened 4 years ago

adrianseraspi12 commented 4 years ago

There is a compatibility issues between build_runner and jaguar_orm_gen

dev_dependencies: build_runner: ^1.10.1jaguar_orm_gen: ^2.2.30

Here is the error logs Because no versions of jaguar_orm_gen match >2.2.30 <3.0.0 and jaguar_orm_gen 2.2.30 depends on analyzer ^0.38.0, jaguar_orm_gen ^2.2.30 requires analyzer ^0.38.0. And because build_runner >=1.10.1 <1.10.2 depends on analyzer 0.39.14 and build_runner >=1.10.2 requires SDK version >=2.10.0-0.0 <3.0.0, jaguar_orm_gen ^2.2.30 is incompatible with build_runner >=1.10.1. So, because todo_app depends on both build_runner ^1.10.1 and jaguar_orm_gen ^2.2.30, version solving failed. pub get failed (1; So, because todo_app depends on both build_runner ^1.10.1 and jaguar_orm_gen ^2.2.30, version solving failed.)

I tried the old version of build_runner (1.9.0) and it works. It only happens when I try to set the build_runner to its new version. and also when I try to import with json_serializable, it only works with version (3.2.2) but not with the newest version of json_serializable

Davletvm commented 4 years ago

Try correct pubspec.yaml like this

name: klretail description: Boilerplate application for Jaguar with a sample HTTP server using mux version: 2.4.1 authors:

environment: sdk: ">=2.0.0<3.0.0"

dependencies: jaguar: ^2.4.4

jaguar_orm: ^2.2.7

jaguar_query_postgres: ^2.2.6

dev_dependencies: build_runner: ^1.7.0 jaguar_orm_gen: ^2.2.30

benys commented 4 years ago

I had a problem in my project. I had conflict with Flutter 1.20 and tests packages.

I fixed it by change in jaguar_orm_gen pubspec analyser to analyzer: ^0.39.5.

Do you think about dependencies upgrade?

Skuallpa commented 4 years ago

I'm also facing some conflicts after upgrading flutter to version 1.22.2, which forced me to upgrade some other packages.

Now, I'm facing a conflict using jaguar_orm and mockito at the same time:

And because jaguar_orm_gen 2.2.30 depends on analyzer ^0.38.0 and no versions of jaguar_orm_gen match >2.2.30 <3.0.0, mockito ^4.1.3 is incompatible with jaguar_orm_gen ^2.2.30.

Would it be possible to upgrade jaguar_orm_gen to use a more recent version of the analyzer?

devjeff commented 3 years ago

The package wasn't updated for a while. Since the other generation related packages like chopper, mockito etc. continue to improve they rely on a newer version of the analyzer package. Therefore, this package should be upgrade to use a newer analyzer version, as it becomes impossible to use both packages together (even with dependency overrides).

tejainece commented 3 years ago

I will fix it

devjeff commented 3 years ago

I think, a good analyzer version would be "analyzer: ^0.40.4", which is compatible with build_runner "^1.11.1". A higher version requires further dependency updates. This is also compatible with the latest version of chopper_generator.

wanze commented 3 years ago

I will fix it

Would be nice to get a new release with updated dependencies, thanks! 😄 👍

tejainece commented 3 years ago

I will fix this. I am currently working Jaguar web server project. As soon as I am done with it, I will work on this pavkage.