If a new version is lower than the current checked-in version, and the
transition from the new version to the old version is valid (indicating
that it could have been the previous version), allow the change.
This prevents the version check from failing when reverting a PR.
This is not fool-proof (e.g., it would allow a revert of an
already-published PR); if we have issues in practice we can further
restrict the check (by checking that the new version is the current pub
version, for instance).
Changes to some files (e.g., CI scripts) have the potential to cause
failures in any packages, without changes to those packages themselves.
This updates the --run-on-changed-packages to consider all packages as
changed if any of those files are changed, to avoid issues where a
change that changes both some repo-level files and some package-specific
files only run presubmit tests on the packages that are directly
changed, causing post-submit-only failures.
Fixes https://github.com/flutter/flutter/issues/82965
- Updates dependencies to null-safe versions
- Migrates common.dart (which doesn't depend on anything)
- Migrates common_tests.dart and its one dependency, utils.dart
- Adds build_runner for Mockito mock generation
- Adds a new utility methods for getting arguments that handle both the casting and the removal of nullability to address a common problematic pattern while migrating code.
- Converts all files, not just the migrated ones, to those new helpers.
Migrating common.dart and utils.dart should unblock a command-by-command migration to null safety.
Reverts the separate of podspect lints into a step that doesn't do a Flutter upgrade
(https://github.com/flutter/plugins/pull/3700) because without that step we had a
version of Dart too old to run null-safe tooling.
First step of https://github.com/flutter/flutter/issues/81912
the skip-confirmation flag will add a --force flag to pub publish, it will also let users to skip the y/n question when pushing tags to remote.
Fixesflutter/flutter#79830
Until the infrastructure limitations that led to flutter/flutter#82032 are fixed, run basic Windows tests via GitHub Actions (which do have VS available) so that we aren't missing all Windows coverage.
Add a PubVersionFinder class to easily fetch the version from pub.
Add an against-pub flag to check-version command, which allows it to check the version against pub server
Make the 'publish-check' command to check against pub to determine if the specific versions of packages need to be published.
Add a log-status flag, which allows the publish-check command to log the final status of the result. This helps other ci tools to easily grab the results and use it to determine what to do next. See option 3 in flutter/flutter#81444
This PR also fixes some tests.
partially flutter/flutter#81444
Many of our integration tests weren't actually being run on CI because they were in the wrong place and/or missing the driver file, and it seems we've just never noticed. This makes a number of changes:
- Ensures that all packages with integration tests also have a driver file in the right location.
- Also standardizes the format of those files, as the boilerplate `main()` is available in `integration_test`.
- Ensures that all integration_test directories are in the right place.
- In a couple of places, removes a duplicate copy of the integration test file.
- Makes it an error for a plugin that's not excluded to not have integration tests, so this can't easily happen again.
- Adds logging of what's being run and skipped, so if something does go wrong in the future it's easy to determine what from the logs.
- Excludes `*_platform_interface` since the logging was (potentially confusingly) reporting that they were skipped because they don't support the current platform. Skipping them is correct, just not for that reason.
- Excludes the plugins that currently have no integration tests, with references to issues about adding them.
Fixes https://github.com/flutter/flutter/issues/81929
Switch incremental_build.sh from using the older check_changed_packages
implemented in bash to the newer (tested/testable) Dart implementation
via --run-onchanged-packages.
Also clarifies in help that the flag runs on all packages when nothing
has changed.
flutter/packages has two packages in third_party/packages/, which wasn't something our tooling recognized, so no package-based CI checks are running on them. This adds knowledge that there can be a third_party/packages/ directory as a sibling of the primary packages directory.
Also migrates common_tests off of the shared (now deprecated) mock filesystem and onto a test-local mock filesystem.
Fixesflutter/flutter#81570
Since the tooling doesn't live in packages/, we're not currently analyzing it. This enables analysis so that we won't have analyzer issues creeping in over time.
To minimize complexity, this just adds it directly to the Cirrus configuration rather than building knowledge of the tool directory into the tool itself.
In preparation for enabling license checks in flutter/packages, update
the allowed licenses:
- Allow our license, for cases where we've locally added files
- Allow the license used by the bsdiff package
Re-adds the LICENSE and CHANGELOG, and updates the README and pubspec,
in preparation for pushing an updated version of the package.
We are still using flutter_plugin_tools in flutter/packages, so this
allows us to use updates (e.g., license checks, fixed version checks) in
that repository as well. The README has been updated to note that it is
no longer intended for general use, and we will (if it allows
publishing) continue to mark the package as discontinued to reflect
that.
Currently our version update checks aren't actually working; the script doesn't work correctly if no explicit --base-sha is passed, but that's always how CI is calling it.
Fixes https://github.com/flutter/flutter/issues/79823 (and version checks in general)
This makes a number of changes:
- Fixes it to work without --base-sha
- Adds tests that it works in that mode
- And tightens existing tests to require ToolExit, not just any error, to reduce false-positive test success
- Adds verbose logging of the checks being done, to make it easier to debug this kind of issue in the future
- Tightens the exception handling for missing previous versions to just the line that's expected to fail in that case
- Only allows missing versions when "publish_to: none" is set
- Adds that everywhere it's missing
- Standardize the format in the repo to "none" (instead of also having "'none'").
- Allows the use of NEXT in CHANGELOG as a way of gathering changes that are worth noting, but not
doing a publish cycle for. (Replaces the plan of using -dev versions, since that's actually harder to implement,
and more confusing.)
- Ensures that we don't forget to clean up NEXT entries when bumping versions
Removes the legacy analysis options override and fixes all resulting issues. This is a combination of dart fix and manual changes (mostly mechanical, but some small restructuring to address warnings more cleanly, such as creating typed structs from args when they are used repeatedly to avoid repeated casting, or making things that were unnecessarily public private).
One small opportunistic extra cleanup is that the handling of null-safety prerelease versions is removed, as any new plugin would be written null-safe from the start, so we no longer need to allow those versions.
Part of flutter/flutter#76229
Flutter master now creates NNBD code when running 'flutter create', so
the generated pubspec for build_all needs to use a compatible SDK
version. This updates from 2.0.0 to 2.12.0.
Also includes a test for this, which involved setting up tests for the
file, and doing some refactoring to make the command testable. As a
result, this fixes https://github.com/flutter/flutter/issues/61049
(although more test backfill is needed).
This change enables the integration_tests of the following packages to run in Cirrus CI:
* google_sign_in_web
* connectivity_for_web
* google_maps_flutter_web
* url_launcher_web
Standardizes all first-party copyrights on a single year, as is done in flutter/flutter and flutter/engine. All code now uses 2013, which is the earliest year that was in any existing copyright notice.
The script checks now enforce the exact format of first-party licenses and copyrights.
Fixesflutter/flutter#78448
In all copyright messages (and in the Xcode project organization name) standardize on "The Flutter Authors", adding "The Chromium Authors" to the Flutter AUTHORS list. This reduces inconsistency in the copyright lines in this repository, moving closer to a single consistent copyright+license (as in flutter/engine and flutter/flutter)
Updates the validation script to no longer accept "The Chromium Authors" or "the Chromium project authors" in first-party code.
- Replaces "the Flutter project authors" with the repo-standard version "The Flutter Authors"
- Updates the license check not to allow "the Flutter project authors" in the future
- Fixes a few minor cosmetic variations that had crept back into LICENSE files since my
mass-standardization of those files.
- Updates the license check to validate those to prevent such drift in the future.
Renames the old analysis_options.yaml to analysis_options_legacy.yaml,
replacing it with a slightly modified copy of flutter/flutter's analysis
options.
Each plugins has a temporary local analysis_options.yaml that points to
the legacy version. This allows for inceremental conversion on a
per-plugin basis, which should make the problem more tractable.
Since this hasn't yet been enabled for any packages, it's likely that as
it is we'll find a few local modification we need to make to the root
analysis_options (e.g., things that conflict with 'dart format').
Part of https://github.com/flutter/flutter/issues/76229
Adds a new CI check that all code files have a copyright+license block (and that it's one we are expecting to see).
Fixes the ~350 files (!) that did not have them. This includes all of the files in the .../example/ directories, following the example of flutter/flutter. (This does mean some manual intervention will be needed when generating new example directories in the future, but it's one-time per example.)
Also standardized some variants that used different line breaks than most of the rest of the repo (likely added since I standardized them all a while ago, but didn't add a check for at the time to enforce going forward), to simplify the checks.
Fixesflutter/flutter#77114
Includes cleanup to simplify our setup. Major changes:
- Eliminate the NNBD plugin filtering for stable.
- Remove the temporarily-added beta branch testing.
- Enable Linux, macOS, and web on stable (Windows is LUCI-based)
- Combine the two different macOS matrix configurations now that they
are the same.
- Combine the two different Linux matrix configurations by using a single
Dockerfile (which now also includes clang-format)
- The web integration smoke test temporarily still uses the old Dockerfile,
now renamed, because the driver installer script doesn't support
Chrome 89 yet.
- Move most of the Linux tasks to lower-CPU machines to allow more
tasks to run in parallel without hitting the community limit.
- Reorder the tasks slightly and give them comments to identify
platform groupings
- Enabled web "build all plugins together" and "build all examples"
tests