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

Configurable outputs for the combining builder #554

Merged
merged 3 commits into from
Aug 19, 2021

Conversation

simolus3
Copy link
Contributor

This adds support for custom output locations, including outputs in different directories, to the combining builder.

  • Make output extensions configurable through builder options. The options are validated to ensure the combining builder is running on Dart files and emits Dart files
  • Move the check ensuring we have a part statement from the SharedPartBuilder to the CombiningBuilder. The former can't know the correct output location anymore.

This is related to #272, where the implementation in build requires cooperation from builders. Given that most generated files come from shared part generators in practice, this would enable generating to different folders for most users.

@google-cla google-cla bot added the cla: yes label Aug 17, 2021
@jakemac53
Copy link
Contributor

jakemac53 commented Aug 18, 2021

I filed dart-lang/sdk#46939 for the analyzer failure, we may need to mark that test as skipped for now.

Or possibly we should make the test smart enough to not complain about these warnings? It will break for every new minor sdk version.

@simolus3
Copy link
Contributor Author

It works with the newest analyzer, I've fixed deprecation warnings which requires using the latest version as a lower bound.

I agree that we should eventually make the tests more reliable, I also had some of them failing when running in isolation because of the "Generating SDK summary" logs.

source_gen/CHANGELOG.md Outdated Show resolved Hide resolved
@jakemac53 jakemac53 merged commit 6ad4a7d into dart-lang:master Aug 19, 2021
@simolus3 simolus3 deleted the configure-output-extensions branch August 19, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants