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

replace some ._() constructors with class modifiers #40328

Merged
merged 9 commits into from Mar 17, 2023

Conversation

goderbauer
Copy link
Member

These constructors were only there to prevent instantiation and extension. We now have class modifiers for that!

Part of flutter/flutter#118837.

To be submitted after #40318. (presubmits will fail until it is merged)

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Mar 15, 2023
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@Hixie
Copy link
Contributor

Hixie commented Mar 15, 2023

test-exempt: code refactor with no semantic change

@albertodev01
Copy link

albertodev01 commented Mar 15, 2023

Why IsolateNameServer and PluginUtilities are abstract final and not just final?

@goderbauer
Copy link
Member Author

goderbauer commented Mar 15, 2023

Why IsolateNameServer and PluginUtilities are abstract final and not just final?

Because they also may not be constructed: https://github.com/dart-lang/language/blob/master/accepted/future-releases/class-modifiers/feature-specification.md#syntax

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but looks like presubmit is failing. Looks like needs some experiment flags enabled.

Animated GIF of a delivery truck approaching a highway overpass, then failing to meet the height clearance requirement and crashing into it

@goderbauer
Copy link
Member Author

LGTM, but looks like presubmit is failing. Looks like needs some experiment flags enabled.

Yes! (see also PR description) it is waiting for #40318 :)

@goderbauer goderbauer force-pushed the classModifiers branch 2 times, most recently from c3699a4 to 9dd9f48 Compare March 16, 2023 16:29
@goderbauer
Copy link
Member Author

In addition to that it turned out that the api_check tool was also hard-coding an outdated dart version to do its internal analysis. I bumped that up. PTAL at the last commit, @cbracken. Thanks!

@goderbauer
Copy link
Member Author

I had to update the analyzer used by the api_conform_test.dart to make it know about class modifiers. @mdebbar Can you take another look at this?

@goderbauer goderbauer requested a review from mdebbar March 17, 2023 03:13
@@ -18,7 +18,6 @@ dependencies:
path: ../../third_party/web_test_fonts

dev_dependencies:
analyzer: 5.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is being removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependency is unused.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the IDE? Which analyzer does it use when I open the lib/web_ui folder? For some reason, I always assumed the IDE used the analyzer dependency version, but I'm not 100% sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses the analyzer of the dart SDK configured in the IDE. This dependency is used for ‘package:analyzer/…’ imports of which there don’t seem to be any within web_ui.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying!

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 17, 2023
@auto-submit auto-submit bot merged commit 7f42c3f into flutter:main Mar 17, 2023
38 checks passed
@goderbauer goderbauer deleted the classModifiers branch March 17, 2023 16:19
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 17, 2023
…r/engine#40328) (#122908)

Roll Flutter Engine from 59e21ffbf9b8 to 7f42c3fc22b3 (1 revision)
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Mar 17, 2023
flutter/engine#40328) (#122908)

Commit: 725d9ca214f683817bc017bbc1001b3aa7217f22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests platform-web Code specifically for the web engine
Projects
None yet
5 participants