You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dart project can contain an analysis_options.yaml file that enables stricter type checking.
One of these options is implicit-dynamic: false
which will prevent the compiler from inferring dynamic unless it's explicitly annotated.
I propose changes to make the moor generator compatible with these stricter type checks.
They might be enabled by default in the future, anyway.
A somewhat related option implicit-casts: false will be enabled by default, when NNBD lands. ( see dart-lang/sdk#31410 (comment) ).
Projects that use implicit-dynamic: false and moor_generator currently need to exclude generated files from this rule ( e.g. by using exclude: [ lib/**/*.g.dart] in their analysis_options.yaml).
If this rule becomes the default in the future, all users of moor_generator would need to exclude thee files generated by moor_generator.
The steps needed to make the code compliant would be.
Thanks for the request and the detailed description. With the next generator release, the code will be compliant with implicit-dynamic: false. See also #268.
Context:
A dart project can contain an
analysis_options.yaml
file that enables stricter type checking.One of these options is
implicit-dynamic: false
which will prevent the compiler from inferring
dynamic
unless it's explicitly annotated.I propose changes to make the moor generator compatible with these stricter type checks.
They might be enabled by default in the future, anyway.
A somewhat related option
implicit-casts: false
will be enabled by default, when NNBD lands. ( see dart-lang/sdk#31410 (comment) ).Projects that use
implicit-dynamic: false
and moor_generator currently need to exclude generated files from this rule ( e.g. by using exclude: [lib/**/*.g.dart]
in theiranalysis_options.yaml
).If this rule becomes the default in the future, all users of moor_generator would need to exclude thee files generated by moor_generator.
The steps needed to make the code compliant would be.
to
to
The text was updated successfully, but these errors were encountered: