-
Notifications
You must be signed in to change notification settings - Fork 713
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
[2.19] Clarify library
usage for no-name declarations update
#4390
Conversation
Ignores some new hints where they are not relevant due to purposely showcasing that behavior or having dead code. Also updates the diagnostic message for one updated in the dev branch.
Can you run |
@parlough Thanks for the tips, that kind of got away from me and wasn't sure what to do :/ |
Visit the preview URL for this PR (updated for commit 8083f79): https://dart-dev--pr4390-library-directive-hasb6snu.web.app (expires Mon, 28 Nov 2022 20:47:38 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: d851bc446d3c4d7394c5406c6f07255afc7075f3 |
@MaryaBelanger Let me know if you have any issues :) |
library
usage for no-name declarations update library
usage for no-name declarations update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks GREAT! Wait for at least one more approver, though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💎
So awesome! |
I'm actually going to change this to a draft because it shouldn't be merged until 2.19 releases, but thanks for the reviews everyone! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
@munificent Thank you, incorporated all of that! Going to mark as RFM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's super exciting to finally clean up our messaging around the library
directive and have some proper suggestions. Nice job :D
I have a few comments and questions. Please push back on anything that doesn't make sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those adjustments. I responded to the unresolved discussion and left another potential suggestion.
Co-authored-by: Parker Lougheed <parlough@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
Co-authored-by: Parker Lougheed <parlough@gmail.com>
fixes #4314 Changes: - Added [code sample](https://lib-dir-docs.web.app/guides/language/effective-dart/documentation#consider-writing-a-library-level-doc-comment) to existing library-level doc comment section - Added [Don't use library directives unless attaching doc comments or annotations](https://lib-dir-docs.web.app/guides/language/effective-dart/usage#dont-use-library-directives-unless-attaching-doc-comments-or-annotations) section - Added [Don't explicitly name libraries](https://lib-dir-docs.web.app/guides/language/effective-dart/usage#dont-explicitly-name-libraries) section - Reduced [`part of`](https://lib-dir-docs.web.app/guides/language/effective-dart/usage#do-use-strings-in-part-of-directives) section - Removed / modified unnecessary notes about the library directive on the [Creating packages](https://lib-dir-docs.web.app/guides/libraries/create-library-packages) page I thought about completely removing the `part of` section in Effective Dart: Usage, in favor of the more general new section "Don't explicitly name libraries", because it's not even recommended to use `part of` at all anymore. The new section could add a code example similar to the one for `part of` that more generally illustrates "Use URI strings to refer to libraries", and the linter rule could point to that section instead. Thoughts? @kevmoo @pq etc. Co-authored-by: Parker Lougheed <parlough@gmail.com> Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
Fixes #4314 Changes: - Added [code sample](https://dart.dev/guides/language/effective-dart/documentation#consider-writing-a-library-level-doc-comment) to existing library-level doc comment section - Added [Don't use library directives unless attaching doc comments or annotations](https://dart.dev/guides/language/effective-dart/usage#dont-use-library-directives-unless-attaching-doc-comments-or-annotations) section - Added [Don't explicitly name libraries](https://dart.dev/guides/language/effective-dart/usage#dont-explicitly-name-libraries) section - Reduced [`part of`](https://dart.dev/guides/language/effective-dart/usage#do-use-strings-in-part-of-directives) section - Removed / modified unnecessary notes about the library directive on the [Creating packages](https://dart.dev/guides/libraries/create-library-packages) page Co-authored-by: Parker Lougheed <parlough@gmail.com> Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
Fixes #4314 Changes: - Added [code sample](https://dart.dev/guides/language/effective-dart/documentation#consider-writing-a-library-level-doc-comment) to existing library-level doc comment section - Added [Don't use library directives unless attaching doc comments or annotations](https://dart.dev/guides/language/effective-dart/usage#dont-use-library-directives-unless-attaching-doc-comments-or-annotations) section - Added [Don't explicitly name libraries](https://dart.dev/guides/language/effective-dart/usage#dont-explicitly-name-libraries) section - Reduced [`part of`](https://dart.dev/guides/language/effective-dart/usage#do-use-strings-in-part-of-directives) section - Removed / modified unnecessary notes about the library directive on the [Creating packages](https://dart.dev/guides/libraries/create-library-packages) page Co-authored-by: Parker Lougheed <parlough@gmail.com> Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
Fixes #4314 Changes: - Added [code sample](https://dart.dev/guides/language/effective-dart/documentation#consider-writing-a-library-level-doc-comment) to existing library-level doc comment section - Added [Don't use library directives unless attaching doc comments or annotations](https://dart.dev/guides/language/effective-dart/usage#dont-use-library-directives-unless-attaching-doc-comments-or-annotations) section - Added [Don't explicitly name libraries](https://dart.dev/guides/language/effective-dart/usage#dont-explicitly-name-libraries) section - Reduced [`part of`](https://dart.dev/guides/language/effective-dart/usage#do-use-strings-in-part-of-directives) section - Removed / modified unnecessary notes about the library directive on the [Creating packages](https://dart.dev/guides/libraries/create-library-packages) page Co-authored-by: Parker Lougheed <parlough@gmail.com> Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
fixes #4314
staged: https://lib-dir-docs.web.app
Changes:
part of
sectionI thought about completely removing the
part of
section in Effective Dart: Usage, in favor of the more general new section "Don't explicitly name libraries", because it's not even recommended to usepart of
at all anymore.The new section could add a code example similar to the one for
part of
that more generally illustrates "Use URI strings to refer to libraries", and the linter rule could point to that section instead.Thoughts? @kevmoo @pq etc.