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

Fix failing breakpoints in library part files and data race in calculating locations #1296

Merged
merged 3 commits into from
Apr 7, 2021

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Apr 6, 2021

Fix failing breakpoints in library part files and data race

- Record library part paths in debugger tables properly.
  Make sure that we have module and library recorded for part scripts, in 
  `MetadataProvider` and `Modules`.

- Calculate locations for module atomically in `Locations`.
  This fixes intermittent 'Oh, snap!' messages in chrome due to a data race in 
  location computation if several breakpoints are set in the same dart library.

- Update test fixtures to include part files.
- Add tests for frontend server and build runner scenarios.

Closes: #1271

@google-cla google-cla bot added the cla: yes label Apr 6, 2021
@annagrin annagrin requested review from grouma and natebosch April 6, 2021 01:51
Copy link
Member

@grouma grouma left a comment

Choose a reason for hiding this comment

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

This is fantastic. Thanks! LGTM

dwds/lib/src/debugging/location.dart Show resolved Hide resolved
dwds/lib/src/debugging/location.dart Show resolved Hide resolved
dwds/lib/src/debugging/metadata/provider.dart Outdated Show resolved Hide resolved
fixtures/_testPackage/lib/src/test_part.dart Outdated Show resolved Hide resolved
fixtures/_testPackage/lib/src/test_part.dart Outdated Show resolved Hide resolved
Anna Gringauze added 3 commits April 7, 2021 13:09
- Record library part paths in debugger tables properly.
  Make sure that we have module and library recorded for
  part scripts, in `MetadataProvider` and `Modules`,
- Calculate locations for module atomically in `Locations`.
  This fixes intermittent 'Oh, snap!' in chrome due to a
  data race in location computation if several breakpoints
  are set in the same dart library.

- Update test fixtures to include part files.
- Add tests for frontend server and build runner scenarios.

Closes: dart-lang#1271
@annagrin annagrin force-pushed the annagrin/fix_library_parts branch from f9220c0 to aef6493 Compare April 7, 2021 20:26
@annagrin annagrin merged commit 658f692 into dart-lang:master Apr 7, 2021
@annagrin annagrin deleted the annagrin/fix_library_parts branch April 7, 2021 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants