Switch "pub run" for "dart run" in tasks#5882
Conversation
|
@codex review |
|
Hello @DanTup, Thank you for invoking a code review! I've thoroughly examined your pull request titled "Switch "pub run" for "dart run" in tasks". Overall Impression: This is a well-executed and important change that aligns with the evolution of the Dart SDK's command-line tools. The refactoring to explicitly use Detailed Review:
Conclusion: All changes are correct, well-tested, and improve the maintainability of the codebase by aligning with current best practices for Dart/Flutter command execution. I recommend approving this pull request. |
There was a problem hiding this comment.
Pull request overview
This pull request updates the Dart-Code extension to use "dart run" instead of "pub run" for build_runner tasks, aligning with modern Dart CLI conventions where "dart run" is the recommended approach.
Changes:
- Updated task provider to generate build_runner tasks using "dart run" instead of "pub run"
- Added comprehensive test coverage for both Dart and Flutter projects to verify the new task format
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/extension/dart/dart_task_provider.ts | Modified taskOptions patterns to use "run" instead of "pub run", updated build_runner task creation to use createTask directly with "dart" command, and simplified createPubTask method |
| src/test/dart/commands/dart_tasks.test.ts | Added test to verify build_runner tasks use "dart run" in Dart projects |
| src/test/flutter/commands/flutter_tasks.test.ts | Added new test file to verify build_runner tasks use "dart run" in Flutter projects and that FLUTTER_ROOT is set correctly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f7b296627
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5882 +/- ##
==========================================
- Coverage 67.32% 67.27% -0.05%
==========================================
Files 168 168
Lines 12894 12894
Branches 2554 2554
==========================================
- Hits 8681 8675 -6
- Misses 3762 3765 +3
- Partials 451 454 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…art with "pub", as it used to
Fixes #5874