Open
Description
As many packages may depend on this one, I think it would be nice if we could limit the dependencies to an absolute minimum.
$ dart pub deps
native_assets_cli 0.5.0-wip
├── cli_config 0.2.0
│ ├── args 2.4.2
│ └── yaml...
├── collection 1.18.0
├── crypto 3.0.3
│ └── typed_data 1.3.2
│ └── collection...
├── logging 1.2.0
├── pub_semver 2.1.4
│ ├── meta 1.11.0
│ └── collection...
├── yaml 3.1.2
│ ├── source_span 1.10.0
│ │ ├── term_glyph 1.2.1
│ │ ├── collection...
│ │ └── path...
│ ├── string_scanner 1.2.0
│ │ └── source_span...
│ └── collection...
└── yaml_edit 2.1.1
├── collection...
├── meta...
├── source_span...
└── yaml...
(manually deleted dev dependencies)
To keep:
collection
: Needed for equality checks, hashcodes etc. Unlikely to ever become 2.0.meta
: Unlikely to ever become 2.0.pub_semver
: Unlikely to ever become 2.0.
To argue:
logging
: Love it or hate it, but standardizing a logger in a layered architecture makes things so much easier. (E.g. flutter_tools calls native_assets_builder, calls native_assets_cli, calls cli_config, which parses YAML, and at every level we can log errors. Which means we don't have to catch a gazillion different exceptions everywhere in the code.) We could come up with our own logging abstraction, but we'd need to share it across a layer of packages.
To remove:
crypto
: We only use it for hashing theBuildConfig
fields. I'm not aware of such functionality indart:
. We could probably move the code tonative_assets_builder
though. Or we could take an hashing function argument.yaml
&yaml_edit
: Eventually, we'll delete the dependency ([native_assets_builder] build input and output should be JSON instead of YAML #991).- We'll also need to remove
cli_config
as a dependency then.
- We'll also need to remove