Use "package:foo" instead of foldernames in command execution#5801
Use "package:foo" instead of foldernames in command execution#5801
Conversation
|
@codex review |
|
Hello DanTup, Thank you for requesting a review. I've thoroughly examined the changes in this pull request. Overall Assessment: This pull request introduces a valuable improvement by prioritizing the use of Review Criteria Adherence:
Conclusion: This is a well-implemented and beneficial change. The code is clean, correct, and improves the overall user experience. I approve of these changes. Great work! |
There was a problem hiding this comment.
Pull Request Overview
This pull request changes command execution display names from folder names to use the "package:foo" format, which provides more consistent and meaningful identification of packages during command execution.
Key Changes:
- Modified
runCommandForWorkspaceto attempt to read the package name frompubspec.yamlbefore falling back to folder names - Updated channel name construction logic to avoid redundant display (e.g., "flutter" instead of "flutter (flutter)")
- Exported
tryGetPackageNameutility function fromfs.tsfor use in command execution - Updated all related test expectations to reflect the new "package:" prefix format
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/extension/commands/sdk.ts |
Implements the core logic to prefer package names over folder names, updates parameter naming from shortPath to packageOrFolderDisplayName, and adds smart channel naming to avoid duplication |
src/shared/utils/fs.ts |
Exports the tryGetPackageName function to make it available for use in command execution |
src/test/flutter/commands/outdated.test.ts |
Updates test expectations to use "package:flutter_hello_world" format |
src/test/flutter/commands/doctor.test.ts |
Updates test to expect channel name "flutter" instead of "flutter (flutter)" for the doctor command |
src/test/flutter/commands/clean.test.ts |
Updates test expectations to use "package:" prefix for both root and example packages |
src/test/dart/commands/outdated.test.ts |
Updates test expectations to use "package:hello_world" format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ 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 "@codex address that feedback". |
a8997ba to
b9816e0
Compare
Fixes #5789