* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
AndroidSdk and AndroidStudio depends relatively heavily on filesystem
access to locate installed tools. Testing code that relies on either of
these classes benefits from a utility method to generate a
legitimate-looking Android SDK directory layout for testing.
flutter doctor --android-licenses requires Android sdkmanager version 26
or later. When sdkmanager is not available (SDKs earlier than v25),
direct users to SDK upgrade instructions. When it's installed but not
v26 or later, emit instructions to run sdkmanager --update.
Moves MockProcess, MockStdio and a few other useful mocks from
packages_test.dart to common/mocks.dart. These are useful for testing
code with interactive IO.
This adds a new constructor to MockProcess to provide additional flexibility.
Convenience getters for the the path to the Android SDK manager and the
currently installed version of the tool.
Pre-factoring to support better checks around the --android-licenses
command, which uses a feature of the SDK manager that is unsupported in
older versions of the tool.
* Default to strong for 'flutter test --preview-dart-2' mode
* Remove empty line
* Dont init to null
* Break up line to make it more readable
* Add missing type annotation
* Revert "Bump async, http, and vm_service_client packages (#14136)"
This reverts commit 7ffcce84a2.
* Revert "Exclude flutter doctor IDE validators in CI environments (#13816)"
This reverts commit 3258c54618.
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
* Revert "Revert "Make artifact downloading more robust for flaky networks" (#13995)"
This reverts commit 33d8a03545.
* Use subdirectories to organize cached files
* Fix unauthorized import
Apple encodes syslog entries using a 7-bit encoding where input UTF-8 bytes
are encoded as follows:
1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash).
3. 0x5c (backslash): octal representation \134.
4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40).
5. 0xa0: octal representation \240.
6. 0xa1 to 0xf7: \M-x (where x is the input byte stripped of its high-order bit).
7. 0xf8 to 0xff: unused in 4-byte UTF-8.
As there doesn't appear to be a system tool to decode these strings, we
implement here in Dart. If we're unable to decode a string (e.g.
decoding results in an invalid UTF-8 string), we fall back to emitting
the log line as-is.
* Reland 9534082fc0 with fix for incremental compilation.
When in incremental mode, awaiting exitCode won't work because compiler is not expected to exit after compilation.
Instead listen for stdout stream closing and report error if outputFilename has not been received.
* Fix lints
* Revert "Reverting package changes until I can figure out how to fix Windows. (#14007)"
This reverts commit 6fda8ee821.
* Make prepare_package run on Windows
* Revert "Fixed output validation. (#14005)"
This reverts commit d84398db72.
* Revert "Update package prep script to do async process execution and emit output as it happens. (#13918)"
This reverts commit b7169c1d95.
- Switches to async process execution, which now shows output as it happens instead of in chunks when the process completes
- Now uses ProcessManager so that it may be mocked for the test.
- Adds in the download and install of mingit on Windows.
- Updated package dependencies because of added dependency on process package.
* Revert "Change github readme links to be served by github (#13929)"
This reverts commit fd516d9538.
* Revert " Rename SemanticsFlags to SemanticsFlag (#13994)"
This reverts commit 24e3f70536.
* Revert "Make artifact downloading more robust for flaky networks (#13984)"
This reverts commit 4d37e03e1d.
* First version
* Add a clarifying comment
* Add verify to ZipDecoder.decodeBytes call
* Review comments
* Need OS Error for missing files
* FileSystemException, not OSError.
* First version
* Prevent modification of .flutter during analytics test
* Pass in directory and override analyzer warning due to conditional import
* Review comments
* Send RPC request to switch assets directory on hot reload.
This is needed to pick up updated assets that are expected to be picked up on hot reload.
* Assert assets directory is not null.
* Better multiple future wait
* Add type annotation
This simply updates the package dependencies by running flutter update-packages --force-upgrade.
I'm doing this with no other changes, because the last time I tried that, redness occurred. I want to isolate the problem to a "clean" update of the packages.
It looks like the plugins device_info, connectivity, and url_launcher haven't yet had their gradle configurations updated, so they fail when trying to build with the new gradle. I did not upgrade for those three packages only (in flutter_gallery) until we are ready to fix them (fixing them for master will break them for alpha users, so we need to do an alpha roll to do that).
* Plumb a --strong option through to the front end server and the engine
so that we can run flutter apps in preview-dart-2 and strong mode
* - Address analyzer lint issues
*- correctly set up strong mode option in the case of AOT builds
* Revert "Revert "Enable developers to run pod from terminal directly and skip pod install if possible. (#13374)" (#13770)"
This reverts commit 0759043e47.
* some nits on cocoapods code
* put back the FLUTTER_FRAMEWORK_DIR env variable
Executables have '.exe' extension on Windows. We do have to specify extension for gen_snapshot since when running with local engine, we are looking for that exact file before launching it.
This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.
I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
* Change async stubbing to use thenAnswer.
Mockito now prohibits calling thenReturn with Futures and Streams. dart-lang/mockito#79
* Update all Mockito deps to 3.0.0.
* Revert "Update all Mockito deps to 3.0.0."
This reverts commit e8ab9d37c3.
I did not correctly update the mockito dep, and there's no easy way to update to 3.0 alpha right now.
* Change thenAnswer((_) => to thenAnswer((invocation) =>
* Add Invocation type to thenAnswer lambdas
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.
The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.
This re-lands flutter/flutter#13608 now that the devicelab Macs have
been updated to Xcode 9.
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.
The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.
* Revert "Include a directory with Flutter assets (#12944)"
This reverts commit 3af6b9cbf5.
* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"
This reverts commit 08128cb29b.
* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"
This reverts commit 35f1a04195.
* mark complex_layout_ios__start_up as flaky
We thought it would be OK to call the create command offline-only, but it turns out that isn't a great idea because not all of the create template dependencies are cached by running flutter_tool.
This PR makes it go online by default when running pub get after creating a project, and adds an "--offline" flag to the create command so that offline users can use it offline if their cache is warm.
In order to allow offline usage of the create command we need to be able to tell pub not to try and contact the server to see if new versions are available. Since all the versions that create could want are pinned, it shouldn't need to check for new versions.
Add support for configuring the base storage URL for Flutter's
artifacts. If FLUTTER_STORAGE_BASE_URL is set, use it instead of
storage.googleapis.com.
The pub server can be overridden by setting PUB_HOSTED_URL.
Adds a class `PubContext` with a fixed set of allowed values
Make it clear these values should not be changed casually
Fixed one inconsistency already: update_packages vs update_pkgs
Provide more information for verify calls
Eliminate `ctx_` prefix.
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.
The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.
Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
* Revert "Add tests."
This reverts commit 31bad961ff.
* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"
This reverts commit 72d6bcc3f7.
It turns out that when a PR build clones the flutter repo, it puts it into a directory called "flutter", and when the "real" build clones the flutter repo, it puts it into a directory called "build". This allowed the tests to succeed in my PR, but fail when I committed it.
This fixes the test so it doesn't depend on the cloned directory name.
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.
The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.
Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
Rather than depending on android.googlesource.com for hosting the gradle
wrapper, host our own copy on storage.googleapis.com (along with our
other artifacts).
Also added a script to repackage AOSP's version into ours, in case we
ever need to update it.
Addresses the gradle wrapper part of #11681.
Add support for IOS_SIMULATOR_HOME environment variable in IOSSimulator.logFilePath
flutter_tools can be run on environments where the user's HOME directory
is not the root of the iOS simulators' configs. This change adds support
for such environments by allowing the caller to set the simulator root
directory via an environment variable.
This consolidates all of the non-template .gitignore rules into the top level .gitignore, to ignore common things more broadly, with less maintenance needed for the .gitignore files. Does not touch the templates, so that they still produce needed .gitignores as part of flutter create.
* Add support for NDK discovery and add --prefer-shared-library option
We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps. The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.
The reason for using blobs / instruction snapshots is that we do not
want to force flutter users to install the Android NDK.
This CL adds a `--prefer-shared-library` flag to e.g. `flutter build
apk` which will use the NDK compiler (if available) to turn the
precompiled app assembly file to an `*.so` file. If the NDK compiler is
not available it will default to the default behavior.
* Rebase, add test for NDK detection, augment flutter.gradle with @Input for flag
* Use InMemoryFileSystem for test
* Remove unused import
* Address some analyzer warnings
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.
This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
Previously, we were mapping certain named platforms
(e.g. `android-stable`) to their corresponding version.
this had two problems:
1. The version could become out of date. For instance, we had
mapped `android-stable` to version 24, but the stable version
is now 27.
2. The list of possible named versions wasn't comprehensive.
Some Android SDKs just list the platform as `stable`, or
`experimental`, etc.
This change updates the platform version detection to use
the `build.prop` file that exists in the platform directory
(only for cases where the version number is not encoded into
the directory name).
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.
It also:
* Adds *.iml to the .gitignore
* Removes existing .iml files from the repo, and moves them to the
packages/flutter_tools/ide_templates/intellij directory.
* Adds a flag to ide-config ('--update-templates') that will take any new .iml
files in the flutter tree and add them to the existing templates.
- If --overwrite is also specified, then all existing templates will also
be overwritten with the contents from the flutter tree, and any that have
been deleted from the flutter tree will also be removed from the
templates.
* Added new run configurations for all existing app targets that will now also
be automatically added to IntelliJ.
* Setting up the environment also includes setting the coding style guidelines
and the git VCS.
* Note that after this PR lands, Flutter developers will need to run it once to
re-create the .iml files and configuration files that have been removed.
After this PR lands, .iml files will no longer appear in the untracked files
section for git.
If we fail to bind to IPv4 loopback, try IPv6. Some hosts only support IPv6,
causing the test in vmservice_test.dart to fail, since it couldn't find an
available port.
* Get rid of static version methods which ignore the AppContext
* Review comments
* Review Comments
* Make branch behave the same as original implementation
* Fix tests
* tweak the text for the 'elements didnt reload' message
* review comments
* prefix items with a list char
* add a hostIsIde param instead of the isDaemonMode top-level function
* add a trailing comma
* executable.dart#main() depends on runner.dart#run()
* Refactor code such that non-commands don't depend on commands.
No code was actually changed in this PR - code was merely moved from
point A to point B.
Various improvements (in particular a new painting fuzzer) to the text manual test.
Some additional documentation.
A fix to Stack to remove an LTR bias: make unpositioned children apply "alignment".
Some more debugging information on RichText and Text.
A fix to the flutter tool to not crash when an RPC call throws an exception.
Previously, the usage analytics would generate a write to the user's
HOME directory during the Fuchsia build. We're tightening down the
environment in which we run the Fuchsia build, and these writes are now
more obvious.
This patch removes the usage analytics during the Fuchsia build,
avoiding the write to the user's HOME directory.
* fix updrade script; upgrade to the latest package versions
* exclude special dependencies from transitive closure
* fix stack trace handling in flutter_test due to stack_trace change
* change type on _emptyStackTrace
The libimobiledevice suite of tools do not include version information.
A simple way to verify they meet our version requirements is to run
idevice_id -l, which will fail when older versions are run against iOS
devices with newer versions of iOS installed.
Unfortunately, idevice_id -l will also fail when libimobiledevice is up
to date, but the attached devices have never been paired with the host
machine in Xcode.
This patch updates the error message to help guide the user in such
situations.
On iOS 11.0.x ideviceinfo fails with the following message
ERROR: Could not connect to lockdownd, error code -3
This workaround should also work for #12330
This patch also makes it possible to create FLX files with no extension.
Previously, the zip tool would add the ".zip" extension if the output file
lacked an extension.
* Restructure hot mode test so it runs interactively.
This allows to add a benchmark for hot reload after actual source code change.
* Add curly braces, refactory copyRecursive
This reverts commit 5e7bcbacf8.
`flutter run --benchmark` was triggering a different quick bailout path in the VM than `flutter run`. The failure has been fixed upstream.
* Fix restart flow for preview-dart-2 mode.
Restart in preview-dart-2 needs to use kernel file and it has to be complete, rather than incremental kernel file.
* Add curly braces
* Do full compile on restart
* Roll engine to pick up changes to hot reload for preview-dart-2
The initial loading happens on the host, which was building a script snapshot and allowing imports of dart:mirrors. Hot reload happens on the device, which then notices the imports and issues a compile-time error. This change causes programs with imports of dart:mirrors to be rejected during the initial load.
Fixes https://github.com/flutter/flutter/issues/12440
* Add hotReloadInitialDevFSSyncMilliseconds to track how long user have to wait before being able to do first reload.
This stat is significantly different between existing and preview-dart-2 setting (for the latter, this stat is ~3x slower: 13s vs ~4s).
* Remove ws
* Cleanup timer-related code
This reverts commit 90028813a8.
This change caused a few bots to fail with 'JSON-RPC error 110: Extension error', which is odd because _getUnusedChangesInLastReload is not an extension.
This CL introduces 2 hidden options to 'flutter build aot' and 'flutter run' for passing arbitrary arguments to front-end server and to gen_snapshot tool when building and running flutter app in --profile or --release modes.
The ability to pass arbitrary options simplifies various experiments, as it removes the need to change defaults and rebuild flutter engine for every tested configuration.
* Add framework-side support for system text scale factor.
* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
Additional changes rolled in with engine change:
libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
Provide an entropy source to the Dart engine (#4161) - e1aa867
libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
Roll skia to e4679fa06a. (#4157) - 267e7a8
Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
Revert engine Dart roll. (#4158) - 14aab33
Add support for system text scale factor. (#4124) - b2a7f4b
Include _http into sky_engine libraries for analyzer (#4154) - b930f10
libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
libtxt: remove redundant line_widths (#4152) - 14bf515
Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
This makes command validation happen as part of `verifyThenRunCommand()`,
using a newly introduced protected method (`validateCommand()`) rather than
a `commandValidator` property (that subclasses were responsible for manually
invoking).
* Pin all dependencies ONCE AND FOR ALL
This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.
* Add comments.
* Allow FloatingActionButton to not have a heroTag.
* Allow FloatingActionButton to not have a child.
* Allow Tooltip to not have a child.
* Improve the debug output of the default FloatingActionButton hero tag.
* Improve the error message in the Hero clashing-tag case.
* Improve the debug output of the Hero widget.
* Improve the debug output of gesture-related widgets.
* Minor improvements to documentation.
* Fix some typos in comments.
* Fix some style nits.
1. Migrate simulator device log tailing to os_log toolchain
2. When the log tag (component) is available (iOS 11/Xcode 9), filter to
the set of log lines with tag 'Flutter'.
As of iOS 11 / Xcode 9, Flutter engine logs are no longer recorded in the
simulator's syslog file, which we previously read using tail -f. Instead
they're now accessible through Apple's new macOS/iOS os_log facility,
via /usr/bin/log, which supports a relatively flexible query language.
When run in non-interactive mode, /usr/bin/log buffers its output in 4k
chunks, which is significantly smaller than what's emitted up to the
point where the observatory/diagnostics port information is logged. As a
workaround we force it to run in interactive mode via the script tool.
* Add --trace-skia parameter to flutter run
Skia tracing is extremely useful for internal debug, but reduces the
amount of space available in the Dart Timeline buffers.
Disable skia tracing by default and expose them via the --trace-skia
flag.
* Roll Engine to 57a1445a45964d386500c39f5e8d06db060abadb