-
Notifications
You must be signed in to change notification settings - Fork 340
Add an experimental flag for custom test tracking #5727
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an experimental flag experimentalTestTracking to enable custom test tracking functionality that updates test locations as documents change. This addresses issue #5668 by implementing a mechanism to track test ranges and update them automatically when users edit files.
- Adds a new configuration option
experimentalTestTracking - Implements range tracking for test nodes when the experimental flag is enabled
- Updates test location handling in the VS Code test controller based on the flag
- Enables a previously skipped test that verifies the test tracking functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/extension/config.ts | Adds the new experimentalTestTracking configuration property |
| src/shared/test/test_model.ts | Implements range tracking logic for test nodes when experimental flag is enabled |
| src/shared/vscode/trackers.ts | Adds trackRangeForUri method to support tracking ranges by URI |
| src/extension/test/vs_test_controller.ts | Updates test location handling based on experimental flag |
| src/test/dart_debug/dart_test.test.ts | Enables previously skipped test and sets experimental flag |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces an experimental flag, dart.experimentalTestTracking, to improve test tracking for dynamically discovered tests, such as those using pkg:test_reflective_loader. The changes involve adding the configuration setting, updating the test model to track test ranges when the flag is enabled, and modifying the VS Code test controller to use this information. The implementation looks solid, but I've identified a couple of potential memory leaks related to the new range trackers not being disposed of correctly. Additionally, the documentation for the new setting might be slightly misleading regarding restarts. My review includes suggestions to address these points.
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting |
cc3bded to
ccbcfd1
Compare
See #5668