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

Update to source_gen 0.9.0 #464

Merged
merged 3 commits into from
Jul 27, 2018
Merged

Conversation

natebosch
Copy link
Member

@natebosch natebosch commented Jul 24, 2018

Allows using built_value along side other source_gen based
generators that output to .g.dart part file. This is a breaking change
because the "header" can no longer be supported.

  • Switch to SharedPartBuilder and add the required part ID argument.
  • Move builds to the cache and update the new generated extension.
  • Apply the source_gen|combining_builder to merge part files back into
    a .g.dart file.
  • Remove the example build.yaml since it was only setting a header.
  • Update test cases to keep using it as if it was a standalone part
    builder.

This change is Reviewable

Allows using `built_value` along side other `source_gen` based
generators that output to `.g.dart` part file. This is a breaking change
because the "header" can no longer be supported.

- Switch to `SharedPartBuilder` and add the required part ID argument.
- Move builds to the cache and update the new generated extension.
- Apply the `source_gen|combining_builder` to merge part files back into
  a `.g.dart` file.
- Remove the example `build.yaml` since it was only setting a `header`.
- Update test cases to keep using it as if it was a standalone part
  builder.
Copy link
Collaborator

@davidmorgan davidmorgan left a comment

Choose a reason for hiding this comment

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

Thanks! Really nice to see this support arriving.

@@ -1,5 +1,5 @@
name: built_value_generator
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please run tool/use_local_deps and update the PR; it will update all the yaml files to use the unreleased version, so the presubmit results are meaningful.

Copy link
Member Author

Choose a reason for hiding this comment

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

ran the tool and regenerated the example files.

@davidmorgan
Copy link
Collaborator

Thanks!

@zoechi
Copy link
Contributor

zoechi commented Aug 2, 2018

What can header not be supported anymore?
Is there a replacement?
I usually depend on it to silence the analyzer when I enable new released linter rules.

@natebosch natebosch deleted the source_gen-0.9.0 branch August 2, 2018 17:45
@natebosch
Copy link
Member Author

@zoechi - I filed an issue with the reasoning and a potential solution at dart-lang/source_gen#370

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