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

documentation for strong-mode rules #48650

Closed
DetachHead opened this issue Mar 23, 2022 · 8 comments
Closed

documentation for strong-mode rules #48650

DetachHead opened this issue Mar 23, 2022 · 8 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P4 type-documentation A request to add or improve documentation

Comments

@DetachHead
Copy link

Describe the issue
there seems to be no documentatioin for the analyzer.strong-mode options. though the implicit-casts option is mentioned briefly here, i can't seem to find any documentation for the other options.

i think there are 2 more (implicit-dynamic and declaration-casts)

@parlough
Copy link
Member

parlough commented Mar 23, 2022

Is there a reason you want to use the strong-mode options over the newer strict language modes as described in Enabling stricter type checks? They cover all of the previously covered situations and more.

We are still documenting implicit-casts there as the equivalent strict-casts mode was recently implemented in Dart 2.16. The plan is to remove the documentation around that in the future as well.

I think the actionable work here is probably to introduce diagnostics that the strong-mode options are deprecated and point towards to the new language modes.

@DetachHead
Copy link
Author

is there a analyzer.language equivalent to analyzer.strong-mode.implicit-dynamic?

@parlough
Copy link
Member

parlough commented Mar 23, 2022

I believe it is strict-inference that should cover similar situations and more and strict-raw-types covers cases related to missing type arguments resulting in dynamic bounds.

If you find any cases that are missing or could be caught but aren't, opening an SDK issue would be great :)

@DetachHead
Copy link
Author

raised #48651

@a-siva a-siva added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-documentation A request to add or improve documentation labels Mar 23, 2022
@scheglov
Copy link
Contributor

@srawlins

@scheglov scheglov added the P4 label Mar 23, 2022
@srawlins
Copy link
Member

The strong-mode rules are soft deprecated; soon to be for reals deprecated, so we will not be writing documentation for them.

@parlough
Copy link
Member

parlough commented Jun 14, 2023

I think this can be closed since the strong-mode rules were deprecated/removed in Dart 3 and the strict language modes are documented in https://dart.dev/guides/language/analysis-options#enabling-additional-type-checks :)

Edit: Never mind, looks like the removal was reverted in 94f20d7. Either way, we likely shouldn't document these deprecated modes.

@parlough
Copy link
Member

I'm going to close this as the replacement strict language modes are documented at https://dart.dev/tools/analysis#enabling-additional-type-checks and #50679 is tracking removing the old strong-mode options.

Please open an issue on site-www if you'd like to see any further improvements to the docs. Thanks!

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. P4 type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

5 participants