Test fixes for build_test
3.0.0
#4062
davidmorgan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For builder package maintainers.
When you use
build_runner
2.5.0 you'll also need to update tobuild_test
3.0.0, which has breaking change.Sorry about that!
build_test
depends a lot onbuild_runner
internals, so it was not possible to keep it working exactly the same through the huge internal refactor. Hopefully, some of the changes are improvements :)See the changelog.
Here are some example fixes:
built_value
: google/built_value.dart#1367source_gen
: dart-lang/source_gen#761Any questions, or if any changes could help smooth the transition, I'll be happy to help :)
FAQ
Why is my test no longer reading real sources on disk?
This no longer happens automatically, for
testBuilder
the way to do it isand for
resolveSources
, passnonInputsToReadFromFilesystem
to read specific additional files. I have a work-in-progress PR adding a way to read all the files as before here.Other Notes
The
testBuilder
generateFor
parameter now restricts the set of visible sources, not just the set of input sources; this is broken, if someone needs it to work please let me know and I'll fix it. However, the defaults are now much closer to a real build, so please first try removinggenerateFor
altogether, like I do in thesource_gen
PR above.Beta Was this translation helpful? Give feedback.
All reactions