Skip to content

Support breakpoints for hot reload #2627

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented May 29, 2025

Adds support for properly reregistering breakpoints across
a hot reload. Like with hot restart, leverages the kPausePostRequest
event in order to reregister breakpoints. DWDS does the initial
work to load the new sources in ("hotReloadStart"), and pauses and
sends the request. Upon disabling existing breakpoint, reregistering
and registering new breakpoints and resuming, DWDS will resume the
app and push the new sources into the runtime ("hotReloadEnd").

Also reinitializes some cached information in order to compute new
sources. Note that it's very conservative for now. A future change
should optimize the invalidation.

See #2628 for that work.

Adds tests for the following cases:

  • Editing a line with a breakpoint.
  • Adding a line before a breakpoint.
  • Removing a line before a breakpoint.
  • Adding a new file with a breakpoint in it.
  • Breakpoint in previously captured code is removed.
  • There's no pause when pause_isolates_on_start is false.

dart-lang/sdk#60186


Includes a light refactor of testing to create temp directories wherever the TestProject needs to be edited. TestProjects should specify whether it's meant to be edited via editable and list its dependencies so they can be copied too.

srujzs added 5 commits May 22, 2025 17:26
… bundle format

pause_isolates_on_start tells DWDS and the client that during a
hot restart or a hot reload, the VM service will pause and is
actively waiting for the client to remove existing breakpoints,
reregister them, and then resume. It lets the client know by
sending a kPausePostRequest event.

In order to do this in DWDS, we need to defer the execution of
main until that resume. So, like we do with the require
restarter, we wait for a completer to finish before we call
main after a hot restart. This completer is only provided when
the flag is enabled.

Fixes existing code that marks the completer as completed before
running main. The previous code canceled the subscription in an
unawaited Future. This may result in us recalling main because
the event stream could still have a listener. An example is if
we hit a breakpoint immediately after main and call resume.

Also fixes an issue where metadata information isn't recomputed
on a hot restart. This is needed when new files are added.

Adds tests for:

- Modifying a line with a breakpoint and restarting.
- Adding a line before a breakpoint and restarting.
- Removing a line before a breakpoint and restarting.
- Adding a file and putting a breakpoint in it before restarting.
…ns of console logs after resume to use a future instead
@srujzs srujzs force-pushed the hotreloadbreakpoints branch from ba5551c to 1559e0e Compare May 30, 2025 21:16
srujzs added 6 commits May 30, 2025 17:48
Adds support for properly reregistering breakpoints across
a hot reload. Like with hot restart, leverages the kPausePostRequest
event in order to reregister breakpoints. DWDS does the initial
work to load the new sources in ("hotReloadStart"), and pauses and
sends the request. Upon disabling existing breakpoint, reregistering
and registering new breakpoints and resuming, DWDS will resume the
app and push the new sources into the runtime ("hotReloadEnd").

Also reinitializes some cached information in order to compute new
sources. Note that it's very conservative for now. A future change
should optimize the invalidation.

Adds tests for the following cases:
- Editing a line with a breakpoint.
- Adding a line before a breakpoint.
- Removing a line before a breakpoint.
- Adding a new file with a breakpoint in it.
- Breakpoint in previously captured code is removed.
- There's no pause when pause_isolates_on_start is false.
@srujzs srujzs force-pushed the hotreloadbreakpoints branch from c1ff8c9 to b9709a6 Compare May 31, 2025 00:53
srujzs and others added 8 commits June 8, 2025 20:42
- Recompile is needed for the frontend server even when no
edits are made
- Also use expectAll in hot_restart_breakpoints_test
Fix e2e_test to work with current DDC output

Add a top level method and expect the result of calling that method in
an expression evaluation.

The existing test for expression evaluation in the context of a library
relied on the output of the `.toString()` of a top level method tearoff.
This representation changed recently causing the test to fail.
…-lang#2593)

Bumps the github-actions group with 3 updates in the / directory: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart), [actions/cache](https://github.com/actions/cache) and [actions/stale](https://github.com/actions/stale).

Updates `dart-lang/setup-dart` from 1.7.0 to 1.7.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/releases">dart-lang/setup-dart's releases</a>.</em></p>
<blockquote>
<h2>v1.7.1</h2>
<ul>
<li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975">CVE-2025-22150</a>.</li>
<li>Update to the latest npm dependencies.</li>
<li>Recompile the action using the new Dart / JavaScript interop.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md">dart-lang/setup-dart's changelog</a>.</em></p>
<blockquote>
<h2>v1.7.1</h2>
<ul>
<li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975">CVE-2025-22150</a>.</li>
<li>Update to the latest npm dependencies.</li>
<li>Recompile the action using the new Dart / JavaScript interop.</li>
</ul>
<h2>v1.7.0</h2>
<ul>
<li>
<p>Install flutter sdk in publishing step, allowing Flutter packages to be
published (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/68">#68</a>[])</p>
<p><a href="https://redirect.github.com/dart-lang/setup-dart/issues/68">#68</a>: <a href="https://redirect.github.com/dart-lang/setup-dart/issues/68">dart-lang/setup-dart#68</a></p>
</li>
</ul>
<h2>v1.6.5</h2>
<ul>
<li>Fix zip path handling on Windows 11 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>[])</li>
</ul>
<p><a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>: <a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">dart-lang/setup-dart#118</a></p>
<h2>v1.6.4</h2>
<ul>
<li>Rebuild JS code.</li>
</ul>
<h2>v1.6.3</h2>
<ul>
<li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-m4v8-wqvr-p9f7">CVE-2024-30260</a> and <a href="https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672">CVE-2024-30261</a>.</li>
</ul>
<h2>v1.6.2</h2>
<ul>
<li>Switch to running the workflow on <code>node20`` from </code>node16`. See also
<a href="https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/">Transitioning from Node 16 to Node 20</a>.</li>
</ul>
<h2>v1.6.1</h2>
<ul>
<li>Updated the google storage url for <code>main</code> channel releases.</li>
</ul>
<h2>v1.6.0</h2>
<ul>
<li>Enable provisioning of the latest Dart SDK patch release by specifying just
the major and minor version (e.g. <code>3.2</code>).</li>
</ul>
<h2>v1.5.1</h2>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dart-lang/setup-dart/commit/e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c"><code>e51d8e5</code></a> prep for releasing 1.7.1 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/150">#150</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/1faf8e64e5464d6b727016aa2467794f7dc410fb"><code>1faf8e6</code></a> updates to move away from dart:js_util (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/148">#148</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/614cb8d798824d682e7086a5d8b14e588723bc5c"><code>614cb8d</code></a> Bump flutter-actions/setup-flutter in the github-actions group (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/146">#146</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/55f49ad7b2b8b71f3043f80dc4cd4e0eca4aa90b"><code>55f49ad</code></a> Bump undici from 5.28.4 to 5.28.5 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/149">#149</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/2c0db8f5ec902ee2420de88e6ece2f275d1f26f1"><code>2c0db8f</code></a> Bump <code>@​actions/tool-cache</code> from 2.0.1 to 2.0.2 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/147">#147</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/6123db65aca0aa1e30809215875310f1ca706148"><code>6123db6</code></a> Bump dart-lang/setup-dart in the github-actions group (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/145">#145</a>)</li>
<li>See full diff in <a href="https://github.com/dart-lang/setup-dart/compare/e630b99d28a3b71860378cafdc2a067c71107f94...e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c">compare view</a></li>
</ul>
</details>
<br />

Updates `actions/cache` from 4.2.0 to 4.2.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p>
<blockquote>
<h2>v4.2.2</h2>
<h2>What's Changed</h2>
<blockquote>
<p>[!IMPORTANT]
As a reminder, there were important backend changes to release v4.2.0, see <a href="https://github.com/actions/cache/releases/tag/v4.2.0">those release notes</a> and <a href="https://github.com/actions/cache/discussions/1510">the announcement</a> for more details.</p>
</blockquote>
<ul>
<li>Bump <code>@​actions/cache</code> to v4.0.2 by <a href="https://github.com/robherley"><code>@​robherley</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1560">actions/cache#1560</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v4.2.1...v4.2.2">https://github.com/actions/cache/compare/v4.2.1...v4.2.2</a></p>
<h2>v4.2.1</h2>
<h2>What's Changed</h2>
<blockquote>
<p>[!IMPORTANT]
As a reminder, there were important backend changes to release v4.2.0, see <a href="https://github.com/actions/cache/releases/tag/v4.2.0">those release notes</a> and <a href="https://github.com/actions/cache/discussions/1510">the announcement</a> for more details.</p>
</blockquote>
<ul>
<li>docs: GitHub is spelled incorrectly in caching-strategies.md by <a href="https://github.com/janco-absa"><code>@​janco-absa</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1526">actions/cache#1526</a></li>
<li>docs: Make the &quot;always save prime numbers&quot; example more clear by <a href="https://github.com/Tobbe"><code>@​Tobbe</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1525">actions/cache#1525</a></li>
<li>Update force deletion docs due a recent deprecation by <a href="https://github.com/sebbalex"><code>@​sebbalex</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1500">actions/cache#1500</a></li>
<li>Bump <code>@​actions/cache</code> to v4.0.1 by <a href="https://github.com/robherley"><code>@​robherley</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1554">actions/cache#1554</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/janco-absa"><code>@​janco-absa</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1526">actions/cache#1526</a></li>
<li><a href="https://github.com/Tobbe"><code>@​Tobbe</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1525">actions/cache#1525</a></li>
<li><a href="https://github.com/sebbalex"><code>@​sebbalex</code></a> made their first contribution in <a href="https://redirect.github.com/actions/cache/pull/1500">actions/cache#1500</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v4.2.0...v4.2.1">https://github.com/actions/cache/compare/v4.2.0...v4.2.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h3>4.2.2</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.2</li>
</ul>
<h3>4.2.1</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.1</li>
</ul>
<h3>4.2.0</h3>
<p>TLDR; The cache backend service has been rewritten from the ground up for improved performance and reliability. <a href="https://github.com/actions/cache">actions/cache</a> now integrates with the new cache service (v2) APIs.</p>
<p>The new service will gradually roll out as of <strong>February 1st, 2025</strong>. The legacy service will also be sunset on the same date. Changes in these release are <strong>fully backward compatible</strong>.</p>
<p><strong>We are deprecating some versions of this action</strong>. We recommend upgrading to version <code>v4</code> or <code>v3</code> as soon as possible before <strong>February 1st, 2025.</strong> (Upgrade instructions below).</p>
<p>If you are using pinned SHAs, please use the SHAs of versions <code>v4.2.0</code> or <code>v3.4.0</code></p>
<p>If you do not upgrade, all workflow runs using any of the deprecated <a href="https://github.com/actions/cache">actions/cache</a> will fail.</p>
<p>Upgrading to the recommended versions will not break your workflows.</p>
<h3>4.1.2</h3>
<ul>
<li>Add GitHub Enterprise Cloud instances hostname filters to inform API endpoint choices - <a href="https://redirect.github.com/actions/cache/pull/1474">#1474</a></li>
<li>Security fix: Bump braces from 3.0.2 to 3.0.3 - <a href="https://redirect.github.com/actions/cache/pull/1475">#1475</a></li>
</ul>
<h3>4.1.1</h3>
<ul>
<li>Restore original behavior of <code>cache-hit</code> output - <a href="https://redirect.github.com/actions/cache/pull/1467">#1467</a></li>
</ul>
<h3>4.1.0</h3>
<ul>
<li>Ensure <code>cache-hit</code> output is set when a cache is missed - <a href="https://redirect.github.com/actions/cache/pull/1404">#1404</a></li>
<li>Deprecate <code>save-always</code> input - <a href="https://redirect.github.com/actions/cache/pull/1452">#1452</a></li>
</ul>
<h3>4.0.2</h3>
<ul>
<li>Fixed restore <code>fail-on-cache-miss</code> not working.</li>
</ul>
<h3>4.0.1</h3>
<ul>
<li>Updated <code>isGhes</code> check</li>
</ul>
<h3>4.0.0</h3>
<ul>
<li>Updated minimum runner version support from node 12 -&gt; node 20</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/cache/commit/d4323d4df104b026a6aa633fdb11d772146be0bf"><code>d4323d4</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1560">#1560</a> from actions/robherley/v4.2.2</li>
<li><a href="https://github.com/actions/cache/commit/da26677639ccfb4615f1acc52d1fc3dc89152490"><code>da26677</code></a> bump <code>@​actions/cache</code> to v4.0.2, prep for v4.2.2 release</li>
<li><a href="https://github.com/actions/cache/commit/7921ae235bdcb376cc8f22558dc5f8ddc3c3c2f9"><code>7921ae2</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1557">#1557</a> from actions/robherley/ia-workflow-released</li>
<li><a href="https://github.com/actions/cache/commit/393773170624981bfaa3aac1cb736e3004eac1de"><code>3937731</code></a> Update publish-immutable-actions.yml</li>
<li><a href="https://github.com/actions/cache/commit/0c907a75c2c80ebcb7f088228285e798b750cf8f"><code>0c907a7</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1554">#1554</a> from actions/robherley/v4.2.1</li>
<li><a href="https://github.com/actions/cache/commit/710893c2369beb60748049b671f18c43a3656fce"><code>710893c</code></a> bump <code>@​actions/cache</code> to v4.0.1</li>
<li><a href="https://github.com/actions/cache/commit/9fa7e61ec7e1f44ac75218e7aaea81da8856fd11"><code>9fa7e61</code></a> Update force deletion docs due a recent deprecation (<a href="https://redirect.github.com/actions/cache/issues/1500">#1500</a>)</li>
<li><a href="https://github.com/actions/cache/commit/36f1e144e1c8edb0a652766b484448563d8baf46"><code>36f1e14</code></a> docs: Make the &quot;always save prime numbers&quot; example more clear (<a href="https://redirect.github.com/actions/cache/issues/1525">#1525</a>)</li>
<li><a href="https://github.com/actions/cache/commit/53aa38c736a561b9c17b62df3fe885a17b78ee6d"><code>53aa38c</code></a> Correct GitHub Spelling in caching-strategies.md (<a href="https://redirect.github.com/actions/cache/issues/1526">#1526</a>)</li>
<li>See full diff in <a href="https://github.com/actions/cache/compare/1bd1e32a3bdc45362d1e726936510720a7c30a57...d4323d4df104b026a6aa633fdb11d772146be0bf">compare view</a></li>
</ul>
</details>
<br />

Updates `actions/stale` from 9.0.0 to 9.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/stale/releases">actions/stale's releases</a>.</em></p>
<blockquote>
<h2>v9.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Documentation update by <a href="https://github.com/Marukome0743"><code>@​Marukome0743</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1116">actions/stale#1116</a></li>
<li>Add workflow file for publishing releases to immutable action package by <a href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1179">actions/stale#1179</a></li>
<li>Update undici from 5.28.2 to 5.28.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1150">actions/stale#1150</a></li>
<li>Update actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1091">actions/stale#1091</a></li>
<li>Update actions/publish-action from 0.2.2 to 0.3.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1147">actions/stale#1147</a></li>
<li>Update ts-jest from 29.1.1 to 29.2.5 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1175">actions/stale#1175</a></li>
<li>Update <code>@​actions/core</code> from 1.10.1 to 1.11.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1191">actions/stale#1191</a></li>
<li>Update <code>@​types/jest</code> from 29.5.11 to 29.5.14 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1193">actions/stale#1193</a></li>
<li>Update <code>@​actions/cache</code> from 3.2.2 to 4.0.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/stale/pull/1194">actions/stale#1194</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Marukome0743"><code>@​Marukome0743</code></a> made their first contribution in <a href="https://redirect.github.com/actions/stale/pull/1116">actions/stale#1116</a></li>
<li><a href="https://github.com/Jcambass"><code>@​Jcambass</code></a> made their first contribution in <a href="https://redirect.github.com/actions/stale/pull/1179">actions/stale#1179</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/stale/compare/v9...v9.1.0">https://github.com/actions/stale/compare/v9...v9.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/stale/commit/5bef64f19d7facfb25b37b414482c7164d639639"><code>5bef64f</code></a> build(deps): bump <code>@​actions/cache</code> from 3.2.2 to 4.0.0 (<a href="https://redirect.github.com/actions/stale/issues/1194">#1194</a>)</li>
<li><a href="https://github.com/actions/stale/commit/fa77dfddd04682b7d96dbc4e016318e681fdc10e"><code>fa77dfd</code></a> build(deps-dev): bump <code>@​types/jest</code> from 29.5.11 to 29.5.14 (<a href="https://redirect.github.com/actions/stale/issues/1193">#1193</a>)</li>
<li><a href="https://github.com/actions/stale/commit/f04443dce335c74ba15c65f4cbb3688e6cb6a6ec"><code>f04443d</code></a> build(deps): bump <code>@​actions/core</code> from 1.10.1 to 1.11.1 (<a href="https://redirect.github.com/actions/stale/issues/1191">#1191</a>)</li>
<li><a href="https://github.com/actions/stale/commit/5c715b0513651880806e14d529f014b12fdd50eb"><code>5c715b0</code></a> build(deps-dev): bump ts-jest from 29.1.1 to 29.2.5 (<a href="https://redirect.github.com/actions/stale/issues/1175">#1175</a>)</li>
<li><a href="https://github.com/actions/stale/commit/f69122271d990fd11f5594ccff2296f00ff59b49"><code>f691222</code></a> build(deps): bump actions/publish-action from 0.2.2 to 0.3.0 (<a href="https://redirect.github.com/actions/stale/issues/1147">#1147</a>)</li>
<li><a href="https://github.com/actions/stale/commit/df990c2cf5ae92c90653c9485d6882a0a09feac7"><code>df990c2</code></a> build(deps): bump actions/checkout from 3 to 4 (<a href="https://redirect.github.com/actions/stale/issues/1091">#1091</a>)</li>
<li><a href="https://github.com/actions/stale/commit/6e472ce44ab4197b0154601c59c54a75b73b340b"><code>6e472ce</code></a> Merge pull request <a href="https://redirect.github.com/actions/stale/issues/1179">#1179</a> from actions/Jcambass-patch-1</li>
<li><a href="https://github.com/actions/stale/commit/d10ba64261d965f75165f74c55cd3ffbf690d442"><code>d10ba64</code></a> Merge pull request <a href="https://redirect.github.com/actions/stale/issues/1150">#1150</a> from actions/dependabot/npm_and_yarn/undici-5.28.4</li>
<li><a href="https://github.com/actions/stale/commit/bbf3da5f64eebd003932d93293857400f7f7e18d"><code>bbf3da5</code></a> resolve check failures</li>
<li><a href="https://github.com/actions/stale/commit/6a2e61d18b155e538f85ef1bf7bd0470775e9703"><code>6a2e61d</code></a> Add workflow file for publishing releases to immutable action package</li>
<li>Additional commits viewable in <a href="https://github.com/actions/stale/compare/28ca1036281a5e5922ead5184a1bbf96e5fc984e...5bef64f19d7facfb25b37b414482c7164d639639">compare view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions

</details>
One path used utf8, the other used codeUnits
Better to do it once, correctly
Start running the "shared context Step Into goes to the next Dart
location" test case now that it is passing again.

Fixes: dart-lang#2617
@github-actions github-actions bot added package:webdev type-infra A repository infrastructure change or enhancement labels Jun 9, 2025
@github-actions github-actions bot removed package:webdev type-infra A repository infrastructure change or enhancement labels Jun 9, 2025
@srujzs srujzs requested review from nshahan and bkonyi June 10, 2025 02:56
Copy link
Collaborator

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments @srujzs! Just a couple more.

});

tearDown(() async {
undoEdits();
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Flutter tool makes use of package:file_system for everything which allows for injecting a memory-based file system for use during testing, but that'd be a lot of work to retrofit here.

However, even if we are writing to the file system, each test should be independent and shouldn't share any state with other tests. Is the context not creating a project somewhere in the system temp directory? Ideally we'd tear down the context after each individual test, including deleting the project it's working with, and then setup a new context for the next test. Not doing this is asking for bugs due to state not being cleaned up properly by a previous test, which can be very difficult to diagnose.

@srujzs
Copy link
Contributor Author

srujzs commented Jun 12, 2025

Thanks! FYI, I increased the timeout factor from 2 to 3 on one of the groups because it looks like Windows needs longer.

Copy link
Collaborator

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

I think we need to fix the behavior of TestContext before this can land. We should never be modifying files in the repository during a test.

});

tearDown(() async {
undoEdits();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Giving this some more thought, I don't think I'm comfortable making changes to checked-in projects and relying on individual tests to clean them up. TestContext should be making a copy of the target project in the system temporary directory for each individual test and using that as a target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants