Repository navigation
Ignore nested packages in surrounding package (#173) - #183
Conversation
|
@matthewnitschke-wk it seems this repo is a bit stale - are you still working on it? Or should we rather fork to implement fixes? Just curious! |
|
Friendly ping - @robbecker-wf or @nicbiggs-wk ? |
Hey! @mosuem! Sorry, we do not have the best notifications setup for our OSS libraries and I missed this Yes, we do still rely on and are "working" on dependency_validator. Pub workspaces aren't used very much by our org yet, which is why support for issues like this haven't been prioritized That being said, we're happy to review and merge any updates! Let us know when this is ready for review and we'll take a look! |
|
Great to hear! |
f836c8e to
1600be7
Compare
AI-generated -- I will take a look at this myself first, don't read yet :)
Motivation
Fixes #173.
Dependency validator previously scanned all files outside
lib/andbin/recursively and attributed all Dart/SCSS/Less dependencies to the surrounding package. When a package contains nested packages (e.g.example/host_name/with its ownpubspec.yaml), code in the nested package was incorrectly analyzed as part of the surrounding package, causing false-positive missingdev_dependencieswarnings for packages only used within the nested package.Changes
listNestedPackageshelper to discover all nested package directories (subdirectories containingpubspec.yaml, excluding the root package and hidden directories like.dart_tool/).unusedDependencieshandling so analyzer warning is checked before removing ignored packages.executable_test.dartfor modern analyzer compatibility.test/utils_test.dartandtest/nested_packages_test.dart.Testing/QA Instructions
Automated tests have been added covering nested package handling and
listNestedPackages.All unit and integration tests pass via
dart test.