Observatory can still be enabled by providing `--serve-observatory` or
invoking the `_serveObservatory` private service RPC via web socket or
HTTP.
Related to https://github.com/dart-lang/sdk/issues/50233
Use the pub cache resolved by pub itself.
To add packages to the flutter.zip download they are packaged as tar.gz and added to the pub-cache on first run by using `pub cache preload`.
* [flutter_tools] Add support for URI formats like ?line=x for "flutter test"
* Remove unnecessary function
* Handle parsing absolute paths on Windows
* Use Windows-style paths when running on Windows
* Fix paths in isFile
* Remove unnecessary clear
* Allow any JS file in flutter loader.
* Nag only if service worker API is completely unavailable.
* Add info about Secure Contexts if that may be the reason why serviceworker is not available.
* Update sanity test.
* If service worker settings are null, do not even check if the API is available.
* allow passing --file-reporter option to test running refs #69425
* Add trailing comma to help to meet style requirements
* Add space between tests for clarity
---------
Co-authored-by: daniel-v <dvarga@skawa.hu>
* Add Linux unit tests to plugin template
Adds an example native unit test to the plugin template for Linux,
matching the structure we use for our 1P plugin unit tests. Once these
have been added for all platforms+languages, they will be documented on
a new plugin development page to explain their use.
While ideally we would adjust the engine APIs first to allow for testing
the method call handler directly, it's unclear when we will have time
for that work, and for a complex plugin most of the testing wouldn't be
at that layer anyway, so having the structure in place with the
limitations documented is still a significant improvement over having
nothing in the template.
Part of https://github.com/flutter/flutter/issues/82458
* Add creation test
* Add integration tests
* Missing newlines
* test owner
* Typo
...and various other minor cleanup:
* Moved "FLUTTER_STORAGE_BASE_URL" into a constant throughout the code. There are other strings that we should do that to but this one was relevant to the code I was changing.
* Fixed the logger's handling of slow warnings. Previously it deleted too much text. Fixed the test for that to actually verify it entirely, too.
* Made the logger delete the slow warning when it's finished.
* Fixed 'Please choose one (To quit, press "q/Q")' message to be the cleaner 'Please choose one (or "q" to quit)'.
* Added a debug toString to ValidationResult for debugging purposes (not used).
* In http_host_validator:
- Shortened constant names to be clearer (e.g. kPubDevHttpHost -> kPubDev).
- Added GitHub as a tested host since when you run `flutter` we hit that immediately.
- Renamed the check "Network resources".
- Updated the `slowWarning` of the check to say which hosts are pending.
- Removed all timeout logic. Timeouts violate our style guide.
- Removed `int.parse(... ?? '10')`; passing a constant to `int.parse` is inefficient.
- Replaced the `_HostValidationResult` class with `String?` for simplicity.
- Improved the error messages to be more detailed.
- Removed all checks that dependened on the stringification of exceptions. That's very brittle.
- Added a warning specifically for HandshakeException that talks about the implications (MITM attacks).
- Replaced exception-message-parsing logic with just calling `Uri.tryParse` and validating the result.
- Replaced a lot of list-filtering logic with just a single for loop to check the results.
- Replaced code that added a constant to a known-empty list with just returning a constant list.
- Revamped the logic for deciding which hosts to check to just use a single chain of if/else blocks instead of getters, lists literals with `if` expressions, `??`, functions, etc spread over multiple places in the code.
* Move linux-x64-flutter-gtk.zip to linux-x64-debug location.
linux-x64-flutter-gtk.zip is being uploaded twice to linux-x64-debug
and linux-x64 as part of making a soft transition to use linux-x64-debug
location. This PR starts using the copy inside linux-x64-debug to later
remove the duplicated upload.
* Also move arm64.
* Do not override output dir.
* 🔥 Do not format the messages file
* ✅ Add test
* ✅ Add the link to the test
* ✅ Respect the path separator from the file system
* ✅ Add the untranslated messages file existence test
* fix when duplicate mdns results are found
* put mdns auth code in it's own function and update tests
* add comments, refactor auth code parsing, other small tweaks
* Reland "Add --serve-observatory flag to run, attach, and test (#118402)"
This reverts commit 86ab01d2bd.
* Fix flaky failures
* Fix VM service disappearing failure
* refactoring to use `ver` command instead of `systeminfo`
* fix tests to match new approach
* adding another valid validator using brazil locale text
* refactor tests to use generic fake class `ver` arg + showing output from `ver` if unsuccessful
* update reason text in test
* fix reason text to be hard coded
* Add usage event to track when a iOS network device is used
* update usage event to track percentage of iOS network vs usb devices, update and fix tests
* refactor tracking to happen in usageValues with a custom dimension
* Add Windows unit tests to plugin template
Adds an example native unit test to the plugin template for Windows,
matching the format we use for our 1P plugin example app unit tests.
Once these have been added for all platforms+languages, they will be
documented on a new plugin development page to explain their use.
Since we don't appear to be running our current plugin e2e tests for
Windows, this adds a new configuration to run them. I haven't
`led`-tested this, so it may not work, but this will give a starting
point for getting them running.
Part of https://github.com/flutter/flutter/issues/82458
* Minor fix
* Add test owner
* Fix typo
* Fix test feature flag
* Add new macos target configured for flavors
* Rename Free App copy-Info.plist to Free App Info.plist
* Remove bogus entitlements
* Remove Generated.xcconfig
* Audit project.pbxproj
* Remove unused configs
* share one info.plist
* Modify scheme so that paid app works
* Codesign automatic
* Pipe flavor as scheme into xcodebuild
* Ignore incoming flavor string
* pipe flavor for flutter run to work
* Add devicelab tests
* Error if host and target device are same for flutter install desktop
* Avoid bang (!) by promoting a local.
Co-authored-by: Jenn Magder <magder@google.com>
* Add supportsInstall property
* Override in test classes
* Add install test on macOS
* Refactor application_package and add tests for package directory
Co-authored-by: a-wallen <stephenwallen@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
* setup wireless debugging to use device IP
* fix tests
* fix unused var and missing annotation
* remove unneeded try catch
* remove commented out line, change null to package id
* better way to get package id
* update mDNS lookup to continously check for server, add messaging if takes too long to find observatory url, update flutter drive to enable publish-port if using network device
* Refactor mDNS Discovery to poll for observatories and better handle multiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available
* add and update comments, use logger spinner intead of timer in flutter attach, other small improvements
* add newline to message so next log won't be on same line
* fix install/waiting for permission status progress so it doens't double print the time it took.
* only print backtrace if observatory times out on a physical usb connected device
* fix test
* Update related references from Observatory to Dart VM Service
* fix test
Update test expectations from application/javascript -> text/javascript
`package:mime` now uses `text/javascript` and not `application/javascript`.
See https://github.com/dart-lang/mime/pull/76.
See https://datatracker.ietf.org/doc/html/rfc9239.
> This document defines equivalent processing requirements for the various script media types. The most widely supported media type in use is `text/javascript`; all others are considered historical and obsolete aliases of `text/javascript`.
* Add Info.plist from build directory as input path to Thin Binary build phase
* fix directive ordering
* migrate benchmark, integration, and example tests
* Use correct API doc link in create --sample help message
* Verify Flutter and Dart website links in tool help messages use https
* Adjust test failure reasoning message
* Align `flutter pub get/upgrade/add/remove/downgrade`
* Add final . to command description
* Remove trailing whitespace
* Don't print message that command is being run
* Update expectations
* Use relative path
* Remove duplicated line
* Improve function dartdoc
* Make pub get runner respect printProgress and retry parameters
* Fix typo
* Add regression test
* Improve test
* Fix implementation and test
* Test to fix flutter_drone tests
* Revert test
* Attempt #2 to fix flutter_drone tests
* Revert attempt
* Hack: Force printProgress to debug Windows tests
* Use ProcessUtils.run to avoid dangling stdout and stderr
* Update documentation
* Clean up retry argument
* Work in progress.
* Some fixes to the command line.
* Bootstrapping works.
* Change kickoff order to maximize concurrency.
* Fix analyzer errors and formatting issues.
* Fix doc comment.
* Added unit tests for some of the web targets.
* Format issue.
* Add an integration test that builds an app to wasm.
* Add a todo for depfiles.
* Formatting.
* Apparently the license header needs to say 2014.
* `file://` URIs confuse dart2wasm on Windows. Just use absolute paths.
* Update unit tests to match new path passing.
* Have a distinct build directory for wasm, and fixes for some upstream changes.
* [tools]some ui polish for build ipa validation
* do not print out a few success validations
* rename installed type to success for more general usage
* forgot nit after reverting custom validation types and re-use doctor types
* wip
* remove temp text file
* fix tests
* add test
* default to off
* restore gitignore
* update
* apply annotation to cupertino icons as well
* update reference to library in icon_tree_shaker.dart
* update tests
* fix tests
* remove hack to skip non-const check on web
* add hint about how much reduction and test
* Add an integration test to plugin template example
Dart unit tests don't exercise host-side plugin code at all, so the
example tests in the plugin template currently have very little
meaningful coverage. This adds an integration test to the example app
when creating a plugin, so that there's an example of how to actually
test that a complete round-trip plugin call works.
This is done as a separate template that's currently only used by the
plugin template because I don't know what a good example for a
non-plugin case would be that isn't largely just a duplicate of the
widget tests. However, the integration test pre-includes conditionals
around the parts that are plugin-specific so that it can more easily be
expanded to other use cases later (e.g., in
https://github.com/flutter/flutter/issues/68818).
Part of https://github.com/flutter/flutter/issues/82458
* Add integration test to expected dependencies of a plugin app
* Test fixes
* Make an explicit test case
* Roll Flutter Engine from 67254d6e4b03 to 8d83b98c55b3
* Roll Dart SDK from 35a9facce191 to e517487c5679 (Dart 3.0) (#38105)
* Bump SDK versions.
* Bump Dart SDK version constraints
* Update shrine package to 2.0.1 (null safe version)
* Fix more tests.
* Include patches from Jason for min android sdk version
* Fix analyzer warning
* Use file:/// style uris when passing platform to the compiler.
* License header.
* Use BufferLogger.
* Don't unadvertently convert strings to regexes for matching purposes.
* Fix formatting.
* More formatting.
You can now specify a --local-web-sdk flag to point to a wasm_release folder. This will make it so that only artifacts that pertain to the web sdk are overridden to point to the wasm_release folder. Other artifacts (such as impellerc) will pull from the cache, or from the --local-engine path if that is specified.
This also uses precompiled platform kernel files for both ddc and dart2js
* [gen_l10n] keys can contain dollar sign
Fixes#112250
* Update packages/flutter_tools/lib/src/localizations/gen_l10n.dart
Co-authored-by: Christopher Fujino <fujino@google.com>
* Removes retries from "pub get" and proxies its stdout output
* Fix issue where ErrorHandlingProcessManager does not forward "mode" parameter to backing ProcessManager's "start" method
* Make "pub get" use ProcessStartMode.inheritStdio instead of forwarding bytes to stdout and stderr
* Fix tests
* Remove unused env var
* Add back 'Running "flutter pub get"...' status log
* Fix indent
* Add Pub.test() constructor which lets tests mock stdio
* [flutter_tools] Forward app.webLaunchUrl event from Flutter to DAP clients
Fixes https://github.com/Dart-Code/Dart-Code/issues/4292.
* Update packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart
Co-authored-by: Christopher Fujino <fujino@google.com>
* Another static const instead of final
Co-authored-by: Christopher Fujino <fujino@google.com>
* normalize windows file path cases in flutter validator
* fix
* make comparison more accurate by checking .startsWith() rather than .contains()
* fix method name
* call path.canonicalize
* fix
* [tools]build ipa validate icon size
* add more checks in case apple change the format, and also add device lab tests
* do not depend on collection package
* [flutter_tools] Add --dump-info, --no-frequency-based-minification flags
Also some cleanup to named arguments to the buildWeb function
Fixes https://github.com/flutter/flutter/issues/115854
* fix tests
* [tools]build ipa validate template icon files
* use the same box for both validations, and added some unit test, and some nits
* add unit test for templateImageDirectory
* use fs.path.join intead of raw path
* use the correct filesystem
* lint
* use absolute path for flutter_template_images
* fix rebase
* update indentation
* removing default values for [reporter] and [timeout]]
* passing reporter arg to see tests pass
* added test to confirm TestCommand is not passing defaults
* add'l helper message for [reporter] arg
* default behavior for github actions + fixed tests
* removing github conditional for reporter + related test
* removing unused import
* Create a main alias for master channel.
To slowly migrate away from master branch in the flutter repository we
created a main branch that is mirroring master branch. This PR is also
adding a channel alias that will allow to use master/main interchangeably.
Bug: https://github.com/flutter/flutter/issues/95041
* Fix channel tests.
* Remove additional space.
* Dart2JS build step looks for compiled platform binaries.
* Use new locations of platform binaries.
* Added --local-web-sdk command line flag.
* Need to use the matching frontend server when doing ddc stuff.
* Update packages/flutter_tools/lib/src/test/web_test_compiler.dart
Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
* Update packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
* Formatting issues.
* Need to use URI format for platform dill.
* Fix resident runner tests.
* Fix analysis issue.
* Fix and add unit tests.
* Add some useful comments.
* Refine doc comments for flags.
Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
The recent survey suggests that some people are not finding documentation after they get started with Flutter, so let's just give them links right away. It might not help everyone but there's not really any downside so...
2022-11-10 22:13:52 +00:00
The one with the braid (she/her) | Dфҿ mit dem Zopf (sie/ihr)
- removes invalid arch check on Android workflow in order to enable Android development on any device supported
Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
* [flutter_tools/dap] Add support for forwarding `flutter run --machine` requests to the DAP client
Currently the only request that Flutter sends to the client is `app.exposeUrl` though most of this code is generic to support other requests that may be added in future.
* Improve comment
* Fix thrown strings
* StateError -> DebugAdapterException
* Add a non-null assertion and assert
* Use DebugAdapterException to handle restartRequests sent before process starts
* Fix typo + use local var
* Don't try to actually send Flutter messages in tests because there's no process
* add debugging options to simulator, test more debugging flags, add tests for other launch arguements
* refactor iOS launch arguments to use one function for both simulator and physical devices
* treat dart flags differently between physical and simulator
* Simplify some flags between devices.
Change --disable-service-auth-codes to not always be included for physical devices, only if disableServiceAuthCodes is true.
Change --disable-observatory-publication to be used for simulator devices too.
Change --enable-checked-mode & --verify-entry-points to be used if debuggingEnabled is true regardless of device type.
Chnage --trace-startup to be used for simulator devices too.
* fix ios release mode with buildable app startApp test
* determine observatory-port from deviceVmServicePort and hostVmServicePort
* add comments and remove hasObservatoryPort
* Alphabetize setup calls
* Add --flavor as an option for install
* Add verbose logging in install command
* Test that flavors build succeeds with proper flavor and fails with bogus one.
* Remove unused import
* The import was used...
* SQUASH
* Add flavor install test
* Rename test
* Add flavors install integration tests
* correct error message
* remove unused imports
* Delete copy test
* update test target
* Refactor mechanism to read buildInfo
* Remove unused import
* Set affected test targets to bringup: true
Co-authored-by: a-wallen <stephenwallen@google.com>
* exclude xcworkspace that begins with a period
* fix if spacing, add comment
* add unit test for when no xcworkspace found
* update to use xcodeWorkspace, make it nullable and refactor
* check if hostAppRoot exists before trying to get xcworkspace
* use local variables to take advantage of type promotion
* only check if not null, don't need to check if exists
* readd exist check for migrate
* readd missing line at end of file
Increases the minimum macOS deployment target from macOS 10.13 (High Sierra) to 10.14 (Mojave) in the macOS app templates.
Includes:
* Update migration for macOS 10.11 apps to upgrade to 10.14
* Adds migration for macOS 10.13 apps to upgrade to 10.14
* Apply migration to all examples, and integration tests
This does not increase version in the plugin templates since those will need to wait until the 10.14 framework rolls to stable channel, so new plugins can build with apps created with `flutter create` on stable channel.
Issue: https://github.com/flutter/flutter/issues/114445
See RFC: http://flutter.dev/go/flutter-drop-macOS-10.13-2022-q4
See previous patch: https://github.com/flutter/flutter/pull/107689
When testing whether a macOS deployment target version migration is
unnecessary due to already being at the target version, we were
previously checking the iOS deployment target version rather than the
macOS version. This updates it to test MACOSX_DEPLOYMENT_TARGET instead.
* Use UriConverter from context for test
* Fix type
* Pass URI converter using installHook
* Fix formatting
* Fix formatting in test
* Add comment about URI converter
The flag is true by default so the behavior does not change.
Next steps:
Use the flag for updated debugger module names:
- Frontend server: make the current behavior controlled
by the flag non-conditional
- Frontend server: add more debugging names changes under
the same flag, false by default
- Dwds: make changes required for the new module names.
- Flutter tools: when matching dwds changes roll to flutter,
pass the flag to the frontend server again.
- Cleanup:
- Frontend server: make new behavior default
- Flutter tools: remove uses of the flag.
- Frontend server: remove the flag.
Towards: https://github.com/dart-lang/webdev/issues/1692
Helps: https://github.com/flutter/flutter/issues/106727