Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer implicit-dynamic: false has changed #40129

Closed
davidmorgan opened this issue Jan 14, 2020 · 5 comments
Closed

Analyzer implicit-dynamic: false has changed #40129

davidmorgan opened this issue Jan 14, 2020 · 5 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. strict-analysis-needed Mark issues where strict-raw-types, strict-inference and similar analysis options were helpful

Comments

@davidmorgan
Copy link
Contributor

I noticed different results between the dartanalyzer I have locally (prerelease) and the one on travis (2.8.0-dev.0.0). I get more results with the older version

error • Missing variable type for '_$dynamicOther'. • lib/generics.g.dart:1100:11 • implicit_dynamic_variable
...
error • Missing type argument for list literal. • test/imported_values_serializer_test.dart:26:7 • implicit_dynamic_list_literal

Looking at the analyzer changelogs it seems these error codes were removed. https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/CHANGELOG.md#0393

Removed error codes: ASSIGNMENT_CAST, StrongModeCode.DOWN_CAST_COMPOSITE, DOWN_CAST_IMPLICIT, DOWN_CAST_IMPLICIT_ASSIGN, DYNAMIC_CAST, DYNAMIC_INVOKE, IMPLICIT_DYNAMIC_FIELD, IMPLICIT_DYNAMIC_FUNCTION, IMPLICIT_DYNAMIC_INVOKE, IMPLICIT_DYNAMIC_LIST_LITERAL, IMPLICIT_DYNAMIC_MAP_LITERAL, IMPLICIT_DYNAMIC_METHOD, IMPLICIT_DYNAMIC_PARAMETER, IMPLICIT_DYNAMIC_RETURN, IMPLICIT_DYNAMIC_TYPE, IMPLICIT_DYNAMIC_VARIABLE, INFERRED_TYPE, INFERRED_TYPE_ALLOCATION, INFERRED_TYPE_CLOSURE, INFERRED_TYPE_LITERAL, and NON_GROUND_TYPE_CHECK_INFO. These were used internally by the analyzer for testing and were not exposed to users.

The assertion that these were not exposed to users seems to be incorrect--they were exposed if you use implicit-dynamic: false.

Please advise--is implicit-dynamic: false supported? If so we probably need those codes back :D

Thanks :)

@bwilkerson bwilkerson added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jan 14, 2020
@bwilkerson
Copy link
Member

@stereotype441 @scheglov

@scheglov
Copy link
Contributor

I removed these error codes because the language specification does not require them, and my understanding was that they were necessary only for DDC, which does not use analyzer anymore.

@knaeckeKami
Copy link

implicit-dynamic is mentioned here:
https://dart.dev/guides/language/analysis-options#enabling-additional-type-checks

and is incredibly useful IMO, as is prevents errors like this:

https://dartpad.dev/b42203ba5d7d8e5ff55f99bd003a81bf

(The user forgot to write the type parameter for in extends State<GenericShizzle> (instead of extends State<GenericShizzle>`, so he gets confusing errors at runtime).

@scheglov scheglov self-assigned this Jan 14, 2020
@scheglov
Copy link
Contributor

https://dart-review.googlesource.com/c/sdk/+/131723 will restore reporting IMPLICIT_DYNAMIC_*.

@davidmorgan
Copy link
Contributor Author

Thanks :)

dart-bot pushed a commit that referenced this issue Jan 16, 2020
This reverts commit a3ea61c.

We decided that analyzer should continue to provide this
functionality, at least until we have a better replacement.

Bug: #40129
Change-Id: Idd5ae37a6b8f8d39d374df2b0aaa04d7ee8bf3d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131723
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@eernstg eernstg added the strict-analysis-needed Mark issues where strict-raw-types, strict-inference and similar analysis options were helpful label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. strict-analysis-needed Mark issues where strict-raw-types, strict-inference and similar analysis options were helpful
Projects
None yet
Development

No branches or pull requests

5 participants