Jens Johansen
fa88e0c91f
[analyzer] Add benchmarks of running dart analyze
...
This CL:
* Adds a benchmark of running `dart analyze` on a single small file.
* Adds a benchmark of running `dart analyze` on a single project.
* Adds a benchmark of running `dart analyze` on several projects.
* Adds a hidden flag to `dart analyze` so it reports ram usage:
run via `dart analyze --format=json --memory` and the memory
usage will be reported in the json output.
All the bencmarks run without and with cache for speed testing, and
without and with cache when measuring memory usage.
The idea of running this via `dart analyze` instead of running either
the script or the snapshot is to measure the "real world" speed which
could be different (although in practise it _does_ just run the
snapshot).
Future CL(s) should also add benchmarks for queries using the
language server.
Change-Id: Iad6d6d72c1a2ed18ab51d056b4914f8b6eb963e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2022-12-19 08:22:32 +00:00
Ahmed Ashour
0c4c372d5e
[analysis_server] associate RemoveNameFromDeclarationClause with various diagnostics
...
Bug #50753
Change-Id: I3520a1ce3af3bfc651df582505835468705bdda2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-16 22:03:50 +00:00
Brian Wilkerson
e845949df6
Add documentation on semantic highlighting
...
Change-Id: Ie836c01d167ec17df9d762a365da278499076e11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276181
Reviewed-by: Kallen Tu <kallentu@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-16 19:17:32 +00:00
Ahmed Ashour
f12f1ad664
[analysis_server] ReplaceWithNullAware to handle IndexExpression
...
Fixes #50691
Change-Id: I9bc6e1f72ff71623139ce94b3f3e94eba8ed4fd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-16 17:29:38 +00:00
Sam Rawlins
94f20d7731
Revert "Remove all support for all strong-mode analysis options"
...
This reverts ea120b5d44
Change-Id: I97a1bf6ced06bf8bcab50a2fdb41732f13182a84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276026
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-16 00:47:49 +00:00
Samuel Rawlins
6d05f249ff
Revert "Remove preview-dart-2 option in analysis options"
...
This reverts commit f30e5de558 .
Reason for revert: https://dart-review.googlesource.com/c/sdk/+/274921 broke customer test, and this CL sits right on top of it.
Original change's description:
> Remove preview-dart-2 option in analysis options
>
> Fixes https://github.com/dart-lang/sdk/issues/50680
>
> AnalysisOptionsHintCode is moved from generated `option_codes.g.dart` to `option_codes.dart`, for non-generated diagnostics:
>
> * AnalysisOptionsHintCode.DEPRECATED_LINT_HINT and
> * AnalysisOptionsHintCode.DUPLICATE_RULE_HINT
>
> Change-Id: I131fb2901fca26ff971b6c9c519ab2f0b983a65c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275500
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Samuel Rawlins <srawlins@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ia417aa5edc5b279a5fced43154de4cd5c9d3be2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276023
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2022-12-15 22:54:51 +00:00
pq
ea1473e6cd
linter 1.32.0
...
See: https://github.com/dart-lang/linter/issues/3848
Change-Id: I73469ce43d52c1755875a39067b267f216ebd490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275044
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2022-12-15 22:51:28 +00:00
Ahmed Ashour
a6f4fbe17b
[analysis_server] ConvertToMapLiteral to handle types with typedef
...
Fixes #50581
Change-Id: Ieeb4c6730036e112bcf37353a18535f342fd28a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-15 22:09:46 +00:00
Ahmed Ashour
f652c7962b
[analysis_server] fix AddNullCheck with null-aware operators
...
Fixes #50506
Change-Id: I8f7564ec7aaaf32888e9979254e450cd2633e307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-15 21:13:41 +00:00
Sam Rawlins
f30e5de558
Remove preview-dart-2 option in analysis options
...
Fixes https://github.com/dart-lang/sdk/issues/50680
AnalysisOptionsHintCode is moved from generated `option_codes.g.dart` to `option_codes.dart`, for non-generated diagnostics:
* AnalysisOptionsHintCode.DEPRECATED_LINT_HINT and
* AnalysisOptionsHintCode.DUPLICATE_RULE_HINT
Change-Id: I131fb2901fca26ff971b6c9c519ab2f0b983a65c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2022-12-14 21:04:29 +00:00
Jens Johansen
959f0a299c
[analyzer] Report memory usage on Windows too
...
Change-Id: I6a31370c51e40a9593f8875d365a43d9f4111aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2022-12-14 18:11:25 +00:00
Sam Rawlins
a5392b932b
Re-categorize all SDK_VERSION_* codes as StaticWarningCode
...
Change-Id: If7a83f9f3258ce369dbe3142fcd5c088d6d88e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2022-12-14 16:14:38 +00:00
Sam Rawlins
ea120b5d44
Remove all support for all 'strong-mode' analysis options
...
Fixes https://github.com/dart-lang/sdk/issues/50679
Change-Id: I3572faf51276f5c7551d35b7725c799567189413
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2022-12-13 21:32:24 +00:00
Sam Rawlins
fdf59ad1eb
Remove all support for super-mixins option
...
Bug: https://github.com/dart-lang/sdk/issues/50680
Change-Id: I96409d02e64d3e198e0fae4a55f58f871ce2aeac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2022-12-13 18:13:37 +00:00
pq
331185dbef
fix generator script
...
Change-Id: I1b0ce85aff6d80608d9ad1de90923bff59c686bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2022-12-12 23:06:06 +00:00
Danny Tuppeny
ef2c7916f5
[analysis_server] Exclude instrumentation log file from logged watch events to prevent loops
...
Fixes https://github.com/dart-lang/sdk/issues/48885 .
Change-Id: Idebfd9d4f2867b3053c0ece49b300926956fab2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275061
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-12 20:09:36 +00:00
Brian Wilkerson
2fbb93fc11
Do not apply the fix for avoid_function_literals_in_foreach_calls when body is not sync
...
Change-Id: I0482c0d35a01afffd26073383b137697b829249c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274943
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-12 18:12:57 +00:00
Sam Rawlins
315ff0b8a2
analysis_server: quick fixes for records
...
* allow rename_to_camel_case to apply to record type field names
* allow replace_final_with_const to apply to record literals.
Change-Id: Id373180dae9f7a78677e30c4dbc535bbb87ce3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272486
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-10 23:12:23 +00:00
Brian Wilkerson
bb7e2c9b95
Remove some unnecessary ignores in test code
...
Change-Id: I55e332132b9f3e435d79dd03a7aa7459d796599a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2022-12-10 00:19:30 +00:00
Konstantin Shcheglov
78fb91e739
Resolve PatternAssignment and AssignedVariablePattern.
...
Change-Id: I79a7a3b7f5b5fed349c9d40d61a9e0f0fd3978ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-09 22:46:28 +00:00
Brian Wilkerson
d9482e35ce
Remove some unnecessary ignore comments in analyzer packages
...
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-09 21:33:18 +00:00
Brian Wilkerson
3166622ca1
Update the fix status file
...
Change-Id: I13fc20f8040be486a4d1d44647a871e7e1c69013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274482
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-09 16:46:51 +00:00
Brian Wilkerson
abda30f198
Replace NodeLocator in two more places
...
Change-Id: I34a67ae8b370ec4c400ac5b9195d537380aca3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-09 01:13:28 +00:00
Kallen Tu
b58f1b4ef3
[analyzer] Report error when mixing in a sealed mixin outside of its library.
...
Change-Id: I62be6c21bc2bf2a5af35203137aa75c7fd1ba934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274142
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2022-12-08 21:18:24 +00:00
Brian Wilkerson
44e11d9dd4
Add a utility to find adjacent siblings in a selection
...
This will be used to allow multiple top-level declarations to be moved
together.
Change-Id: Ib1c59e9ff3e01891f8cb29b74e78183c36b1f02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273828
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-08 20:48:58 +00:00
Ahmed Ashour
66990edcf5
[analysis_server] fix RemoveDeadCode with forParts
...
Bug #43511
Change-Id: I82854382928cd29bfc7c646f0c202d28603f8836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-08 06:33:09 +00:00
Brian Wilkerson
8569d24f3e
Attempt to fix the windows bot
...
Change-Id: Id1743f8998c2cb2553b5cfed801e9caef9c1d7c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274264
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2022-12-08 02:20:17 +00:00
Brian Wilkerson
de36e1cfb7
Enable patterns in server tests
...
Change-Id: I1d256b4c1c0cc20cb3e46087cd896d0920f82690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-08 02:12:14 +00:00
Konstantin Shcheglov
aea639bd03
Issue 50604. Fix renaming extension at its declaration.
...
Bug: https://github.com/dart-lang/sdk/issues/50604
Change-Id: I1c685ea7545ef120e5fc23fe6a507ded8c4f4cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-07 22:38:19 +00:00
Konstantin Shcheglov
356d15a3fc
Issue 50603. Fix element kind to EXTENSION in search.getElementDeclarations
...
Bug: https://github.com/dart-lang/sdk/issues/50603
Change-Id: I22b4d827bc9472544cf3c3aad3473de8050e2f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274085
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-07 22:37:37 +00:00
Konstantin Shcheglov
52be8e0f3e
Issue 50496. Add mixin super invoked names to the unlinked signature.
...
Bug: https://github.com/dart-lang/sdk/issues/50496
Change-Id: I09c6dbc025cecc52e8f0340388bbf2b79ea78057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273831
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-07 22:17:22 +00:00
Kallen Tu
7ff20a67ca
[analyzer] Report error when subtyping a sealed class outside of its library.
...
Change-Id: Iee6c9120d096ed49592ca3d155c81c876ceb5c34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273832
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-12-07 22:00:28 +00:00
Danny Tuppeny
df3df89fd9
[analysis_server] Include type in extract-local-variable if always_specify_types is enabled
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4177 .
Change-Id: I8da492c947466677e84d7892113f0bbfbdacfb87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-07 21:11:47 +00:00
Danny Tuppeny
092bdb17d3
[analysis_server] Improve Snippet performance with caching and earlier filtering
...
This shares a cache for mapping Elements to their public LibraryElements across each snippet producer, and also skips snippet producers that produce snippets that won't match any typed prefix.
Change-Id: I6b64b3c55f1030a5eaa7ca1afdcd6c416e4baa08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273962
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-07 20:31:12 +00:00
Danny Tuppeny
c24f36d470
[analysis_server] Use public (non-src) URIs for Flutter snippet imports
...
Fixes https://github.com/dart-lang/sdk/issues/49081 .
Change-Id: I0734b4f45c72d70f7b32640bed6b6ec2e8130c01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-05 22:32:19 +00:00
Brian Wilkerson
7953da5cf1
Fix the windows bot
...
Change-Id: I4d71fd70b2f0b4a4a3af3446f56fbd9b79fd0954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-05 18:00:16 +00:00
Ahmed Ashour
bea7045517
[analyzer] add failing test case
...
Bug #50496
Change-Id: Iaa6007af1b9dbbf7bac3f2ad835dece3eb64b189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271520
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-05 17:37:43 +00:00
Jens Johansen
b812517fac
[analyzer] Don't ask for subtypes for the same elements several times when searching for references
...
When asking for all references of a member it starts by finding all
supertypes for the class, then for each supertype (including itself)
(that has a member with the same name as the one we're querying for)
it searches for all subtypes.
We recall that when getting all subtypes, it really gets all direct
subtypes, then for each of those, their direct subtypes etc.
Naturally, then, with getting all subtypes for all supertypes we
will often ask for all direct subtypes of the same class several times.
In fact, it's O(n^2):
As an example, if asking for references to `foo` on this
(in a file in analyzer, with 8 workspaces):
```
class X0 { void foo() { print('hello'); } }
class X1 extends X0 { void foo() { print('hello'); } }
class X2 extends X1 { void foo() { print('hello'); } }
[...]
class X149 extends X148 { void foo() { print('hello'); } }
```
we ask for subtypes 90600 (150 classes * 151 / 2 * 8 workspaces) times.
This CL stops that from happening and in the example from above we
"only" asks for subtypes 1200 (150 classes * 8 workspaces) times.
For the `newFile` from `AbstractSingleUnitTest` example, for instance,
we go from 28,264 asks to 17,432 asks (a ~38% reduction).
Non-first runtimes when asking for references:
Before:
0:00:03.074853
0:00:03.021881
0:00:03.034707
0:00:03.115596
0:00:03.032574
After:
0:00:02.223978
0:00:02.149937
0:00:02.150236
0:00:02.104704
0:00:02.175859
Difference at 95.0% confidence
-0.894979 +/- 0.060283
-29.2867% +/- 1.97266%
(Student's t, pooled s = 0.0413338)
Change-Id: Id792a595e74de01c7186ab1263c38728f051f603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272623
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-05 08:03:24 +00:00
Brian Wilkerson
6346e7fcd1
Update imports in files other than the source and destination when moving declarations
...
Change-Id: I3675bddc9479744a4642bdbb66b8de013f0f01df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-02 23:22:16 +00:00
Konstantin Shcheglov
48d0d95edb
Report CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION
...
Change-Id: Idb6d0963515457e1748362dbda1441d5820a040a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-02 22:56:57 +00:00
Konstantin Shcheglov
70b994e54f
Test rest element with subpattern in map pattern.
...
Change-Id: I348ce8bfb6b32b3fcd1a63427d0a82a33dfa2c1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-02 21:50:50 +00:00
Konstantin Shcheglov
46bffdabb1
Test logical-and in variable declaration, report REFUTABLE_PATTERN_IN_IRREFUTABLE_CONTEXT.
...
Change-Id: I7fcffea3b591fbe3a181a8bb8a8a461d18ec3d64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273340
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-02 17:53:19 +00:00
Sam Rawlins
987c7503d1
Move DAS tutorial dir, and add light mode icons
...
The tutorial doc was mistakenly _not_ in the doc/ directory.
The icons show up as way too big, so I use inline HTML to specify
their width, so that they look good inline.
I add light mode icons, and use GitHub (and dartdoc)'s support for
switching between light mode and dark mode images.
https://www.stefanjudis.com/notes/how-to-define-dark-light-mode-images-in-github-markdown/
Change-Id: I1a368bfc6628adf941ba5e7a752317f9757d2538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273460
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-02 17:16:08 +00:00
Jens Johansen
8cc984cd45
[analyzer] More timings and keep track of number of invocations
...
Before we might get something that looks like this:
```
(name: request, elapsed: 0:00:00.732983, elapsedSelf: 0:00:00.002428)
(name: requireResolvedUnit, elapsed: 0:00:00.037635, elapsedSelf: 0:00:00.037635)
(name: _getImplementations, elapsed: 0:00:00.692920, elapsedSelf: 0:00:00.000135)
(name: searchAllSubtypes, elapsed: 0:00:00.691494, elapsedSelf: 0:00:00.691494)
(name: filter and get location, elapsed: 0:00:00.001291, elapsedSelf: 0:00:00.001291)
```
With this CL we get this:
```
(name: request, count: 1, elapsed: 0:00:00.739592, elapsedSelf: 0:00:00.008764)
(name: requireResolvedUnit, count: 1, elapsed: 0:00:00.104381, elapsedSelf: 0:00:00.104381)
(name: _getImplementations, count: 1, elapsed: 0:00:00.626447, elapsedSelf: 0:00:00.000350)
(name: searchAllSubtypes, count: 1, elapsed: 0:00:00.624650, elapsedSelf: 0:00:00.001226)
(name: _searchDirectSubtypes, count: 428, elapsed: 0:00:00.623424, elapsedSelf: 0:00:00.023618)
(name: discoverAvailableFiles, count: 8, elapsed: 0:00:00.000422, elapsedSelf: 0:00:00.000422)
(name: subTypes, count: 3424, elapsed: 0:00:00.599384, elapsedSelf: 0:00:00.599384)
(name: filter and get location, count: 1, elapsed: 0:00:00.001447, elapsedSelf: 0:00:00.001447)
```
Change-Id: Ia6ff3a55d7d0467b41a036ecdfb86f7e7b436b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2022-12-02 08:58:23 +00:00
Sam Rawlins
14d553ad9d
Add a tutorial for collecting instrumentation, and analyzer diagnostics
...
Change-Id: Icdf8480cf9954b6181bed320ccc1764055bd6640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273301
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-02 07:31:18 +00:00
Konstantin Shcheglov
73721f7654
Report PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT
...
Mostly to don't crash when running co19 tests.
Change-Id: I62838d04872642b2e3a9ed01a1be120aec1c0608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273081
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-02 02:58:16 +00:00
Oleh Prypin
328c261397
Expand RemoveReturnedValue fix to turn => null into {}
...
This is targeted at the lint `avoid_returning_null_for_void` which already complains about expression function bodies but the fix doesn't do anything for them.
Change-Id: I14f3d7659301edae08482d9ffa6b72b483737e59
Bug: https://github.com/dart-lang/sdk/issues/45920
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Oleh Prypin <oprypin@google.com >
Commit-Queue: Oleh Prypin <oprypin@google.com >
2022-12-01 22:04:48 +00:00
Danny Tuppeny
a7baf9309f
[analysis_server] Ensure plugin protocol classes only use types valid for Isolate.send()
...
Fixes https://github.com/dart-lang/sdk/issues/50594 .
Change-Id: I5550239dbce4a1ed7fbd844dd53642989289c899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-01 16:57:56 +00:00
Konstantin Shcheglov
e89d93f48c
Support for 'final' in PatternVariableDeclarationImpl.
...
Change-Id: I0ea3952e502f5e1ce4bfea412bb9c0a4471da6f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273008
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-12-01 01:59:09 +00:00
Konstantin Shcheglov
212eae02de
Resolve MapPattern(s).
...
Change-Id: I1f80c7f919018a74525948bd4dbec879fc3e0672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272744
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2022-11-30 17:44:28 +00:00