-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
[testing_app] meta tracking issue for missing or inaccurate examples #2334
Comments
This sample was a summer of code sample. I'm happy for it either to be updated to meet specifications, or for it to be deleted as unmaintained. |
I would advocate for this sample being deleted. Testing is a topic better suited for documentation IMO. I'll delete delete it unless there are any strong opinions otherwise. |
While documentation is helpful as a starting point, it can become stale quickly and is not always as helpful as a real example in code. Especially for more complicated testing scenarios like integration testing and benchmark testing, a real example that is continuously tested against the latest Flutter & Flutter testing packages is essential. |
I don't think flutter/samples is the best place to collect Flutter code who's primary function is to test against new releases. I'm open to being wrong about this. |
Since @mit do you have thoughts on this? What is our plan to provide users with up-to-date code examples that are compatible with the latest Flutter framework and Flutter package changes? |
I think I should've elaborated more. This is the primary place to provide up-to-date code examples which are primarily used as a teaching tool. If the sample exists primarily to test against releases, it should be deprecated from this repository. This repository should be highly curated, and less is more. Offering a few high quality, complete, samples that cover happy paths is preferable to trying to cover every aspect of the SDK, imo. Equally as importantly, we have a maintenance overload problem on the DevRel team. We're technically keeping the lights on with this samples, but we aren't spending time making sure the samples are still "good" samples. For example, I would guess that many have not been updated to use Dart 3 features. I am going to suggest deprecating a lot of the samples in this repo in Q3. (FWIW, finding a 'new approach' for DevRel samples that is 'more effective and maintainable' is one of my primary goals for the year.) I'm open to being wrong about whether or not this particular sample should be deprecated. I'm also open to this repository being a place where code is primarily added to test against releases, but I don't think it should be both. |
It may be very difficult to provide "up-to-date" code examples if this repo is not regularly analyzed and tested against some continuous integration framework. For the area of testing in particular, I have run into this issue many times over the years which has resulted in a very painful developer experience to setup integration tests and benchmark tests for a Flutter Web app (Dart DevTools). TL;DR is that the documentation was conflicting, outdated, and sparse, and that the code examples were incomplete and incorrect. I have a detailed write-up on this that I recently shared with the Flutter web team, but we really need some documentation and code examples for testing that we can confidently put in users hands to guide them. Whether that should be done in the CC @yjbanov @eyebrowsoffire @kevmoo @ditman since we just discussed this topic WRT to Flutter Web.
Agreed. Though I will cast my vote for testing to be one of the critical aspects of the SDK that we provide high-quality and complete samples for.
If we were to keep the Getting into the weeds here a bit, but to bring it back to high level, we could find some way to run tests / analyze samples on the CI to guarantee a sample like one for testing is up to date. |
Having weekly CI running against the latest |
I think our disagreement is actually just a miscommunication. I'm certainly not suggesting that we remove CI from this repo. I'm trying to clarify that if the primary purpose of a sample in this repo test an API against releases, we should consider deprecating it, because that's not what this repo is for. But yes, if it is in this repo, it should absolutely have tests and be test against stable often (and main and beta, for that matter.)
I totally understand this concern, and agree that there's much documentation that can be improved about testing and otherwise. (One of the reasons I'd like to reduce our maintenance load on the DevRel team is so that DREs can contribute to the website more and not leave it all to 1.5 TWs.)
I think having one flagship sample app about testing is a great idea and this is the right place for it. Having exactly one flagship app for every "major part" of the SDK (of which testing is a good example) is what I'm going to suggest we do when I have time to think holistically about updating all of our sample code. So long story long, I guess I'm advocating for doing nothing right now. |
As a side-note, in flutter/packages, every user-facing package that has integration tests, are run against all supported platforms (by the plugin and by CI, of course); for example: It ain't much but... |
test_driver/integration_test.dart
.-d [web-server | chrome]
and startingchromedriver
).The text was updated successfully, but these errors were encountered: