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

Break the dependency from build_config -> build #2192

Closed
natebosch opened this issue Apr 17, 2019 · 0 comments · Fixed by #2204
Closed

Break the dependency from build_config -> build #2192

natebosch opened this issue Apr 17, 2019 · 0 comments · Fixed by #2204

Comments

@natebosch
Copy link
Member

We want anyone with a build.yaml to have a non-dev dependency on build_config and we'd like to start warning when it's missing.

Unfortunately if you only use a build.yaml for local builds and it doesn't impact anything in lib/ this means you might be picking up an unnecessary dependency on build which pulls in analyzer etc. This is more heavy than some library packages will want.

We should break this dependency. It's currently used for BuilderOptions. We can either change all these to Map<String, dynamic> since that's what BuilderOptions wraps, or we can move the class definition and re-export from build.

natebosch added a commit that referenced this issue Apr 22, 2019
Closes #2192

Since we want published packages with a `build.yaml` file to have a
dependency on `build_config` to ensure parsing compatibility we want the
dependency to be as lightweight as possible. `package:build` brings in
`package:analyzer` and too many transitive dependencies for this use
case.

- Replace `BuilderOptions` fields with `Map<String, dynamic>` fields.
- Update places reading these fields.
- Tighten dependencies through to `build_config` to consider feature
  releases as breaking for `build_runner` and `build_runner_core` so
  that we can roll out future changes without updating all pubspecs
  across the world for packages using `build.yaml`.
natebosch added a commit that referenced this issue Apr 23, 2019
Closes #2192

Since we want published packages with a `build.yaml` file to have a
dependency on `build_config` to ensure parsing compatibility we want the
dependency to be as lightweight as possible. `package:build` brings in
`package:analyzer` and too many transitive dependencies for this use
case.

- Replace `BuilderOptions` fields with `Map<String, dynamic>` fields.
- Update places reading these fields.
- Tighten dependencies through to `build_config` to consider feature
  releases as breaking for `build_runner` and `build_runner_core` so
  that we can roll out future changes without updating all pubspecs
  across the world for packages using `build.yaml`.
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

Successfully merging a pull request may close this issue.

1 participant