Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov 97655f06b5 Use null aware invocation in removeUnusedFiles().
Change-Id: I67175e8cdf6ddd678a57a13d32ec55c06b205dfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190302
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 23:40:02 +00:00
Konstantin Shcheglov 8d25fccb52 Fix for NPE when checking for OVERRIDE_ON_NON_OVERRIDING_METHOD.
Saw it in crash logs.

Change-Id: I8e4cbfeafa8e3310f89373707e30c8eac6bed544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 23:03:54 +00:00
Keerti Parthasarathy b4adea8f46 Add flutter assist test for Cider
Change-Id: Icc04283fd2d37638fcb7382c55f8d409a627a97f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189880
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 21:32:12 +00:00
Daco Harkes ffa5d16ae7 [vm/ffi] Support multi-dimensional inline arrays
This CL only changes dart:ffi API, CFE, and analyzer. No VM changes
were needed because the dimensions of inline arrays can be flattened
before passing them to the VM. The multi-dimensionality does not
impact the ABI.

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

TEST=pkg/analyzer/test/src/diagnostics/size_annotation_dimensions_test.dart
TEST=pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart
TEST=tests/ffi/function_structs_by_value_generated_test.dart
TEST=tests/ffi/inline_array_multi_dimensional_test.dart

Change-Id: Ica2c01fccbea7e513879365b34086d8968b54c5b
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188286
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-03-09 10:50:17 +00:00
Konstantin Shcheglov f0872cb7d2 Issue 45233. Throw StateError with more data when about to StackOverflow in available declarations.
Bug: https://github.com/dart-lang/sdk/issues/45233
Change-Id: Ie6efdb8336536dee9a484dbd7ffb14d4af358cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 05:57:46 +00:00
Konstantin Shcheglov ff14547a20 Make AnalysisSession.getResolvedUnit() and getUnitElement() non-nullable.
Change-Id: I779fe40d1c565f9d4d71ba6a809497d26cae8def
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 00:42:23 +00:00
Konstantin Shcheglov a0ae791a22 Implement AnalysisSession.getLibraryByUri() for Cider.
Change-Id: I3b7e17d4dc8c6e011bf1286d73d6f1d3c8e3ccaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189861
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 22:40:03 +00:00
Konstantin Shcheglov f7dc2d29de Issue 45195. Report MIXIN_INHERITS_FROM_NOT_OBJECT for class aliases.
Bug: https://github.com/dart-lang/sdk/issues/45195
Change-Id: I4b1e60a672b49c3c9fda92b3eac59c256eea13da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 20:48:43 +00:00
Konstantin Shcheglov ec7d39293d Revert "Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations."
This reverts commit 14b07bc81c.

Reason for revert: b/182098851 - does not break anyone, but has the same issue with runtime type vs. static type.

Original change's description:
> Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations.
>
> Change-Id: I12a663d6e2ed3288bf3535e019224041ae1a5093
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189600
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I112ecd13e77a9b420c5bc27905e29d728acfab89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 19:41:34 +00:00
Konstantin Shcheglov 19e0673582 Revert "Return List<XyzElementImpl> from ElementImpl getters."
This reverts commit 645035bbb9.

Reason for revert: b/182098851

Original change's description:
> Return List<XyzElementImpl> from ElementImpl getters.
>
> Change-Id: Ice8a0feb6a0bd2599fcfd5ccc35c0b4242ed9530
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189620
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I33eff159d62813c35e7e00eee5b7d9dd4fb4e563
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 19:09:44 +00:00
Brian Wilkerson 7d971fad1c Stop suggesting non-factory constructors for abstract classes
Change-Id: I3ed6936d36b0f35cea7950ac089c89efacdf0ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-08 18:53:51 +00:00
Sam Rawlins 7ee3f73a9a Analyzer: Allow generic function types as type arguments and bounds
Bug: https://github.com/dart-lang/sdk/issues/44929
Change-Id: I9c83a9abd47ec6b3d59c118493c838632fc3182a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185305
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 18:32:31 +00:00
Konstantin Shcheglov 5794e716ab Make AnalysisSession.getErrors() non-nullable.
Change-Id: Ib5971e4c7327d96bf7a08b576b487833615d4ae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189622
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-08 08:38:51 +00:00
Konstantin Shcheglov 1601f6fcd2 Remove ResolutionCopier.
It is not used.

Change-Id: Ic18e29c0f47e313a55d7b4cc3d8e4bf32182f883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189621
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-08 08:32:41 +00:00
Konstantin Shcheglov 645035bbb9 Return List<XyzElementImpl> from ElementImpl getters.
Change-Id: Ice8a0feb6a0bd2599fcfd5ccc35c0b4242ed9530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 07:00:40 +00:00
Konstantin Shcheglov 14b07bc81c Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations.
Change-Id: I12a663d6e2ed3288bf3535e019224041ae1a5093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 06:58:10 +00:00
Konstantin Shcheglov 75308fc26b Return Impl nodes from AstFactoryImpl and AstTestFactory.
Change-Id: I5d3f6eb8d07145079560c6f8820aa15e2f8183a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-07 23:24:10 +00:00
Konstantin Shcheglov 0506b1b2d3 Deprecate setters in API of AST.
Change-Id: Ib2ec164ef87b3a5a4bf028d592552e37451abd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-07 21:48:50 +00:00
Konstantin Shcheglov 637d4f8407 Fix null checks in _BundleWriterReferences.
Change-Id: I9c99f62846cbc574e1a4694c5b4bb18c578ab6e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 20:54:59 +00:00
Konstantin Shcheglov e26bd4471e Return Impl nodes from Impl nodes.
The goal is to remove operations that modify AST from API.

To do this we need resolution and utilities to use visitors that
provide Impl nodes, and sub-nodes that we access are also Impl nodes.

Change-Id: I4bd9aee8a4c6668e4242df9aa41cd572a1c49bef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 20:47:44 +00:00
Konstantin Shcheglov b3de362dc5 Fix null checks for _UnitMemberIndexItem names.
Change-Id: I4ef5ff13b26d70d96d26496b34b2e8ef1a27a1aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 20:46:54 +00:00
Konstantin Shcheglov 2c63f59c9d Fix null check in Cache.
Change-Id: I0e5924889c82fe47ea8e7e318b9a7694dc6afa61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 20:39:39 +00:00
Konstantin Shcheglov 08cb8bebe1 Fix null checks in bazel workspace.
Change-Id: I5af11caba2cecac95c4d4070bcd6cc831df4666a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 20:38:49 +00:00
Konstantin Shcheglov 53c8eda967 Keep more specific types for AnalysisContextCollectionImpl to avoid downcasts.
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.

Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-06 06:23:25 +00:00
Konstantin Shcheglov f81be2cd8b Use AnalysisDriver.addedFiles for search, remove DriverAnalyzedFiles.
The client that uses Search - DAS, adds analyzed files.
Visiting the file system again to gather analyzed files is wasteful.
DAS now uses AnalysisContextCollection, so the same set of files.

Change-Id: I2b6ba4181e7ed8cda02db152086d13758ea6f4dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-06 05:15:24 +00:00
Konstantin Shcheglov 3f5694c827 Issue 45141. Check for loadLibrary() using namespace.
Bug: https://github.com/dart-lang/sdk/issues/45141
Change-Id: Ifb0825d66a560d0136873942f9666d3dc630b6c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-05 22:21:54 +00:00
Konstantin Shcheglov 10a0c238ce Discover default analysis options files in ContextLocatorImpl.
Change-Id: Idbcb43ab53878b677c3195d3003eb9da6eda5bab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-05 06:30:17 +00:00
Konstantin Shcheglov 4cb71ce5cb Update analysis options before creating AnalysisDriver.
Change-Id: If9c337fc69ac11a570da5165edb17a3c4c75f418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 19:18:19 +00:00
Konstantin Shcheglov ca736dbcdb Resolve typeArguments of Annotation.
We don't have yet full implementation, but this fixes the crash.

Bug: https://github.com/dart-lang/sdk/issues/45119
Change-Id: I0d6aba7c53bf4a9c707c4cbeff8a5c81040f2712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 06:58:35 +00:00
Konstantin Shcheglov e6dbabd477 Issue 45161. Ignore YAML parsing exceptions in analysis_options.yaml
Bug: https://github.com/dart-lang/sdk/issues/45161
Change-Id: I14169cdb0f39e95612a21266cc7e6cf72141e2d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 01:38:15 +00:00
Paul Berry 8be535350d Flow analysis: improve handling of types in "why not promoted" logic.
This CL plumbs the types of `this` and property get expression from
the CFE and analyzer into flow analysis, so that flow analysis will be
able to create more accurate "why not promoted" information for those
expression types.  This made it possible to eliminate a clumsy aspect
of the previous implementation, namely that we would consider a
promotion attempt like `if (x.y == null) return;` as an attempt to
promote the type of `x.y` to `Object`; now we compute the type the
user is actually trying to promote to, so we will be able to generate
more accurate "why not promoted" messages.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I67f9fc59e72103194a1ea6b1c4dfeae8aeb194a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-03 23:16:55 +00:00
Konstantin Shcheglov 7d67f3ee5c Rewrite analyzer_cli batch mode using AnalysisContextCollection.
Change-Id: I0765df20f24ebf37b49a8a622a072e4d67f74845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-03 19:30:24 +00:00
Konstantin Shcheglov d7dc1bfc45 Don't (re)discover analysis contexts in ContextBuilder.
Change-Id: I4079ec180f759c29ac51af989de30751673f6432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188584
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-02 22:35:17 +00:00
Konstantin Shcheglov a4529db02b Explicitly analyzed directories and files are analyzed even if excluded by globs.
Change-Id: I6640f372d8494498facb5ad68bb8bf703aeb0e58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-02 17:29:04 +00:00
Konstantin Shcheglov 4128d005b7 Remove migration hints from analyzer/.
Change-Id: I9d3f529b8a2ae7e78dfdd913e8b79cb1a39c891c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-02 17:23:02 +00:00
Parker Lougheed 81c6f332e7 Quit earlier in dead code visit if we're in the same dead code range.
Change-Id: I4460b8d524e87431816b29079ced533012e534f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-01 15:02:49 +00:00
Konstantin Shcheglov 3268bd0429 Fix for infinite loop in _isExcluded() on Windows.
Bug: https://github.com/flutter/flutter/issues/76911
Change-Id: I7115bcfec7ed736e12ca0c01739bf1738c4ceab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-27 20:54:28 +00:00
Samuel Rawlins 7aa8d96462 Revert "Report unused system libraries with shadowed elements"
This reverts commit 4c018c7013.

Reason for revert: Breaking dart2js_unit_tests:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8854208023803884128/+/steps/dart2js_unit_tests/0/stdout



Original change's description:
> Report unused system libraries with shadowed elements
>
> Fixes https://github.com/dart-lang/sdk/issues/45028
>
> PR out for flutter: https://github.com/flutter/flutter/pull/76436
>
> Change-Id: I63b22934b6ba969ec1a8ea4d282b2e8770d8c207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186042
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I63987443d2a57dbd0a3d22fa433658476074bf5d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-26 20:18:39 +00:00
Paul Berry 085529d58d Flow analysis: hardcode allowLocalBooleanVarsToPromote flag.
This flag was being kept around in case the corresponding feature
(https://github.com/dart-lang/language/issues/1274) wound up having
bugs and needed to be switched off.  It's now had sufficient bake time
that we no longer need the flag.

Removing the flag allows us to remove a bunch of flow analysis code
that's no longer needed.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: Ib91fa09a560bb0ebc6bff280ffc37d6037816ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-02-26 18:28:57 +00:00
Paul Berry 265f6fca2d Flow analysis: Fix "why not promoted" functionality for implicit this
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ief6014c34aef329e5f408916f5d8ffe14a62effd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-02-26 18:14:47 +00:00
Sam Rawlins 4c018c7013 Report unused system libraries with shadowed elements
Fixes https://github.com/dart-lang/sdk/issues/45028

PR out for flutter: https://github.com/flutter/flutter/pull/76436

Change-Id: I63b22934b6ba969ec1a8ea4d282b2e8770d8c207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186042
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-02-26 17:33:27 +00:00
Konstantin Shcheglov 8833cbed7d Fix for ContextRoot.isAnalyzed() when the root is in a dot-folder.
Change-Id: I5f343aa9bdd24a76e0521ec63ac24bf2679ff42f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-26 00:41:28 +00:00
Konstantin Shcheglov bf4a65cb62 Cache resolved files in FileResolver.
Change-Id: I3df19bb31e962ff6666e3c677d696315f8e8d8e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187720
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 23:46:24 +00:00
Konstantin Shcheglov 721ecfd63a We don't have any language features with the version before 2.6, so 2.2.2 is not important anymore.
Change-Id: I01cd35e5eccd47ae0e1638e881fa3b84d5f0a102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 23:18:54 +00:00
Konstantin Shcheglov f4bf9288cf Rename newAnalysisOptionsYamlFile() and newDotPackagesFile()
Change-Id: I1d11d5c8a7e7fc4f965cd797471dc84a5572fe9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 20:12:46 +00:00
Paul Berry 7d4da6691b Flow analysis: add "why not promoted" functionality for this
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ia42db3d9d84d7815e61444990805048c50d1c179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187063
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-02-25 19:53:28 +00:00
Konstantin Shcheglov 34bec2f1a5 Deprecate AnalysisDriver.contextRoot
Change-Id: I2dfb7f2f751e3c3ba7cdc11c94b9dfa5ddd35670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 19:35:11 +00:00
Konstantin Shcheglov 0039c061c9 Use ContextRoot.analyzedFiles() to find packages in available declarations.
Change-Id: I8828881af7e1cf55233797644ba411842654d62a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 19:27:36 +00:00
Konstantin Shcheglov daef0206d8 Remove AnalysisEngine.processRequiredPlugins()
Change-Id: I1b93729dea3e9d20c132fcdc523e6b1c3d40b0f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 19:27:06 +00:00
Konstantin Shcheglov 959adec89d Deprecate FunctionTypeAliasElement.
Change-Id: I52b49ecadc7217416341b7d7474ded5b36a8ca73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 19:08:36 +00:00