Workiva / dependency_validator

A tool to help you find missing, under-promoted, over-promoted, and unused dependencies.
Other
56 stars 18 forks source link

How to fix "The following packages contain executables" for flutter_native_splash #77

Open tim-teacher opened 2 years ago

tim-teacher commented 2 years ago
dev_dependencies:
  flutter_native_splash: ^1.2.3

This show error:

The following packages contain executables, they are assumed to be used:
  * flutter_native_splash

What does it mean and how to fix it?

evanweible-wf commented 2 years ago

Hi @tim-teacher, sorry for the delay in responding. Normally, dependency_validator will fail if any of the following are found:

However, package executables make this tricky, because we don't have a good way to know if a project is using the executable provided by one of their dependencies. It might be used during CI or it might just be used during local dev. For that reason, we take the conservative approach and assume that the dependency providing the executable is used so that you don't have to configure dependency_validator to ignore it. When we do that, we print this note so that you can be aware. If you happen to know that you aren't using flutter_native_splash's executable, then you might be able to remove that dependency.

SAGARSURI commented 1 month ago

Hey @evanweible-wf I am working on a mono-repo project and I have created a local package which will have all the lints from a specific package i.e leancode_lint. Now I have the analysis_options.yaml inside the lib folder and it is exported to other local packages. But the dependency_validator shows me error saying leancode_lint is unused or using assets from these packages.