I have a lot of conflicts with other generators. Everyone is using different version of analyzer. and only the last one is actually working with Dart 2.10
Moor should work with Dart 2.10. Can you tell me what other generators you're using? I'm happy to take a look.
and only the last one is actually working with Dart 2.10
The analyzer package is generally causing some trouble all the time, but I think it should be fine for now? Moor supports versions 0.39.x, and afaik 0.39.15 supports 2.10 already. I can take a look at supporting version ^0.40.0 too though.
Well I have mobx and json_serializable, I think build_runner 1.10.3 wants analyzer 0.40.4, while mobx works with <0.40.0 seems like. not 100% sure. I was having rosetta_generator as well, but remove it as it is not well supported, it was using ancient version of everything.
supporting analyzer 0.40.0 is not that straight forward, actually. moor_generator depends on analyzer_plugin, where the latest published version depends on analyzer ^0.39.0, so we cannot upgrade to 0.40.0. The support for analyzer 0.40.0 for analyzer_plugin has been added at https://github.com/dart-lang/sdk/commit/03af042ec616eff1f0826dd8da240b00f64534e6 , but that's not published at pub.dev yet.
Furthermore, analyzer 0.40.0 contains breaking changes, it is now required to specify a withNullability parameter when calling .toDisplayString().
Since moor isn't migrated to NNBD (and NNBD isn't released), it should be enough to just pass false everywhere now.
I've added support for analyzer 0.40.0 here, but I think this should not yet be released, as it depends analyzer_plugin via a git-ref, which is kinda bad practice.
Once the new analyzer_plugin is released, I can make a PR. If anyone needs support for analyzer 0.40.0 for some reason, they can depend on my fork in the meantime.
I think this can be closed with the release of the moor generator 3.4.0?
Indeed, we now support the latest analyzer.
Most helpful comment
supporting analyzer 0.40.0 is not that straight forward, actually. moor_generator depends on analyzer_plugin, where the latest published version depends on analyzer ^0.39.0, so we cannot upgrade to 0.40.0. The support for analyzer 0.40.0 for analyzer_plugin has been added at https://github.com/dart-lang/sdk/commit/03af042ec616eff1f0826dd8da240b00f64534e6 , but that's not published at pub.dev yet.
Furthermore, analyzer 0.40.0 contains breaking changes, it is now required to specify a
withNullabilityparameter when calling .toDisplayString().Since moor isn't migrated to NNBD (and NNBD isn't released), it should be enough to just pass
falseeverywhere now.I've added support for analyzer 0.40.0 here, but I think this should not yet be released, as it depends analyzer_plugin via a git-ref, which is kinda bad practice.
Once the new analyzer_plugin is released, I can make a PR. If anyone needs support for analyzer 0.40.0 for some reason, they can depend on my fork in the meantime.