Skip to content

Upgrade to build_runner 0.7 #90

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

Merged
merged 9 commits into from
Jan 2, 2018
Merged

Upgrade to build_runner 0.7 #90

merged 9 commits into from
Jan 2, 2018

Conversation

natebosch
Copy link
Member

Note: Using git dependencies to send this early - will publish
build_runner before submitting.

  • Update dependencies
  • Add a build.yaml in json_serializable to expose a builder that is
    applied automatically to dependents of this package.
  • Add a builder.dart to expose a BuilderFactory.
  • Add a build.yaml in example to configure the header and keep the
    same behavior as the manual build script.
  • Update the README to use the new approach.
  • Keep manual build scripts for json_serializable since it does
    strange stuff. Update to the applyToRoot approach.

Note: Using git dependencies to send this early - will publish
build_runner before submitting.

- Update dependencies
- Add a `build.yaml` in `json_serializable` to expose a builder that is
  applied automatically to dependents of this package.
- Add a `builder.dart` to expose a `BuilderFactory`.
- Add a `build.yaml` in `example` to configure the header and keep the
  same behavior as the manual build script.
- Update the README to use the new approach.
- Keep manual build scripts for `json_serializable` since it does
  strange stuff. Update to the `applyToRoot` approach.
@natebosch
Copy link
Member Author

@kevmoo - build_runner latest is dev only SDK. Not sure how you feel about dropping travis testing for stable SDK...

@kevmoo
Copy link
Collaborator

kevmoo commented Dec 27, 2017

@kevmoo - build_runner latest is dev only SDK. Not sure how you feel about dropping travis testing for stable SDK...

Well if it's not going to work, we should probably stop testing it 😄

@@ -8,6 +8,7 @@ environment:
dependencies:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natebosch – should update the SDK dependency then, too? Right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it shouldn't be a requirement. It's pub's job to take dependency SDK constraints into account when version solving.

If I'm only using stuff from package:foo version 1.0.0 but my dependency tightened the constraint to 1.1.0 I don't go hunting for that information and bump tighten my constraint too - that's what the version solve is for. From my perspective the SDK constraint is just like a package constraint in this way.

In practice I think it's fine to do it since we're not testing on older SDKs so we're not confident that we haven't suddenly stopped working for reasons around this package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,8 @@
builders:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a # some link here comment to point source diggers to the right spot to understand how this is suppose to work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -5,50 +5,46 @@
import 'dart:async';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natebosch – want to update to the new run method and go from 3 -> 1 file? Or in a follow-up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,12 @@
targets:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto – add a # FYI ready about build.yaml here... line at the top...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@natebosch natebosch merged commit bfc6df1 into master Jan 2, 2018
@natebosch natebosch deleted the build_runner-0.7 branch January 2, 2018 18:55
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 this pull request may close these issues.

3 participants