Actually support analyzer 0.37 in moor_generator

This commit is contained in:
Simon Binder 2019-07-20 23:10:58 +02:00
parent f108090f7b
commit 1b4df63694
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
3 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,9 @@
## 1.6.0+1
## 1.6.0+2
- Generate code to expand array variables
_The +1 release has no changes to 1.6.0, there were issues while uploading to pub. +2 fixes
delivers on the promise of supporting the analyze 0.37_
## 1.5.0
- Parse custom queries and write generated mapping code.
- Refactorings and minor improvements in the generator

View File

@ -87,10 +87,7 @@ class TableParser extends ParserBase {
final parsedPrimaryKey = <SpecifiedColumn>{};
if (expression is SetOrMapLiteral) {
// todo replace with just "elements" when dropping support for analyzer
// 0.35.0
// ignore: deprecated_member_use
for (var entry in expression.elements2) {
for (var entry in expression.elements) {
if (entry is Identifier) {
final column = columns
.singleWhere((column) => column.dartGetterName == entry.name);
@ -98,7 +95,7 @@ class TableParser extends ParserBase {
} else {
// Don't add an error, these features aren't on a stable dart release
// yet.
print('Unexpected entry in expression.elements2: $entry');
print('Unexpected entry in expression.elements: $entry');
}
}
} else {

View File

@ -1,6 +1,6 @@
name: moor_generator
description: Dev-dependency to generate table and dataclasses together with the moor package.
version: 1.6.0+1
version: 1.6.0+2
repository: https://github.com/simolus3/moor
homepage: https://moor.simonbinder.eu/
issue_tracker: https://github.com/simolus3/moor/issues
@ -12,7 +12,7 @@ environment:
sdk: '>=2.2.0 <3.0.0'
dependencies:
analyzer: '>=0.35.2 <0.38.0'
analyzer: '>=0.36.0 <0.38.0'
recase: ^2.0.1
built_value: '>=6.3.0 <7.0.0'
source_gen: ^0.9.4