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

Document covariant elsewhere then retire "Fixing common type problems" page #6265

Open
parlough opened this issue Dec 10, 2024 · 1 comment
Labels
a.language Relates to the Dart language tour dev.type-system Relates to the type system in Dart e2-days Can complete in < 5 days of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month.

Comments

@parlough
Copy link
Member

parlough commented Dec 10, 2024

Page: https://dart.dev/guides/language/sound-problems#the-covariant-keyword
Source: https://github.com/dart-lang/site-www/blob/main/src/content/guides/language/sound-problems.md

The page was introduced in the context of sound Dart being new and before the diagnostic messages were well documented. Now the warnings documented here (and many more) have consistent documentation on the Diagnostic messages page.

The only parts not covered by that page is the section on runtime errors and the covariant keyword. These docs need a new home before retiring the page, or at least the covariant docs do. That probably belongs in the language docs anyway.

@parlough parlough added a.language Relates to the Dart language tour p1-high Major but not urgent concern: Resolve in months. Update each month. e2-days Can complete in < 5 days of normal, not dedicated, work dev.type-system Relates to the type system in Dart labels Dec 10, 2024
@parlough
Copy link
Member Author

parlough commented Dec 16, 2024

\cc @MaryaBelanger Any thoughts on where we can/should document the covariant keyword?

Perhaps https://dart.dev/language/type-system#methods and/or on https://dart.dev/language/methods?

The existing location has been outside of the normal language docs, resulting in people often not knowing the keyword exists. This is perhaps partially intentional as it moves a static error to runtime. So wherever we move it, perhaps a warning is needed alongside?

parlough added a commit that referenced this issue Dec 16, 2024
- Move the sound-problems doc to the deprecated directory, as most of it
is duplicated with diagnostic message docs. See
#6265 for follow up work.
- Delete the `/guides/language` index as it's not linked to from
anywhere and mostly duplicates introductions from other pages.

Contributes to #5767
Contributes to #6265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.language Relates to the Dart language tour dev.type-system Relates to the type system in Dart e2-days Can complete in < 5 days of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month.
Projects
None yet
Development

No branches or pull requests

1 participant