Commit Graph

223 Commits

Author SHA1 Message Date
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Brian Wilkerson d00ef8611a Update the server protocol to support passing back the line and column numbers for the end of a range
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-18 19:22:23 +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
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 f1094d5c3a Use newPubspecYamlFile() to create pubspec.yaml files
Change-Id: I181a3f3f14810019731201bf43e27befa7bc5481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-22 21:32:00 +00:00
Brian Wilkerson a00530b46f Remove unused support for requesting token details
Change-Id: I9cc160d84e06b4b7be67e53962fe38c1430e74b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180762
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-24 05:11:48 +00:00
Sam Rawlins f230313871 analysis_server: remove unused imports with shared prefixes
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: Ifd4df564247c08606841a0e22896d767da438a47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-18 17:30:21 +00:00
pq 8b47021578 prefer convertPath
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/172683/1

Change-Id: I5cb2371fcb6719e4b08ec512bad31031f1d28143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-18 01:49:49 +00:00
pq df64dbc0ed windows path fix
Change-Id: I676a1e3b71e89880d7a3d9be8c6c9211eabc87c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-18 00:43:08 +00:00
pq 29a9fe27d2 bulk fix details server protocol
Change-Id: Id96fd8508018159959448c383baa53ad69b5828f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172621
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-17 21:45:28 +00:00
Brian Wilkerson 797cd72e3e Fix the bot by forcing a test to fail
Change-Id: Iea61438c8d0f1ef90136a977a183063ae516e005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-12 22:01:11 +00:00
Brian Wilkerson 23478cb386 Implement a simple transactional model for change builders for use by bulk fixes
Change-Id: I4e7a3e13345a865a2302dfddbc9aa4eb7b531d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-11-11 16:46:42 +00:00
pq a15b252c28 overlapping fix test
Change-Id: I4621e8e24b8d296875d2033ac21ba8da68fb0387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-05 21:14:31 +00:00
Konstantin Shcheglov 2513d37525 Fix reported void_checks diagnostics.
Change-Id: I49b27cf3aab3606fb5b024cba3ed4b95e9ebe0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 23:50:37 +00:00
pq 23947aa37a bulk fix tests for excludes / ignores
Regression tests for: https://github.com/dart-lang/sdk/issues/43869

Change-Id: I7909c23b583af93cbabc4d291d31eba04dca104c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-22 15:14:50 +00:00
pq f84bba2897 get libraries to fix from the context collection
Fixes: https://github.com/dart-lang/sdk/issues/43694

Also implements recursive fix semantics consistent with `dart analyze`.



Change-Id: I349650a0c1704c2e2be84287b46de17ecc132d56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166602
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-08 01:34:08 +00:00
pq 00594be05c don’t bulk fix options-filtered errors
Change-Id: Ifa902ffa1a30a5282f4dae3e1a9487583f9c27ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-06 00:40:23 +00:00
Danny Tuppeny c2e8d1df06 [Analyzer] Return GET_FIXES_INVALID_FILE for getFixes requests for files outside roots
Bug: https://github.com/dart-lang/sdk/issues/43521
Change-Id: I250bca1131b3d8bc7f8232db82f7f03008b3db48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164088
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-23 14:00:32 +00:00
Mike Fairhurst 1134a0f17c [analysis_server] Remove unused dart:async imports
Change-Id: I764ee78cb9e31bdb3abaa36ca4754e1fed180311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161447
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:29:52 +00:00
pq 8c1829e110 bulk fix protocol wiring
Change-Id: If9827b8765eb17c728113aaf23a26df5c8a05738
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 16:56:34 +00:00
Brian Wilkerson 052f100a95 Fix newly reported hints in analysis_server
Change-Id: Ie39a0f1f67019282c9d2bb4548ac553fa7061a65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155131
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-21 17:01:42 +00:00
pq 4aa16acb30 bulk fixes impl
A basic implementation.  Next up a dedicated `BulkFixesProcessor`.

Change-Id: I6d11888b8df66cd58a5a59d2e2ddb53e51d08872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-15 21:59:50 +00:00
Brian Wilkerson ab73158758 Fix the windows bot and update MockSdk
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.

Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-22 14:34:25 +00:00
Danny Tuppeny f36151e2d2 Add ChangeTo/CreateClass fixes for implements/mixin of missing identifiers
Change-Id: Iac0c512e87aaf5ba183d155e7bffe2a74936d7a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151509
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-17 15:44:36 +00:00
Danny Tuppeny 7b12c8e06d Add fixes for extends_non_class
Bug: https://github.com/Dart-Code/Dart-Code/issues/2536
Change-Id: I5e4fa5a3625016045d86462b941cee3c73a36a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150932
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-12 14:12:34 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Konstantin Shcheglov 34fcc56458 Fix for renaming named formal parameters from invocations, when synthetic.
R=brianwilkerson@google.com

Change-Id: I4dc57cfc2a941229f2ba8b8b262ed49ecdd6b170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-28 23:11:00 +00:00
Brian Wilkerson b03ef5b3fe Convert more doc comments in analysis_server
Change-Id: I333d0af4444226a8152e840c4d9015fb4c30bd32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 19:29:28 +00:00
Brian Wilkerson 58a9c22f80 Add return types to more methods in analysis_server
Change-Id: I65bed353bcff4f991faf8c3bdde979789a8d962b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-30 21:43:34 +00:00
Brian Wilkerson 8efdee06d6 Begin adding return types in analysis_server
Change-Id: Id0daa52236bdc90cba6bfd7cf81d1b4cf47603c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133544
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-28 21:18:30 +00:00
Brian Wilkerson a32e4363cb Fix some lints from function typed parameters that were not converted automatically
Change-Id: I926b54c298d398e9a316b9c042fcae98f9210815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 18:01:13 +00:00
Brian Wilkerson 5584c96fde Enable prefer_single_quotes in analysis_server
All of the changes except in the analysis options file are from dartfix.

Change-Id: Icd9bf02ad07f71d1fc365979c7dfe18a792dc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 17:52:52 +00:00
Sam Rawlins 1f55149f87 migrator: Fix HTML-rendered text in navigation and tooltips
Fixes #39830

The instrumentation_output_test.dart was very old; used dead LibraryInfo class.
Moved this test, renamed to unit_renderer_test.dart.

Change-Id: I8a7538ab3d152944fd93ee6dcab39202344b613b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130562
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-01-07 21:48:10 +00:00
Brian Wilkerson 91d6e1a0a7 Enable annotate_overrides in several packages
Other than analysis_server/test/analysis/notification_overrides_test.dart,
which had a naming conflict, all of the changes were made using dartfix.

Change-Id: I911dd75dcdee00420caa48724125e86d47c8857d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-01 21:31:40 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Konstantin Shcheglov ae3973da40 Use FeatureSetProvider in AnalysisDriver.
So that package_config.json can be used to opt-out from context
specified features / experiments.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I5e62d733eda6939d66d942eb3d690583f6091a57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128369
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 21:06:04 +00:00
Sam Rawlins 3ab95a114c NNBD Preview is a single-page application.
Navigation links, goto links, and detail links all are handled with
JavaScript, pushing and popping state.

* MigrationInfo moved to migration_info.dart
* All logic for rendering the code and regions of a unit moved to new
  UnitRenderer class.
* Navigation links work.
* Goto links work.
* Fresh reload works.
* New scrolling behavior to leave scrolling alone if target is already
  in view.
* Removed index page in favor of regular page with blank code.
* Back and forward buttons work.

Change-Id: If2296ee576c45374c18e5ba71426bcbdc894b71f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-12-13 16:14:19 +00:00
Sam Rawlins 2c7c3a60e7 NNBD preview: Rip out static preview; only server preview
This involved replacing PathMapper with the wrapper, PreviewPathMapper,
and MigrationInfo, with the wrapper, PreviewMigrationInfo.

Change-Id: Ie590c298bfa8c64c4765748b42ce3c9dc0dec3d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128107
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-12-12 01:48:23 +00:00
Brian Wilkerson f196196779 Add modification counts and instructions to all pages; add an index page
Change-Id: If78e4c8cc0a4e638ca778240d8060c545b14fcba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126082
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-11-22 23:03:37 +00:00
Jaime Wren bc449f160b Fix for dartbug.com/39401 -- quick fix improvement around angular generated files
Change-Id: I363b8f14363a53f01fd170e36752a3f0a9ec8e48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125412
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-18 20:58:35 +00:00
Jaime Wren f3ee4d0fe5 Add a failing test case for http://dartbug.com/39401 -- quick fix improvement around angular generated files
Change-Id: I784baefaa41db4e45c183335b73e7bb33991070a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2019-11-15 22:30:16 +00:00
Brian Wilkerson faa4eb7808 Partial support for an incremental workflow
Change-Id: Ibc18be75d5b4aada7c27cdfae559bd829bd50215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125421
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-11-15 17:01:45 +00:00
Brian Wilkerson 667f77ed60 Add an http server for the interactive preview mode
Change-Id: I727cc2b3d393b426f09a06e7b89c115864581962
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-11-12 17:39:22 +00:00
Sam Rawlins bc5fb05def NNBD i13n: Highlight non-nullable types with upstream triggered edges
Change-Id: I10fc2f731381ab60f0f724b2d463533895348500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122405
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-22 20:06:06 +00:00
Konstantin Shcheglov cb9eefca4f Issue 142793249. Never remove directive with unresolved URIs.
Bug: https://buganizer.corp.google.com/issues/142793249
Change-Id: I5ced1bcf4cb5d634f8e11555bb464f10c4bac68c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121926
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-18 17:06:50 +00:00
Sam Rawlins 2e6695f6f9 NNBD i13n: Add line numbers
Change-Id: Ifd81b3e99a3e8c0a1b1a0b6dbe29ad545f6e50f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121779
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-15 23:48:32 +00:00
Sam Rawlins cfe25c7e95 NNBD i13n: Sort navigation links
Change-Id: I32d21b26f3c813907308e9768a01a4cb9d45d1fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121768
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-15 22:37:08 +00:00
Sam Rawlins 7b9a26ee6f NNBD i13n: ctor nav targets and details w/o targets
* NavigationTargets which are ConstructorDeclarations should point to the
  constructor's name or its return type for unnamed constructors.
* Details which don't included useful targets, like "this parameter is
  optional and has no default value", should just have detail descriptions,
  but not be links.

Change-Id: I3562bb708c40aa1fcf1de5df5519f1f4037517cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120761
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-10 05:30:07 +00:00
Brian Wilkerson bb342ec83f Fix a test breaking the windows bot
Change-Id: I8192597a93ceb043585da0dc51f194e99bc2422c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-02 20:01:40 +00:00
Brian Wilkerson fee4fe8241 Generate output files for files outside the migrated package
This allows navigation to work from migrated files, but some navigation
from unmiograted files doesn't work.

This also causes the content of the output directory to be deleted
before generation starts so that old files won't confuse the user.

Change-Id: I0007d811e56b82cb6b91582e3237c7383ae2d060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-02 16:31:19 +00:00