Skip to content

fix: Pause point status, await, and clear find a marker in a local package folder outside Packages - #3223

Merged
hatayama merged 1 commit into
feature/hot-reload-large-project-feedback-2from
fix/pause-point-query-local-package-folder
Oct 7, 2026
Merged

hatayama merged 1 commit into
feature/hot-reload-large-project-feedback-2from
fix/pause-point-query-local-package-folder

Conversation

@hatayama

@hatayama hatayama commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • pause-point-status, await-pause-point, and clear-pause-point now also find a marker when --file names a script of a local package (referenced with file:) whose folder sits inside the project but outside Packages/. Example: LocalPackages/foo/Runtime/X.cs.

User Impact

  • Before: enable-pause-point --file LocalPackages/foo/Runtime/X.cs --line 3 set the marker Packages/<package-id>/Runtime/X.cs:3. The same --file in pause-point-status was taken for an asset path and looked up as given, so it reported NotEnabled. With a ./ prefix it worked.
  • After: the same path finds the marker, as the docs already promise ("every form finds the same marker").

Changes

  • Shortcut narrowed. The shortcut that skips the package roots now applies only to a path that starts with Assets/ and has no \, . segment, or .. segment. Any other project-relative path may be a package folder, under Packages/ or elsewhere in the project, so it is mapped through the package roots.
  • Package roots read only when needed. The roots are passed to SourcePausePointId.ToMarkerId as a deferred read (ScriptPackageRoots.ReadCurrent). The status bridge and the clear tool pass the same read as before. A plain Assets/ path still never reaches the Package Manager on the status poll that await repeats every second.

Input space

Query path Before After Covered by
LocalPackages/foo/Runtime/X.cs:3 (folder inside the project, outside Packages/) looked up as given Packages/com.example.foo/Runtime/X.cs:3 ToMarkerId_FolderPathOfAPackageOutsidePackagesFolder_RewritesToTheAssetPath
Assets/X.cs:3 as given, roots not read as given, roots not read ToMarkerId_AssetsPath_ReturnsItWithoutReadingPackageRoots
Packages/com.example.foo/Runtime/X.cs:3 (already the asset path) roots read, unchanged roots read, unchanged ToMarkerId_PackageAssetPath_ReturnsItUnchanged
every form from #3220 found found PausePointQueryScriptPathFormTests (13, unchanged)

Verification

Repository CI does not run on pull requests into this integration branch. Everything below was run locally against a running Editor.

Compile: uloop compile reports 0 errors.

Before the fix: only the folder-path test failed (it got LocalPackages/foo/Runtime/X.cs:3 back).

Tests: I ran uloop run-tests one class at a time. All passed:

Class Tests
SourcePausePointIdTests 3 (new)
PausePointQueryScriptPathFormTests 13
PausePointScriptPathFormTests 6
PausePointTests 140

Mutations (each compiled, then SourcePausePointIdTests and PausePointQueryScriptPathFormTests run):

Mutation Result
Drop the shortcut entirely only ToMarkerId_AssetsPath_ReturnsItWithoutReadingPackageRoots fails
Restore the previous shortcut condition only ToMarkerId_FolderPathOfAPackageOutsidePackagesFolder_RewritesToTheAssetPath fails

Static checks: all exit 0.

  • Code complexity (max 15)
  • File length (max 500 SLOC)
  • asmdef reference policy

Review in cubic

A local package referenced with file: can live inside the project root but outside Packages/. A query naming its script by that project-relative folder path was taken for an asset path and skipped, so status reported NotEnabled while enable accepted the same path. Only a plain Assets/ path now skips the package roots; every other path is mapped through them. The roots are passed in as a deferred read so the skip still avoids the Package Manager on every await poll.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: hatayama/unity-cli-loop/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5bc45b44-de2b-4987-a1b1-d9377420601d
📥 Commits

Reviewing files that changed from the base of the PR and between 6e9c832 and 248d66d.

⛔ Files ignored due to path filters (1)
  • Assets/Tests/Editor/HotReload/SourcePausePointIdTests.cs.meta is excluded by none and included by none
📒 Files selected for processing (4)
  • Assets/Tests/Editor/HotReload/SourcePausePointIdTests.cs
  • Packages/src/Editor/FirstPartyTools/Common/ScriptPath/SourcePausePointId.cs
  • Packages/src/Editor/FirstPartyTools/PausePoint/PausePointUseCase.cs
  • Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs
 _________________________________________
< Code review, I will. Find bugs, I must. >
 -----------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hatayama
hatayama merged commit e208b53 into feature/hot-reload-large-project-feedback-2 Oct 7, 2026
4 of 5 checks passed
@hatayama
hatayama deleted the fix/pause-point-query-local-package-folder branch October 7, 2026 09:48
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.

1 participant