Skip to content

fix: resolve dart coverage package_config in pub workspaces - #1689

Open
AzazelSensei wants to merge 1 commit into
VeryGoodOpenSource:mainfrom
AzazelSensei:fix/dart-test-coverage-workspace-package-config
Open

fix: resolve dart coverage package_config in pub workspaces#1689
AzazelSensei wants to merge 1 commit into
VeryGoodOpenSource:mainfrom
AzazelSensei:fix/dart-test-coverage-workspace-package-config

Conversation

@AzazelSensei

Copy link
Copy Markdown

Status

READY

Description

very_good dart test --coverage crashes in a pub workspace because it opens .dart_tool/package_config.json relative to the process cwd. Workspaces only write that file at the root.

I pass the package directory as packagePath so the coverage package uses findPackageConfig and walks up, same as dart.

Fixes #1683

Type of Change

  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: very_good dart test --coverage fails in pub workspaces

1 participant