Refactor: Update the parameters for DWDS.start#2231
Merged
elliette merged 13 commits intodart-lang:masterfrom Sep 20, 2023
Merged
Refactor: Update the parameters for DWDS.start#2231elliette merged 13 commits intodart-lang:masterfrom
DWDS.start#2231elliette merged 13 commits intodart-lang:masterfrom
Conversation
annagrin
reviewed
Sep 19, 2023
Contributor
annagrin
left a comment
There was a problem hiding this comment.
Thanks Elliott, really appreciate cleaning dwds.start up! I think we have and issue for this work somewhere, will try to find it an update. Left a few comments.
annagrin
reviewed
Sep 19, 2023
Contributor
annagrin
left a comment
There was a problem hiding this comment.
Thanks, left some more comments
dwds/lib/src/utilities/globals.dart
Outdated
| set globalLoadStrategy(LoadStrategy strategy) => _globalLoadStrategy = strategy; | ||
| LoadStrategy get globalLoadStrategy => _globalLoadStrategy; | ||
| class ToolConfiguration { | ||
| LoadStrategy loadStrategy; |
Contributor
There was a problem hiding this comment.
Can all those fields be final, or late final if needed? I don't think we want to allow changing them during the run of dwds?
annagrin
approved these changes
Sep 20, 2023
Contributor
annagrin
left a comment
There was a problem hiding this comment.
LGTM but would lie a follow up PR where we have pre-defined test configurations and/or helpers to create them. Consider passing tool configuration to contest constructor as well.
This was referenced Sep 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Dwds.startso that all of the miscellaneous strings / boolean parameters are collected into eitherDebugSettingsorAppMetadata. This is to make it easier to add optional parameters to theDwds.startmethod, since we won't need to update theflutter_toolsDwdsLaunchereach time: https://github.com/flutter/flutter/blob/367203b3011fc1752cfa1f51adf9751d090c94e6/packages/flutter_tools/lib/src/isolated/devfs_web.dart#L46DebugSettingsandAppMetadataas globals so that they can be accessed from anywhere (instead of having to pipe some of their fields down to theInjectoras we were previously doing)devTools/DevToolsinstead ofdevtools/DevtoolsenableDebuggingis no longer required but optional. If not set, it defaults totrueThis is preparatory work for #2198, because we will be adding a new parameter to
Dwds.start(the workspace name)