This fixes an issue with the Dart Head-Head-Head CI bot, where it was seeing failures because of concurrent execution of the snippets tool.
It adds a single run of the snippets tool right after activation to force the compiling of the package executable, which is what has trouble with concurrent invocation.
This is a temporary measure until dart pub global run is fixed.
This does a cleanup of the examples, removing all of the "section" markers and extra comments that we don't need anymore now that the samples are no longer in the source code. It also removes the --template arguments from the {@tool dartpad} and {@tool sample} directives, since those are no longer used. It converts two examples that I discovered were still embedded into linked examples in the examples folder.
I didn't delete the templates from the snippets config folder yet, because there are still embedded samples in the dart:ui package from the engine that use them. Once dart:ui no longer uses the templates, they can be removed.
I bumped the version of the snippets package to pick up a change that allows removal of the --template argument.
Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.
This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.
The snippets code is deleted in this PR.
I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.
The snippets package resides in the assets-for-api-docs repo.
The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.
This includes some major internal changes that should improve performance (the AOT template compiler) and the new lookup code. The big changes noticeable for Flutter will be resolution of field formal parameters, extension method support, and more consistent disambiguation in comment reference lookups.
While a vast net improvement, this PR will change a few links to point to the wrong place. #85484 will address that after this lands, as there was no good way to specify what the user wanted unambiguously before dartdoc 1.0.0 in a few cases. That PR includes more details on the introduced regressions and link changes.
* Fix docset generation.
* Remove checks to be able to test.
* More logging
* More logging
* More logging.
* more logging.
* More logging.
* Add flags to firebase command.
* Re-enable docset generation.
* Disable firebase step.
* Comment docset to speed up validations.
* Re-enable docset.
* Add back condition to prevent uploading docs from PRs.
* Update packages.
* Add many more global analyses.
* Catch trailing spaces and trailing newlines in all text files.
Before we were only checking newly added files, but that means we
missed some.
* Port the trailing spaces logic to work on Windows too.
* Correct all the files with trailing spaces and newlines.
* Refactor some of the dev/bots logic into a utils.dart library.
Notably, the "exit" and "print" shims for testing are now usable
from test.dart, analyze.dart, and run_command.dart.
* Add an "exitWithError" function that prints the red lines and
then exits. This is the preferred way to exit from test.dart,
analyze.dart, and run_command.dart.
* More consistency in the output of analyze.dart.
* Refactor analyze.dart to use the _allFiles file enumerating logic
more widely.
* Add some double-checking logic to the _allFiles logic to catch
cases where changes to that logic end up catching fewer files
than expected (helps prevent future false positives).
* Add a check to prevent new binary files from being added to
the repository. Grandfather in the binaries that we've already
added.
* Update all the dependencies (needed because we now import crypto in
dev/bots/analyze.dart).
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs