Skip to content

Always apply @hideConstantImplementations directive. #3564

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

Closed
srawlins opened this issue Nov 1, 2023 · 0 comments
Closed

Always apply @hideConstantImplementations directive. #3564

srawlins opened this issue Nov 1, 2023 · 0 comments
Assignees
Labels
type-tech-debt Issues that slow or block desirable development paths for Dartdoc, or create such problems for users

Comments

@srawlins
Copy link
Member

srawlins commented Nov 1, 2023

We were planning a gradual / opt-in view of constants where the implementation (source code) could be hidden, if you annotated a library (or class?) with /// {@hideConstantImplementations}. But I think we're moving with high certainty to a UX where all implementations are hidden.

Also, re-implementing support for this directive, when it will become useless soon, is not a good plan.

One path going forward then, a very easy change to the code, is for dartdoc to act as though all constants are annotated like this, and their implementations should be hidden.

The only uses of this doc directive that I know of are at https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/icons.dart and https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/icons.dart. It's super new, so should be easy to drop.

We can just drop hide_constant_implementations.dart and replace all references to hasHideConstantImplementations (and hasHideConstantImplementation) with true. (So GetterSetterCombo.hasConstantValueForDisplay becomes always false, etc.

@srawlins srawlins added the type-tech-debt Issues that slow or block desirable development paths for Dartdoc, or create such problems for users label Nov 1, 2023
@kallentu kallentu self-assigned this Nov 1, 2023
kallentu added a commit to flutter/flutter that referenced this issue Nov 27, 2023
Bumping DartDoc to 8.0.0. https://pub.dev/packages/dartdoc/changelog

Will be also removing the `@hideConstantImplementations` directive since
the behaviour is default now.
See issue dart-lang/dartdoc#3564.

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
@kallentu kallentu closed this as completed Dec 5, 2023
caseycrogers pushed a commit to caseycrogers/flutter that referenced this issue Dec 29, 2023
Bumping DartDoc to 8.0.0. https://pub.dev/packages/dartdoc/changelog

Will be also removing the `@hideConstantImplementations` directive since
the behaviour is default now.
See issue dart-lang/dartdoc#3564.

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
tsinis added a commit to tsinis/sealed_world that referenced this issue Oct 13, 2024
tsinis added a commit to tsinis/sealed_world that referenced this issue Oct 13, 2024
* refactor(lint): added new lints and fixed them

* fix(lint): tons of dcm lints adjustments

* refactor(lint): clean-up dcm rules that are included in all preset

* chore(deps): bump all dependencies and update related code

* refactor(docs): replace deprecated annotation with meaningful dartdoc
Reference: dart-lang/dartdoc#3564

* refactor(tests): clean-up in tests package

* refactor(tests): clean-up in languages package

* refactor(tests): clean-up in currencies package

* chore(deps): update dart_code_metrics_presets to 2.17.0

* refactor(tests): clean-up in countries package

* feat(helpers): add maybe-when method in functional platform
Also added tests for it.

* docs(data): proper code reference in languages

* refactor: fix to-strings and shorter demonyms in countries

* refactor(tests): clean-up in flags package

* refactor: unify asserts in non-flutter packages

* refactor(tests): clean-up in world countries package

* chore(dependabot): update dependency configurations and clean up comments

* chore(deps): update sdk constraints in world_countries's example

* refactor: simplify search delegate methods

* chore(deps): update gradle and plugin versions

* fix(ci): fix codecov for currency super to string

* chore(tests): integrate sealed world tests and refactor assertions

* chore(ci): update world_flags workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-tech-debt Issues that slow or block desirable development paths for Dartdoc, or create such problems for users
Projects
None yet
Development

No branches or pull requests

2 participants