Commit Graph

10502 Commits

Author SHA1 Message Date
Sam Rawlins cddd44e1e9 analyzer: Add separate code for concrete implementation override check
Erik wrote a great explanation for this check here:
https://github.com/dart-lang/sdk/issues/37993#issuecomment-757976910

Fixes https://github.com/dart-lang/sdk/issues/37993

Change-Id: I6fb0bd530fac495115314838ec0bb2168d5e9ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180088
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-20 21:27:43 +00:00
Daco Harkes 2e8f9b85a6 [vm/ffi] Change Pointer<T extends Struct>.ref to use static type
This CL changes the semantics of `Pointer<T extends Struct>.ref` to use
the compile-time `T` rather than the runtime `T`.

This enables tree shaking of subtypes of Struct and optimizing `.ref`.

Issue: https://github.com/dart-lang/sdk/issues/38721

TEST=tests/ffi/vmspecific_static_checks_test.dart
TEST=tests/ffi/*struct*test_.dart

Change-Id: I3f5b08c08ec0799ef8aab3c4177e2ac70d25501c
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177862
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-20 18:08:25 +00:00
Daco Harkes 1a71f94998 [vm/ffi] Disallow empty structs
Closes: https://github.com/dart-lang/sdk/issues/43974

TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I6141c193b6ac71e0dce2735322c62ffd84554cef
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177710
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-20 18:08:25 +00:00
Brian Wilkerson bf595ef8bd Remove two diagnostic codes as discussed
Change-Id: I9b76b1b2a4a1ff54cec91add510d11d6708f8fd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-20 05:17:36 +00:00
Konstantin Shcheglov b4f4de776a Update super-bounded types for null safety.
https://github.com/dart-lang/language/pull/1133/files

Change-Id: I633b328bb62780e09fb58535a83f7f35af161c25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180020
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-19 20:31:03 +00:00
Brian Wilkerson a8ef9f4df1 Add documentation for more diagnostics
Change-Id: I8a2e328fef54e77378558514bf2b62f186fe3451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-19 18:15:13 +00:00
Konstantin Shcheglov 693b9f730d Fix for resolving file URIs with special characters in BazelPackageUriResolver.
Change-Id: I2e9bb40aa3460b3b60e2354bff1b456851815ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-18 03:41:19 +00:00
Konstantin Shcheglov 5e66c2b1a1 Support for ForPartsWithExpression in binary format.
Change-Id: I69b47c6f21a2923731c91ba4d5edf8394b96408f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-16 19:29:43 +00:00
Paul Berry 75aea30724 Add an implementation of legacy type promotion to _fe_analyzer_shared.
The new implementation uses the same API as flow analysis.  This
should allow us to significantly simplify the CFE and analyzer, by
dropping their implementations of legacy type promotion in favor of
the shared implementation.

This CL just introduces the new implementation and unit tests for it;
it does not integrate it with the analyzer or CFE.  I will follow up
with a CL that does the integration.

Change-Id: Ie07b3b39604d6a022ad42f3ae6b648a317c8af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179560
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-16 17:07:23 +00:00
Konstantin Shcheglov 1f4c720616 Fix TODO in LibraryScope.shouldIgnoreUndefined
Change-Id: I76a5cb69980c11031f58fa8c67d21f3ee2f5ca53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 21:27:22 +00:00
Konstantin Shcheglov 1711659823 Replace findNodeAtOffset() and findNodeAtString() with FindNode.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I7058e347d504e7017e6229e520669d45602decd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179369
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 17:15:42 +00:00
Daco Harkes 3a0a33f35f [vm/ffi] Add fields to Structs which should not be empty
This CL adds fields to `Struct`s which should not be empty or removes
the structs.

Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974

TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I4a684bd96e3ed16a3fd0dd17019aeabf64ef074a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179182
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 12:24:13 +00:00
Konstantin Shcheglov b1b45645d0 Issue 44671. Don't report INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER for identifiers in hide combinators.
Bug: https://github.com/dart-lang/sdk/issues/44671
Change-Id: I810ab30f998c63c8b7a537c6fee7ea39c603be9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 03:45:12 +00:00
Konstantin Shcheglov 7f92bb2988 Remove debug print() in DeprecatedMemberUse_GnWorkspaceTest.
Change-Id: I49ee944f3c0b68417d6b8b448076dedcb8f7e820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179370
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 03:40:52 +00:00
Konstantin Shcheglov 82b81b40a6 Remove unused node_search.dart
Change-Id: I2676c5b632dab925a5857044804d965ab83860a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179366
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 01:50:45 +00:00
Konstantin Shcheglov d2f2f734bf Replace findElementsByName() with FindElement.
Change-Id: Ia7b9d6785eb0d727c2bebee2b94fc6258b50d71c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 01:10:24 +00:00
Konstantin Shcheglov e620276d12 Update check for potentially constant types to include any type aliases.
Change-Id: I7d43e532db1d0baa6e64639f174845077631effa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 00:46:43 +00:00
Konstantin Shcheglov 6700437384 Update variance computing and default types for non-function type aliases.
Rename some resynthesize tests to make them more consistent.

Change-Id: I6701b9c409973a68b545227b840a05e1bdd237d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 00:43:52 +00:00
Konstantin Shcheglov 56903e6cfb Replace findElementInUnit(), findLocalFunction(), and findLocalVariable() with FindElement.
Change-Id: I508b63fee81dc087489055448debb495a06eff6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-14 23:15:25 +00:00
Konstantin Shcheglov 7f95c18812 Deprecate CompilationUnitElement.functionTypeAliases
Change-Id: I0f13761adf3d1dfd18798d5b7549e64462be0b65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179360
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 22:38:23 +00:00
Konstantin Shcheglov cfe510ade8 Test for search of non-function type alias.
Change-Id: Iab2fc3980563a321eec3cf4e843d487b7b2b399d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 21:52:13 +00:00
Konstantin Shcheglov c393930f59 Feature 'constant-update-2018' is always enabled.
Change-Id: I97b9135e2a8e3b01933bf463437220ffd8bf1d0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 19:12:13 +00:00
Konstantin Shcheglov b0db6d38c0 Use single InstanceState.lazyEqualEqual()
R=brianwilkerson@google.com

Change-Id: I74e36c5b1a98cff0429a1cb77452f53a59cee9e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 02:24:04 +00:00
Konstantin Shcheglov aaabc7537d Use runtime type equality for type literal identity.
https://github.com/dart-lang/language/pull/1389/files#diff-2f9dda5244b707ca3b6d5988c6e5257d6025a99a5fa08ce0dc171c94bdc8ce0dR1256

Change-Id: Ie6b01c1ad5f5ab62ceef3e2672a2174ddaf62db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 01:13:34 +00:00
Konstantin Shcheglov e5d5a0f345 Don't report INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_* when null safety.
https://github.com/dart-lang/language/pull/1389/files#diff-2f9dda5244b707ca3b6d5988c6e5257d6025a99a5fa08ce0dc171c94bdc8ce0dR665

Change-Id: Iccc90f8f9bb877da604d5a5774a931b71a185b91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178928
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-13 21:19:04 +00:00
Daco Harkes 5d40d52fca [vm/ffi] Add Opaque type
Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974

TEST=samples/ffi/sqlite/lib/src/bindings/types.dart
TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: Ib9e72df6a07b1bc2b72a7db66f945652814baf51
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178984
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-01-13 17:04:08 +00:00
Daco Harkes 4e2343c290 [vm/ffi] Introduce Allocator API
Introduces the Allocator API in `dart:ffi`.

This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Fluter in g3. Instead, this coppies
`_MallocAllocator` from `package:ffi` into the ffi tests for testing.

This CL does not yet migrate off `allocate` and `free` in the SDK. That
is done in a dependent CL.

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

TEST=tests/ffi/allocator_test.dart
TEST=tests/ffi/calloc_test.dart
TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I173e213a750b8b3f594bb8d4fc72575f2b6b91f7
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177705
Reviewed-by: Clement Skau <cskau@google.com>
2021-01-13 17:04:08 +00:00
Sam Rawlins ef72b9fe6d Analyzer: Look for bazel BUILD file before .packages files
Also move local function packageRootedHere outside of a while loop.

Change-Id: Ie900a36507934038a7bace23e6241a9c91080943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178640
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-13 00:34:33 +00:00
Konstantin Shcheglov 4bef6607e7 Fill and use DartType.aliasElement/aliasArguments
Change-Id: I71a3b7efbbe8578c47a832cb85aab6177156531f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-12 22:50:44 +00:00
Danny Tuppeny 6c33457014 [analyzer] Add support for multiline TODO comments
Fixes https://github.com/Dart-Code/Dart-Code/issues/3030.

Change-Id: I97b885ee49573514560bc0452fd84793e04ee5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-12 19:08:02 +00:00
Brian Wilkerson 11e7cdcfd1 Unify two error codes for documentation purposes
Change-Id: I730a0ee287e7d54bace9fdf84a02be5c3f4da017
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-11 23:12:20 +00:00
Brian Wilkerson a4298ba418 Unify two error codes for documentation purposes
Change-Id: I31cb070e7dfcccfed042d1bf308f672e880b1d22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178440
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-11 22:52:20 +00:00
Danny Tuppeny c818059287 [Analyzer] Report EXTRA_POSITIONAL_ARGUMENTS and EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED against first unmatched argument
Fixes #44598.

Change-Id: I6bccf4f5448de024f27d0ed1ba51c730e22b6fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178020
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-11 18:46:26 +00:00
Johnni Winther 63373b9e9c [cfe,analyzer] Pass message arguments directly to AnalysisError
This allows for supporting customized message for scanner/parser
errors.

Change-Id: Ib9470c3d8231de69611bc672570ae8902e9c0e6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-01-11 16:45:26 +00:00
Jens Johansen f7052cfbbc [parser] Better handling of eof when parsing 'Stream<List<>>'
This CL avoids the infinite loop created by allowing the parser
to parse it as a complex type (despite no actual name after it) and
adds a few asserts in an attempt to catch rewriting on eof (setting a
token after eof).

Fixes #42229
Fixes #44477

Change-Id: Ie2da0957894067a3d4748cb6384bc9d6cf32c215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150521
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-11 09:55:06 +00:00
Brian Wilkerson 2efc8bf9e3 Unify two error codes for documentation purposes
Change-Id: I30c7bafdb0cde73a984c0d75a82cb324cded18b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178500
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-10 22:52:25 +00:00
Sam Rawlins 897235204e Split use_of_nullable_value into separate codes with more friendly
messages.

* UNCHECKED_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE
* UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION
* UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR
* UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD
* UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH

Additionally, improve the ADD_NULL_CHECK quick fix by supporting
expressions which need to be null-checked in a for-each, a yield-each,
and a spread.

Bug: https://github.com/dart-lang/sdk/issues/44603
Change-Id: Ie493a2dc1c05b64a16fd17c77d3468e8d562c497
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178080
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-08 21:07:02 +00:00
Paul Berry 88cd4739b8 Flow analysis: switch on inference based on local boolean variables.
The implementation was completed in previous CLs, but hidden behind a
flag.  This CL switches on the feature and adds integration tests.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I0e2d7ac96d3a6d68d33d49f1eab5c341c9167f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175500
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-08 18:57:02 +00:00
Devon Carew cabe1e995e [pkg/analyzer] widen the dep on package:crypto
Bug: https://github.com/dart-lang/sdk/issues/44577
Change-Id: Idcabaf66ad93b8d749e081fed57a1f4b5d9dc9c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-01-07 01:33:41 +00:00
Daco Harkes 28a228b64b [analyzer/ffi] Add tests for #44584
Add tests for analyzer and CFE covering `Pointer<void>` and
`Pointer<NativeFunction>` when used in `lookupFunction`.
Both were missing in test suites.

Added TODOs for the things that need to be addressed.

Issue: https://github.com/dart-lang/sdk/issues/44584
Issue: https://github.com/dart-lang/sdk/issues/44593
Issue: https://github.com/dart-lang/sdk/issues/44594

Change-Id: I24ce7caa1a20af51e14e75a7fa83578e00a2b440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177700
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-01-06 19:26:30 +00:00
Brian Wilkerson 9453c76e22 Remove a hint code that is not being generated
Change-Id: Ifdc94c2d8dbcdeaf24ee938532c9f3a93c497e3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-06 18:20:56 +00:00
Konstantin Shcheglov 17b43ca846 Issue 44353. Fix adding duplicate relavance tags for available declarations in parts.
Bug: https://github.com/dart-lang/sdk/issues/44353
Bug: https://github.com/flutter/flutter-intellij/issues/5108
Change-Id: I6a5f04a7f44d12466799c10bac720189bd4b0612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-05 22:43:38 +00:00
Darren Chan 1dc9c56f34 [analyzer] Fix GnWorkspaceTest for Windows.
Use convertPath to account for Windows vs non-Windows path seperators.

Change-Id: I9115c04acc986161d120fb363627fe2e302831f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 17:42:09 +00:00
Daco Harkes 0d7cdcbcce [vm/ffi] Document marking struct fields as external
Add the suggestion to mark the struct fields as external to both the
CFE and analyzer error message on field initializers for Structs.

Closes: https://github.com/dart-lang/sdk/issues/44024

Change-Id: Ie7b20abe34d96d31df9616c112fbc975351ce0de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177602
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-05 16:24:09 +00:00
Darren Chan bb19112f22 [analyzer] Use package_config in GN workspaces.
Per http://fxr/445334, .packages files are no longer used within the
fuchsia tree. This inadvertently caused http://fxb/65752, where vscode
integration is broken.

This cl fixes this by updating _findPackagesFile to look for
`*package_config.json` files instead of `.packages` files.

Fixed: http://fxb/65752
Change-Id: I676fcecff49fd980255391555daca3ce5d5d9de9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 14:43:38 +00:00
Devon Carew 11b3e34e32 [pkg:analyzer] add an example of using the analysis context collection API
Change-Id: Ic00410c941861a791b549c799c113b5364ba6486
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174981
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-04 21:35:58 +00:00
Brian Wilkerson 6143fb5668 Improve some diagnostic messages
Change-Id: Ic351c2addff76dea8fe49c7e2ce68b46043f0814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-04 16:43:08 +00:00
Konstantin Shcheglov ea775a6a0f Migrate SearchEngineImplTest to AnalysisContextCollection.
Change-Id: Ide259d4baf2a309a08ae74019ecb95d54d97f365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-02 19:21:16 +00:00
Konstantin Shcheglov bb8669aadf Remove 'unresolvedFile' from FileState.
Having a FileState with `null` part and URI poisons null safety migration.

Change-Id: Idd3b484591d1ca6f48eabb7f5614abfdcf6ff9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-23 23:17:36 +00:00
pq eaa0f5d19a quickfix to remove deprecated lints from options files
Change-Id: I0440450257416570feb68e71e78f1f7f4e042287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176700
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-21 19:25:59 +00:00