fix: resolve dart coverage package_config in pub workspaces - #1689
fix: resolve dart coverage package_config in pub workspaces#1689AzazelSensei wants to merge 1 commit into
Conversation
Pub workspaces only write .dart_tool/package_config.json at the workspace root. Pass the package directory as packagePath so the coverage resolver walks up the same way dart does.
|
Nice fix, this is a cleaner approach than a hand-rolled walk-up. One test-coverage gap worth closing before merge: The new test ( To close the gap, the test would need:
Then assert on the resulting Not blocking since none of the other dart-coverage tests in this file do this either (they all use empty/placeholder coverage data), but it's the one thing that would make this test prove the fix rather than just prove no crash. |
|
hey @AzazelSensei, thanks for opening a PR! Will you be able to apply the change I mentioned above? |
Status
READY
Description
very_good dart test --coveragecrashes in a pub workspace because it opens.dart_tool/package_config.jsonrelative to the process cwd. Workspaces only write that file at the root.I pass the package directory as
packagePathso the coverage package usesfindPackageConfigand walks up, same as dart.Fixes #1683
Type of Change