dart-lang / dart-lang/language
Sub-package auto-export
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
Something that I see a lot is packages that would work really well together, but can't directly import the package in question in order to remain pure (ex flutter widget libraries supporting the mix package)
I propose some mechanism to conditionally federate packages based on what packages are imported in the application.
For instance, my package would like to generate utilities for package x
And let's say I made a separate package for it. The problem is, users don't know that package exists. And what if I support a ton of packages? How many mini packages are users expected to find? Across multiple packages?
If my package simply included the sub packages when x is depended on, then users just _get_ first party support automatically.
It has a ton of possibilities.
We could easily expand on conditional imports and exports if we wanted to keep it in-package, which would be even better.
Contributor guide
Assessment
This issue has not been assessed yet.