Repository navigation
Prevent running "pub get" for all projects in the same workspace in "Get Packages for all Projects" command - #5990
Conversation
…Get Packages for all Projects" command Fixes #5978
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors how project folders are identified for package management, specifically for 'Get Packages for All Projects'. It introduces a new utility function, getPubWorkspaceOrPackageFolders, to correctly identify pub workspace roots and standalone packages, ensuring pub get is run only on these top-level entities rather than every sub-project within a workspace. The uniq utility function was updated for conciseness and potential performance. Several internal API changes were made, including making runCustomGetSDKCommand public, adding clearCaches to the internal API, and removing DaemonCapabilities from it. The resolvedPromise utility was simplified to resolve with undefined. Additionally, caching logic for project folder searches was improved to prevent stale results, and various test files were updated to use non-null assertions for privateApi.testController or make it optional where appropriate, along with a new test case to validate the pub workspace folder logic. The logging for CI builds was adjusted to delete logs for skipped tests as well, to save space.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5990 +/- ##
==========================================
+ Coverage 67.61% 67.66% +0.05%
==========================================
Files 170 170
Lines 12979 12984 +5
Branches 2571 2571
==========================================
+ Hits 8776 8786 +10
+ Misses 3741 3737 -4
+ Partials 462 461 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #5978