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

Remove circular dependencies and unused code in preparation for further null safety migration #1664

Merged
merged 20 commits into from
Jul 8, 2022

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Jun 24, 2022

Break circular dependencies:

  • Make AppInspector not inherit from Domain
  • Moved all isolate validation from AppInspector to ChromeProxyService and removed it from the AppInspector to make the API consistent
    • Some vm_service API were not throwing SentinelException when required, corrected now
  • Added AppInspectorInterface to break circular dependencies between files in debugging and utilities directories
  • Moved some static functions and typedefs to the leaf files to break the circular dependencies between files
  • Made initialization order between debugger, inspector, and library/class/instance helpers explicit

Towards: #1327

@annagrin annagrin changed the title Remove circular dependencies and unused code in preparation further null safety migration Remove circular dependencies and unused code in preparation for further null safety migration Jun 28, 2022
@@ -671,21 +661,6 @@ class Debugger extends Domain {
logger.severe('Target crashed!');
}

/// Evaluate [expression] by calling Chrome's Runtime.evaluate
Copy link
Contributor Author

@annagrin annagrin Jun 29, 2022

Choose a reason for hiding this comment

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

Duplicate - we already have this functionality in inspector.dart

final cache = _moduleToLocations[module];
if (cache != null) return cache;
if (module == null) {
_logger.warning('No module for $url');
Copy link
Contributor Author

@annagrin annagrin Jun 29, 2022

Choose a reason for hiding this comment

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

We allow some urls here that have no modules, remove the warning as it generates a lot of spam

@annagrin annagrin requested review from elliette and grouma June 29, 2022 18:33
@elliette
Copy link
Contributor

Very high level comment - this is a large PR and from the description it sounds like there are 3 separate issues being tackled here:

  1. Break circular dependencies
  2. Remove unused code
  3. Fix hot restart issues caught in tests

Are the code changes for these 3 interdependent or would it be possible to break this into 3 separate PRs to make it easier to review?

@annagrin
Copy link
Contributor Author

Very high level comment - this is a large PR and from the description it sounds like there are 3 separate issues being tackled here:

  • Break circular dependencies
  • Remove unused code
  • Fix hot restart issues caught in tests

I can try - will do the tests first, unused code next, break dependencies last

@annagrin
Copy link
Contributor Author

annagrin commented Jun 30, 2022

I've created a few PRs to be checked in before the current change. After they are all in, the current change then will just cover refactoring to break circular dependencies:

Copy link
Contributor

@elliette elliette left a comment

Choose a reason for hiding this comment

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

LGTM with a couple nits. Thanks!

@annagrin annagrin merged commit 0fda9d3 into dart-lang:master Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants