-
Notifications
You must be signed in to change notification settings - Fork 28.6k
package assets declared under dev_dependency shouldn't be included in release bundle #79261
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
Comments
After reading this StackOverflow and https://dart.dev/tools/pub/dependencies#dev-dependencies I'm considering this as proposal as there is not documentation saying that assets from dev dependencies will not be included into the final app bundle. If you have any reference about that please share the link. |
Hi, @pedromassangocode I'm not sure why it is a proposal not a bug, if the reason to label this as proposal was documentation, If flutter follows dart documentation on |
hi @pedromassangocode Additional findings: When adding
after checking |
Hi, is there any updates? I am seeing the same issue as well |
Up for this issue (sorry for not just reacting), but one use-case that might be quite annoying is: say you have an assets that are only meant to be shipped during development and you don't want that to be included in the release bundle, it won't be possible until some exclusion of assets for production build is done. Right now there's couple of solution that might work (e.g. using script that deletes some dependency or assets during |
I'm here because I just discovered that in one of my projects I've been placing essential package references under 'dev_dependencies' this whole time - and yet, my release builds have been running flawlessly. I figure it might have something to do with this |
Just curious is there a plugin/package on dev_dependencies that contains large enough assets? Because I have never found a plugin/package that has very large assets on dev_dependencies 🤔 |
Sometimes we want to use certain resources only under debug. |
Hi all, adding related issues above. It seemed to occur on other platforms |
any update? |
We were affected by this issue today. The inclusion of As it seems this is actually the way flutter behaves - we basically have no option but to inject the integration test dependencies into the pubspec.yaml as part of the runner script launching the tests. Not optimal. |
#160443) Fixes dart-lang/pub#4486 Fixes dart-lang/pub#4473 Fixes #79261 Fixes #160142 Fixes #155242 Use the new `.dart_tool/package_graph.json` file to compute the dependency graph. Determining * which are transitive dependencies of the main app's direct and dev-dependencies, (not other packages from the workspace) * which of these are only in the transitive set of the direct dependencies Bundles assets from dev_dependencies when running `flutter test`, but not otherwise.
Uh oh!
There was an error while loading. Please reload this page.
Steps to Reproduce
See example project https://github.com/rh-id/example_dev_dependency_fi for the steps
Expected results: Flutter should ignore package assets declared under
dev_dependency
on release bundle / versionActual results: Flutter include the package assets declared under
dev_dependency
on release bundle / versionLogs
Related Issues:
Do not create plugins from dev_dependencies #56591
Don't include dev_dependencies in native build scripts #45714
integration_test embedded in shipping iOS apps when added to pubspec #74274
The text was updated successfully, but these errors were encountered: