Commit graph

680 commits

Author SHA1 Message Date
Konstantin Shcheglov fd0d3b2546 Use named parameters for ResultImpl constructors.
Change-Id: I93bc4738259257b2a0326dc259c43693da5754c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-31 23:00:53 +00:00
Michael Thomsen 484294dba4 Tweak dartanalyzer readme now that the package is only intended for internal use
Change-Id: I0a6fc0a146205415a6dd6283f7d21e2c5224585f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 16:03:48 +00:00
Konstantin Shcheglov eddd4f4427 Renames for FileState kinds / directives.
Change-Id: Ia024eb8922b06a0bdb37321f76a7527dc7e3c117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-18 17:20:33 +00:00
Konstantin Shcheglov 7b7a466578 Deprecate LibraryElement.parts
Change-Id: Iade5a3c2e60901de6b10b690d95a605d96eab2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250788
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-08 01:23:05 +00:00
Janice Collins e02bc1fd4d Remove more unused/previously deprecated options in old analyzer cli.
Change-Id: I4b09fa5676a8cdb0eb3d9774f0528f035a278fb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250789
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2022-07-07 22:18:48 +00:00
Janice Collins e499586ad6 Remove the lints fatal flag for old dartanalyzer.
Change-Id: I5a1744261e8a6c14393830cb2ede4e54462a6b58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250775
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2022-07-06 21:03:01 +00:00
Janice Collins 1c45191c89 Revise dartanalyzer docs to indicate that it is not for general
consumption.

Change-Id: Iec112f13ddeaa2fa43650bfc614ea786b2fff2bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250768
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2022-07-06 19:27:50 +00:00
Konstantin Shcheglov 7abfcfb83c Move 'libraryFiles' to LibraryFileStateKind.
Change-Id: Id0dd01322a2c43a678c9b0cfc9d8249f15a8cc2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250115
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-29 15:49:35 +00:00
Sam Rawlins 567b45fb1d Add the enable-experiment flag back to DAS
Bug: https://github.com/dart-lang/sdk/issues/48960
Change-Id: I6576f45e63e28902986db844df49a06a71385704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245202
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-06-16 16:26:39 +00:00
Konstantin Shcheglov 74d1c7ffdb Use LibraryFileStateKind where a library is expected.
Change-Id: I871caa74d9b3630c07b78bee85946c4bed5aa8ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-01 20:43:54 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Konstantin Shcheglov 34bca35835 Update packages files in analyzer_cli to package_config.json format.
We need this for https://dart-review.googlesource.com/c/sdk/+/238181

Bug: https://github.com/dart-lang/sdk/issues/48272
Change-Id: I8dffd0d5bb9bc635dd60a690466b89ace25b9a71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244283
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-10 20:48:53 +00:00
Konstantin Shcheglov 3d69c3c0c4 Restore sync file methods in AnalysisSession.
There are clients, like `built_value` that cannot be updated.

Change-Id: I27371018039f22cd7ca2cb82b30ec33469aa6e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 23:27:57 +00:00
Konstantin Shcheglov 27f5f486f6 Make link() async, propagate async.
Change-Id: Ie74c8acdf2641e834d41e56200f33075e6987236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237928
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 22:11:57 +00:00
pq 47a52fc5de lint 2.0 fixes
In anticipation of lints v 2.0.

See: https://dart-review.googlesource.com/c/sdk/+/237746

Change-Id: I42bcdfa43d4707324622b498c57dde6e2fe1f13b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-17 23:11:28 +00:00
Konstantin Shcheglov d72934449f Deprecate 'Resource.parent2', use 'parent' instead.
Change-Id: Icf3cefa8061543a3965e1eedab4b57bb6c67c920
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 22:11:23 +00:00
Konstantin Shcheglov 81860accbc Add AnalysisDriver.getFile(), deprecate getFileSync()
Change-Id: I2881c03813740c421f1b4a4be96549e4a91be519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 21:26:13 +00:00
Konstantin Shcheglov bc21d4f901 Enable more lints in analyzer_cli/
Change-Id: I8e6bf80d0c9b888dad5dcd10a1e0463e8a7f641d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 19:53:53 +00:00
Danny Tuppeny 1e9fb81697 [analysis_server] Make CompilationUnit.lineInfo non-nullable
Change-Id: Ib628751a14dc3257cf7325432ab20f2bdb9d6f3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234290
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-03 06:59:00 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Devon Carew 150df0637f [analyzer] remove the dep on package:cli_util
Change-Id: Ie5b0c29ae443588c501dd2012e645618aff17ca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-06 05:26:40 +00:00
Konstantin Shcheglov 95644dcde5 Stop using the remaining methods of StringUtilities.
Change-Id: I099c4f79f2cd5dede474412e72d6d53ef555deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:50:01 +00:00
Sam Rawlins 0d2ec720b7 analyzer_cli: switch to use strict-casts
Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I622210b0029325e52be2d8ef7dada1ceca961b6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-08 04:22:39 +00:00
Konstantin Shcheglov 3ab1eaa03f Migrate analyzer_cli to null safety.
Change-Id: I03184d7b3257802a90eacfb1ea912977f2082c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-11-20 03:23:38 +00:00
Konstantin Shcheglov ab55396c25 Remove FileBasedSource, deprecate source_io.
Change-Id: I42c79a1c46711a9427d8716df91cd6980f0c57c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-19 19:07:37 +00:00
Konstantin Shcheglov fb05622b3b Deprecate Source.uriKind
We almost can remove it.
Unfortunately surveyor/lib/src/analysis.dart uses it, so we need to
update it first.

Change-Id: I239d24506f99183147bf45744a6f8d66d3eb4f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-11-19 18:29:07 +00:00
Konstantin Shcheglov 7e6b3d83b8 Mark all Source.encoding implementations deprecated.
Change-Id: If12b9af54def3754a701477241d8364c283921ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-19 16:03:27 +00:00
Konstantin Shcheglov bb732826fb Stop implementing AnalysisTarget by Source, remove source and librarySource getters.
Change-Id: I3a1d81ea33641156dccc67b1ed486e449741a5e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-19 16:02:47 +00:00
Brian Wilkerson 0d6df5a1f1 Use contractions in the docs in a couple more places
Change-Id: Ic685ba6d74f3f495d740b3396663aa9ad25df768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220221
Reviewed-by: Kathy Walrath <kathyw@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-17 18:22:48 +00:00
Kevin Moore 632f3428f3 Update dependencies in unpublished packages
TEST=No SDK affect. Just helping our outdated package tracking

Change-Id: I0d392694e9eb926f60667508b55094ffa208db18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218381
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-28 15:46:08 +00:00
Konstantin Shcheglov e916841bcc Deprecations and renames for getXyz() in AnalysisDriver.
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/405055453/OCL:405055453:BASE:405057194:1634949541100:f811db8d/targets

Change-Id: I8f7f036003650611760523dd315ba89724a29b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217805
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:15:33 +00:00
Paul Berry ce8ee6cf03 Check the number of arguments when instantiating AnalysisErrors.
Change-Id: I45fa2a560b7368370fae4a7a94d8f52136e92486
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213821
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-23 14:13:33 +00:00
Paul Berry 757d179380 Update nomenclature in ErrorCode and related classes.
This change standardizes most of the analyzer to refer to problem
messages and correction messages using the names `problemMessage` and
`correctionMessage` (consistent with the naming convention used in the
analyzer and CFE `messages.yaml` files).

Change-Id: I72f078a368c65b346626f560cc721fcff4836452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215151
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-10-04 19:50:37 +00:00
Konstantin Shcheglov ddc7523958 Issue 45267. Support for --packages in analysis server.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: Iac7dd7502b6936bab91279ac5db7cdafaa90c580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212271
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 17:33:15 +00:00
Konstantin Shcheglov f258c7fe62 Issue 45556. Analyze a requested file, even if it is excluded.
Bug: https://github.com/dart-lang/sdk/issues/45556
Change-Id: I5077759b2929540a3631712a09fce951c3732b51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207400
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-20 18:27:13 +00:00
Konstantin Shcheglov dabdade731 Inline ContextBuilderOptions into analyzer_cli CommandLineOptions.
Change-Id: I2a386c1f9412ebcfaeb509715da616ff078591fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206673
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-14 22:47:21 +00:00
Konstantin Shcheglov df3339b1de Remove unused code from ContextBuilder.
Change-Id: I66ecb375c938e868a00422c3ddb4887ee8c11770
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-13 22:40:50 +00:00
Konstantin Shcheglov 7e64685c10 Issue 46477. Fix ClassElement.lookUpInheritedMethod() to filter out static methods.
Similar changes should be done for other similar methods.
In separate CLs.

Bug: https://github.com/dart-lang/sdk/issues/46477
Change-Id: I1a7faa1acccdbe6fe0419a0c8bf9a61ee788fd86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-06-28 23:51:23 +00:00
Devon Carew 6b4f2a7aae [dartanalyzer] have the dartanalyzer command emit json output to stdout
Change-Id: I2044771cc28a3b04a2b8bd3bd79b5261b4d20467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-17 23:39:51 +00:00
Danny Tuppeny 6d763b4565 [analyzer] Include analyzed context in include_file_not_found errors
May fix https://github.com/Dart-Code/Dart-Code/issues/3259.

Change-Id: I4a81acd9186efacc90584c756fc9aef224378c65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-09 17:59:07 +00:00
pq 63a77416b7 enable depend_on_referenced_packages
this is under consideration for core lint inclusion: https://github.com/dart-lang/lints/issues/42

(also undoubtably nice to get the early warning.)

Change-Id: I3ea204444f48d3b4bde3ff65b4ce85a2cf2a7b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202301
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 14:19:08 +00:00
Konstantin Shcheglov d2682070f4 Use explicit FileContentCache instance for AnalysisContextCollectionImpl.
Previously we cached file contents implicitly, using Expando on top
of ResourceProvider. This is somewhat dangerous, and does not allow
us to decide when to cache, and when to invalidate.

Change-Id: I5c93ac22f217bb2baba6b7f6e73fc05f1c674e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201233
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 00:54:01 +00:00
Konstantin Shcheglov f45ff0fb71 Issue 46031. Support for multiple directories as analyzer cli inputs.
Bug: https://github.com/dart-lang/sdk/issues/46031
Change-Id: I1f09a7460a46bb78dbae2ea750b303d17eaee9c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-19 15:53:27 +00:00
Devon Carew 16d173f7d2 [analyzer_cli] switch pkg/analyzer_cli to using package:lints
Change-Id: Ibc9c6edb6f745a6b177ceca133af5c868734b3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200481
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-05-18 21:45:23 +00:00
Konstantin Shcheglov 37a91c04b1 Fix PathFilter created when the analysis options file with excludes is not in the context root.
Change-Id: I242473d5fddbe5e3abaa994766959e207453ffb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197114
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-04-28 16:48:13 +00:00
Paul Berry b10a592341 Add a url field to DiagnosticMessage.
This paves the way for allowing analyzer and analysis server clients
to format diagnostic message URLs in a special way (e.g. to make them
clickable).

Note that DiagnosticMessage is part of the public API of the analyzer,
so I've retained the old behavior in a deprecated fashion to avoid
breaking clients that don't yet handle diagnostic messages containing
URLs.

See
https://dart-review.googlesource.com/c/sdk/+/193749/comment/86d1ce4b_77a60b1e/
for additional discussion.

Change-Id: Iae9d43a2be7dbc67cb7cb82afe0a7824043d6113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-23 20:34:32 +00:00
Konstantin Shcheglov 9dd51c80bd Deprecated getFile() and getSourceKind(). Added getFile2() instead.
R=brianwilkerson@google.com

Change-Id: Ia52967472077abd73cdf4df1320dd71b5dee98b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-19 23:57:19 +00:00
Konstantin Shcheglov 5168b3eb96 Add getErrors2(), deprecate getErrors().
R=brianwilkerson@google.com

Change-Id: I84e22fa8be63d517fde4c31ff79724362798cda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195764
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-19 02:56:30 +00:00
Konstantin Shcheglov 4dc165f7fd Add getUnitElement2(), deprecate getUnitElement().
Change-Id: Ib1ed93f215356442ca9db5b8ed5fab99667e996e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-15 17:16:27 +00:00
Sam Rawlins a75fdd4d98 Remove unnecessary imports from analyzer_plugin, analysis_server, analyzer_cli, test_runner
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I52753bf0ac8112e0a2e6864ca2bd3289e63d5cf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-04-08 19:02:31 +00:00
Franklin Yow 03101c0c2b Update LICENSE
Changes to comply to internal review

Closes https://github.com/dart-lang/sdk/pull/45568
https://github.com/dart-lang/sdk/pull/45568

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +00:00
Brian Wilkerson e4bb500c7b Add a json format to dartanalyzer
Change-Id: I3a23607f29de6c6feeed468b2bcf065dbb9044d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193526
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-30 22:10:12 +00:00
Sam Rawlins 5d1faf6cc6 Refactor yaml utilities in analyzer and analysis_server
* Two extension methods were moved from analysis_server to analyzer, to replace
  identical top-level helper functions in analyzer.
* Add nodes2 which returns a YamlMap with YamlNode keys.
* Privatize two static functions in Merger.

Change-Id: If54e73d6e8133bf1b2a3af809d6bb732c77ab9be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191381
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-17 16:57:05 +00:00
Konstantin Shcheglov 00a45e425a Remove build mode from analyzer_cli.
Change-Id: I2236c728741837588394f896b37f181fc907d335
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-12 17:05:37 +00:00
Konstantin Shcheglov 6550317955 Move updateAnalysisOptions() to CommandLineOptions.
Change-Id: I96e63478f2e3ea65d58a56a1b12dc2726a3d55ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189860
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-10 00:34:32 +00:00
Konstantin Shcheglov ce4817643c Remove ContextCache, in build mode get analysis options from the file.
Change-Id: I6bd5e7878bc243a973149daddb9ed8dc6bfa7440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-09 17:01:20 +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 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 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 60732555f7 Remove 'await null' from analyzer_cli.
R=brianwilkerson@google.com

Change-Id: Ib87ad09e313ec82d3d63744b52c071cb38e72059
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-02 18:45:22 +00:00
Konstantin Shcheglov a629b48fdc Remove file name constants from AnalysisEngine.
Change-Id: I3457973212e704a0fedee20db17956c017ec91ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 05:52:56 +00:00
Konstantin Shcheglov a68d60090e Add util/file_paths.dart and use in ContextManagerImpl
Change-Id: Ibbf8ec0b0809fa17e073df6b61065f7e6278c7d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186022
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-20 20:33:36 +00:00
Konstantin Shcheglov 9a30392588 Require Workspace for ContextBuilder.getAnalysisOption() and createSourceFactory()
Ideally we want to create Workspace only once, and pass it around.
I was not able to do this yet, because DAS ContextManager kind of
dynamically updates contexts and drivers. I expect to avoid this issue
by switching DAS soon to AnalysisContextCollection.

I will follow with a bigger CL that keeps Workspace in ContextRoot.

Change-Id: I3050ba65400e0e5aa73e6d5f8beae821db10a6ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185498
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-19 00:54:30 +00:00
Konstantin Shcheglov 4765ef5037 Remove 'actualUri' from UriResolver.resolveAbsolute()
Change-Id: I87edfa780e891a5e1ecdd1a9a548509e4cfa641a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-09 22:17:08 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Sam Rawlins 3e7afdee8f analyzer_cli: Remove unnecessary imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I621f187a7ec654235b21a77f28258bba7ef8c179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 23:42:50 +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
Konstantin Shcheglov ce9e064680 Drop 'summary2' import prefix build_mode.
Change-Id: Ibb0218becc58d8d24298bd77e316727a8bf57bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175327
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:34:59 +00:00
Sam Rawlins e0ebe30190 analyzer: Improve unused_import analysis for shared prefix names
Fixes https://github.com/dart-lang/sdk/issues/38784

Change-Id: I42b32261e9ed71018967e228d2ec731a4613205d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147336
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-03 04:00:37 +00:00
Devon Carew 8cba879f46 Add additional validations to the pkg/ package pubspecs.
TEST=these are additional validations that we run on the bots

Redux of https://dart-review.googlesource.com/c/sdk/+/161040

Change-Id: Ia32ced5d48fbfeafacfa9e51dc4774d2e9425091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-02 17:27:18 +00:00
Konstantin Shcheglov 19652ae5ad Use binary format for summaries.
Change-Id: Ibf0221a3c233c958e5065b64207faf9dfae33083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-01 21:30:35 +00:00
Nate Bosch aaf13b5247 Update to the latest package:yaml
Expand the range allowed by the dep from `package:analyzer`.

Switch dependencies to `any` for the packages which are `publish_to:
none`. The actual constraints aren't useful in these packages since they
are always pinned exactly by DEPS and so we can't trust they are kept up
to date.

Change-Id: Ibd937e8646574d49105f4dd0de2529e7ab30862a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172380
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-16 22:16:50 +00:00
Konstantin Shcheglov 2eef1aa1ad Prepare analyzer_cli/ tests for turning Null Safety on by default.
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: I0699915c45369fac5590a6ada4a8ded186612947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 17:34:30 +00:00
Kevin Moore 063c3ede72 Update pkg dependencies on pkg:analyzer
Now `pub get` actually succeeds on `pkg:front_end`

Change-Id: Ifdab9d6741efba034ecd56f27fd83e288267e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168662
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-10-26 19:30:06 +00:00
Konstantin Shcheglov a669f440a6 Revert applying resolution after loading AST for summaries.
Reason: causes Flutter analysis performance regression.
https://github.com/flutter/flutter/issues/68716

We will get back to applying resolution after loading AST when
we switch to the binary format, and so recover enough performance.

WIP for it: https://dart-review.googlesource.com/c/sdk/+/168260
Unfortunately this means that it will get even bigger.


Revert "Separate AST from resolution (per declaration)."

This reverts commit 4d6fba37de.


Revert "Remove commented out code from LinkedUnitContext."

This reverts commit c4f2c8ec3e.


Revert "Issue 43890. Implement applying resolution to IndexExpression."

This reverts commit 088524efa6.


Revert "Issue 43888. Fix for applying resolution to PropertyAccess in cascade."

This reverts commit 1f660a7acf.

Change-Id: I808c1fc62161458d7544d7741e4b358c99b0b55f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-22 22:40:40 +00:00
pq da6c506f2c add pubspec linting to dartanalyzer cli
Fixes: https://github.com/dart-lang/sdk/issues/43529

Change-Id: Iab96c2ca7945491e29aeabd70cb260bdb77f491f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168380
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-19 18:51:57 +00:00
Konstantin Shcheglov 4d6fba37de Separate AST from resolution (per declaration).
Change-Id: Ic05781f98636e992c5c51d94cde51aa8c64663a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167242
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-16 16:33:42 +00:00
Konstantin Shcheglov f8e5f88f19 Switch build mode to directly parsed files.
Specifically, to prevent potentially sharing part files between
libraries.

R=brianwilkerson@google.com

Change-Id: Ifceef347e339df12415f506a569349ce4a0c2e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167503
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-14 16:12:08 +00:00
Konstantin Shcheglov 5b52dfccf5 Fix --default-language-version support.
Re: https://dart-review.googlesource.com/c/sdk/+/166790
Change-Id: Ic646f4cf8c59810e856722a9099cadd364bad96a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166923
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-10 23:55:20 +00:00
Konstantin Shcheglov d219bde703 Enforce await_only_futures and fix violations (in more packages).
Change-Id: I1812f7721915178e42956f988b9276bf8db0bfaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-24 16:58:50 +00:00
Devon Carew feb482abb5 [analyzer] remove unused command line options
Change-Id: I2bb415fefe7e1ebe95cea533f4979ca5f8cff4fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164180
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 19:21:59 +00:00
Sam Rawlins 86169a1031 analyzer_cli: Remove @visibleForTesting from two sinks used outside tests
These two sinks are used in more than a dozen places in
analyzer_cli/lib/src/options.dart, so I think the annotations should
just be removed. The analyzer has a bug which prevented these top-level
getters from being reported.

https://github.com/dart-lang/sdk/issues/43508

Change-Id: Id4c1964a7181ea0aaf695ec8b49534243c269c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163682
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-21 19:36:52 +00:00
Sam Rawlins 5722d15268 analyzer_cli: comply with 7 upcoming pedantic lint rules
Change-Id: I2933de0452c11196477479d516f8c5b2711a1881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163220
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-09-17 21:16:18 +00:00
Konstantin Shcheglov c71ce5234d Remove DartSdk.analysisOptions getter/setter.
Change-Id: I6bdcd1d8c2e998bf4adbf26ddf533f5d649c73c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162620
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-12 21:33:26 +00:00
Mike Fairhurst f846d0e7ea [analyzer_cli] Remove unused dart:async imports
Change-Id: I58d1ca58e6d630aee928c6a7cb7fc97822a3be22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161449
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:38:37 +00:00
Devon Carew 7a18dcbfa1 [dartanalyzer] remove the --strong flag
Change-Id: I933c26316e653957337f881273d5ad2d0b045640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161201
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-09-01 05:38:09 +00:00
Konstantin Shcheglov 2b7fc8f134 Update FeatureSet to the new rules.
Bug: https://github.com/dart-lang/sdk/issues/43032
Change-Id: I6c7d7dc56fd0d4edcc3c6f6cc6fb0422316b8f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159187
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-19 18:27:37 +00:00
Devon Carew 932712b602 update pubspec to reflect actual packages used
Change-Id: I02b10f92d858d0303f1a71e649395fb013f437aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-18 17:11:30 +00:00
Konstantin Shcheglov a51f1747e0 Prepare to publish analyzer 0.40.0 and _fe_analyzer_shared 8.0.0.
Change-Id: I126207dcc47885565a3a6d7002ff15ad3cc493c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-18 15:12:10 +00:00
Devon Carew 528238465f Remove the PerformanceTag class and related code.
Change-Id: I55b39e8fa6de7a3a946333bc84cc4ba0a09ecba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-16 23:59:42 +00:00
Konstantin Shcheglov ebd5b622ba Add DartSdk.languageVersion
Bug: https://github.com/dart-lang/build/issues/2763#issuecomment-666707445
Change-Id: I8232bd395abc9efea0e5c27716450d6a5442b3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156489
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-04 21:01:09 +00:00
Konstantin Shcheglov fb0578159e Convert paths to absolute and normalized in analyzer_cli arguments.
See https://github.com/dart-lang/linter/pull/2189#issuecomment-665984938

Change-Id: I6becb616dd8bcb0c9945ea5ad5ac6119bb93e330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 15:00:58 +00:00
Konstantin Shcheglov 8de8a1c226 Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
They are all errors now.

Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:15 +00:00
Sam Rawlins fffa3ac5d4 analyzer_cli: Enforce strict-inference
Change-Id: Idd8a8cdd1e72be5f4d0f1edabdc8254b801d17ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-21 03:39:24 +00:00
Konstantin Shcheglov 0a5e69ae6f Fix for no inputs in build mode.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/160854685
Change-Id: I9dd7f6e6c8293432c39d2d0cdd28bcd06880bf8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 22:14:48 +00:00
Konstantin Shcheglov c76fc431c7 Add WorkspacePackage to each FileState.
We need this so that we can look if the file is NullSafe by asking
the package that contains it.

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: I11c71faf7bddd53b458a66f0786454ecd7453b5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153521
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-08 23:54:47 +00:00
Konstantin Shcheglov 11632ff4d4 Add buildSdkSummary() to analyzer API.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/build/issues/2745#issuecomment-654441549
Change-Id: I144dd99be5e5a210e27f3b5b5b54951659479511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-06 23:03:09 +00:00
Konstantin Shcheglov 326f7b4a8f Remove DartSdk.useSummary.
Initial:  https://dart-review.googlesource.com/c/sdk/+/149495
Reverted: https://dart-review.googlesource.com/c/sdk/+/149687
Change-Id: Ibd3f1af1aef83adc35f77cfbda66e07c5ae99922
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-03 15:56:41 +00:00