Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tim-teacher opened this issue Nov 12, 2021 · 2 comments

Comments

@tim-teacher
Copy link

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
Copy link
Contributor

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

  • Missing: When a dependency is used in the package but not declared in the pubspec.yaml
  • Under-promoted: When a dependency is used within lib/ but only declared as a dev_dependency.
  • Over-promoted: When a dependency is only used outside lib/ but declared as a dependency.
  • Unused: When a dependency is not used in the package but declared in the pubspec.yaml.

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
Copy link

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.

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

No branches or pull requests

3 participants