Commit Graph

21 Commits

Author SHA1 Message Date
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Danny Tuppeny
ce0e5c4330
[flutter_tools] Update the mapping for the Dart SDK internal URI (#151170)
This changes the mapping for the Dart SDK inside Flutter from `org-dartlang-sdk:///third_party/dart/sdk` to org-dartlang-sdk:///flutter/third_party/dart/sdk`. This URI changed in https://github.com/flutter/engine/pull/51917 but was not caught by tests because they only tested a specific set of mappings and there were no integration tests checking what URIs were actually produced by a running app.

So, this change also adds an integration tests that ensures that a real running app produces URIs that are then correctly mapped.

Fixes https://github.com/Dart-Code/Dart-Code/issues/5164.
2024-07-02 22:56:17 +00:00
Danny Tuppeny
cea1d6f055
Unpin DDS and roll pub packages (#147925)
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test
failures (see https://github.com/flutter/flutter/pull/147250). Those
failures should be fixed by vm_service 14.2.2, so this unpins DDS and
rolls both of these packages (along with devtools_shared, which is a DDS
dependency).

(If the bot updates vm_service before this is done, I can rebase over
that will reduce the size of this PR to just a few files)
2024-05-08 10:35:28 +01:00
Elliott Brooks
c1c7898b96
Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
Mouad Debbar
7d9010c357
Typo fix in dartdoc in tool test (#139386)
The tree is red due a non-hermetic customer test from `macos_ui`. The
test was disabled in https://github.com/flutter/tests/pull/317 and an
issue was filed at https://github.com/macosui/macos_ui/issues/499.

We need this empty commit in order to re-run CI with the latest
https://github.com/flutter/tests.
2023-12-01 14:24:09 -05:00
Danny Tuppeny
0386f910d1
[flutter_tools/dap] Improve rendering of structured errors via DAP (#131251)
In the legacy VS Code DAP, we would deserialise the Flutter.Error event
and provide some basic colouring (eg. stack frames are faded if not from
user code and the text is split between stdout/stderr to allow the
client to colour it).

In the new DAPs we originally used `renderedErrorText` which didn't
support either of these. This change adds changes to use the structured
data (with some basic parsing because the source classes are in
package:flutter and not accessible here) to provide a similar
experience.

It would be nicer if we could use the real underlying Flutter classes
for this deserialisation, but extracting them from `package:flutter` and
removing all dependencies on Flutter is a much larger job and I don't
think should hold up providing improved error formatting for the new
DAPs.

Some comparisons:


![1_comparison](https://github.com/flutter/flutter/assets/1078012/74e7e6d6-c8d0-471f-b584-37ae148b0ce7)


![2_comparison](https://github.com/flutter/flutter/assets/1078012/21888934-6f2f-4048-86d7-bdf92d5c7301)
2023-07-31 13:03:26 +01:00
Helin Shiah
0b44577f16
Add new hot reload case string (#130008)
This change is for an internal IDE client to send a custom hot reload
request, as custom requests from the client must start with `$/`.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above. (this PR is linked internally)
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-07-05 15:16:33 -04:00
Alexander Aprelev
581ebe2965
Roll dds dependency to 2.8.3 for expression evaluation upcoming fixes. (#128124)
The fix is coming as part of https://dart-review.git.corp.google.com/c/sdk/+/306908 dart sdk roll as well as https://github.com/flutter/flutter/pull/128084.

BUG=https://github.com/dart-lang/sdk/issues/52522
2023-06-02 23:31:07 +00:00
Danny Tuppeny
cacef57b6e
[flutter_tools] Skip over "Resolving dependencies..." text in integration tests (#120077)
Sometimes when the integration tests run Flutter apps they get this output (perhaps based on timing of file modification times). Some of the tests want to verify strict output but not fail just based on these lines before the app starts.

See https://github.com/flutter/flutter/issues/120015 / https://github.com/flutter/flutter/pull/120016.
2023-02-16 10:12:16 -08:00
Christopher Fujino
c6b636fa51
[flutter_tools] Replace Future.catchError() with Future.then(onError: ...) (#120637)
* wip run_local_linter.dart

* get run_local_linter.dart working

* slow working implementation

* speed up run_local_linter.dart

* fix run_local_linter.dart

* remove catchError

* another fix

* fix another

* fix

* more fixes

* fix moar

* fix moar

* fix

* finish

* fix tests

* clean up further

* code review

* delete run_local_linter.dart
2023-02-15 19:03:00 +00:00
Danny Tuppeny
09bd0f6613
Support logging 'flutter run' communication to DAP clients (#118674)
* Support logging 'flutter run' communication to DAP clients

Fixes https://github.com/Dart-Code/Dart-Code/issues/4266.

* Fix test
2023-01-19 23:50:33 +00:00
Danny Tuppeny
5655225cd7
Send progress notifications to clients during hot reload / hot restart (#112455) 2022-09-29 16:27:40 +01:00
Danny Tuppeny
c67d2587d5
Provide more useful error message if a non-compliant DAP tool (or user) sends bad input to DAP server (#107827) 2022-07-19 11:48:05 -07:00
Danny Tuppeny
c659ad6ace
Add support for attachRequest in DAP, running "flutter attach" (#97652)
* Add support for attachRequest in DAP, which runs "flutter attach"

* Update DAP docs for attachRequest

* Improve doc comments

* Fix comments

* Remove noDebug from attach + create a getter for `debug`

* Fix indent
2022-02-07 18:54:07 +00:00
Lau Ching Jun
d7688ca093
Change all instance of throwing strings to throw specific error classes. (#97325) 2022-02-02 10:45:18 -08:00
Caio Agiani
29b44f79d9
packages: fix typos recieve => receive (#97488) 2022-01-31 08:43:15 -08:00
Danny Tuppeny
4fa0e0d449
Make DAP tests more tolerant of output that didn't come from the app being tested (#97291)
Fixes #97238.
2022-01-29 10:03:31 +00:00
Danny Tuppeny
77fca35877
[DAP] Add a custom event to pass flutter.serviceExtensionStateChanged… (#93870) 2021-11-22 20:12:33 -08:00
Danny Tuppeny
99e85b1c5f
Disable pause-on-exceptions for (outgoing) isolates during hot restart (#93411) 2021-11-18 22:23:09 -08:00
Danny Tuppeny
57dbf7f7e7
Add support for running tests through debug-adapter (#92587)
* Add support for running tests through debug-adapter

* Improve comments about stdout + remove pedantic
2021-10-28 11:34:05 +01:00
Danny Tuppeny
de966d8a49
Add a "flutter debug_adapter" command that runs a DAP server (#91802) 2021-10-27 06:48:06 -07:00