Commit Graph

2966 Commits

Author SHA1 Message Date
Konstantin Shcheglov f693119146 Catch and suppress expected exceptions in corrections.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2391173003 .
2016-10-05 08:31:07 -07:00
Paul Berry f5ed63f2be Deprecate analysis option "cacheSize".
This option has had no effect for quite some time.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2392983002 .
2016-10-04 09:53:56 -07:00
Brian Wilkerson 25374847ab Handle null element in completion (issue 27461)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2383533005 .
2016-09-30 15:16:21 -07:00
Brian Wilkerson 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Brian Wilkerson 539452bd3e ContextBuilder can configure contexts to use summaries
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2380573006 .
2016-09-29 10:55:35 -07:00
Konstantin Shcheglov 3647e7bac0 Order suggested Quick Fix imports: direct, export, non-API.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2377803002 .
2016-09-27 15:03:26 -07:00
Konstantin Shcheglov ef015221b1 Catch exceptions while preparing analysis.implemented notification.
This notification is sent often, and uses index and search engine. We
have several exceptions in internal logs, and all there exceptions are
fatal by default. It seems too harsh to shutdown the server because of
a missing notification.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2376493002 .
2016-09-26 12:54:33 -07:00
Konstantin Shcheglov 09b0bba932 Issue 27358. Reset AnalysisContext 'sourceFactory' and 'typeSystem' on analysis options change.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27358

Review URL: https://codereview.chromium.org/2361203004 .
2016-09-23 09:44:47 -07:00
Brian Wilkerson 74686371b3 Add support for getting the sessionId from instrumentation and sending it to the client
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2359233002 .
2016-09-22 10:26:13 -07:00
Konstantin Shcheglov 163931ffdd Fix couple hints.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2362753002 .
2016-09-22 09:59:40 -07:00
Konstantin Shcheglov e82cbea8fe Issue 27386. Fix for 'use similar' Quick Fix for import-prefixed identifiers.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27386

Review URL: https://codereview.chromium.org/2361483002 .
2016-09-21 10:02:20 -07:00
Konstantin Shcheglov bdc024a303 Move PackageIndexAssembler into analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2357283002 .
2016-09-21 08:54:46 -07:00
Brian Wilkerson d947a7ba89 Async is no longer optional
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2361433002 .
2016-09-21 08:29:34 -07:00
Brian Wilkerson 2d9e690e6c Fix newly introduced errors and warnings
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2357553003 .
2016-09-21 08:01:04 -07:00
Brian Wilkerson c369a8449e More clean-up in server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2350143004 .
2016-09-20 08:39:43 -07:00
Brian Wilkerson 22040876bf Use declared variables to select the correct configuration for resolution
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2345773003 .
2016-09-16 07:32:40 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Dan Rubel 023295912a improve import URI completions at EOF
fixes https://github.com/dart-lang/sdk/issues/27020

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342473002 .
2016-09-14 11:22:25 -04:00
Dan Rubel 4fce5e9022 reduce the relevance of completions starting with "$"
fixes https://github.com/dart-lang/sdk/issues/27303

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2330413004 .
2016-09-13 14:21:31 -04:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Brian Wilkerson 5bd4de469e Clean up warnings and hints
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2324463006 .
2016-09-09 09:09:59 -07:00
Konstantin Shcheglov f5144faed8 Remove JavaArrays from java_core.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2329483002 .
2016-09-09 09:03:25 -07:00
Brian Wilkerson fe02411930 Remove several references to JavaFile
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2323173002 .
2016-09-09 07:45:40 -07:00
Konstantin Shcheglov e187e33923 Remove StringUtils from java_core.
It is used almost only in analyzer and analysis_server.
There are two places where it is used internally - I'm fixing them.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2317113005 .
2016-09-08 13:26:56 -07:00
Konstantin Shcheglov 7442a85cbb Issue 27130. Fix applying changes to .analysis_options on save.
This fix partially reverts changes made in https://github.com/dart-lang/sdk/commit/de6925a23ebf29cd587dd5f4e214cb277a7397e4
It is correct that we should ignore applyChanges() for sources with
content overridden in the content cache. But we cannot know what else
happened with results in the analysis cache at this point. So, we
should just let Analysis Server to always run analysis, so that
Driver and WorkManager(s) will decide if there is anything to do.

I believe that the original motivation for the change was to avoid
sending extr 'analysis.implemented' notifications. It does not happen
anymore, probably because we set other shortcuts using source content.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27130

Review URL: https://codereview.chromium.org/2314933003 .
2016-09-06 13:41:48 -07:00
Konstantin Shcheglov 9aa060e67f Issue 27143. Fill documentation for local, AST based completion.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27143

Review URL: https://codereview.chromium.org/2313003002 .
2016-09-06 12:05:20 -07:00
Konstantin Shcheglov f4186fb463 Issue 27244. Add 'isDeprecated' to HoverInformation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27244

Review URL: https://codereview.chromium.org/2310153002 .
2016-09-06 11:31:11 -07:00
Brian Wilkerson 677ef00534 Fix recently introduced strong mode errors
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2302993003 .
2016-09-02 09:08:21 -07:00
Paul Berry 94309733cd Revert "Remove unnecessary hide clauses"
The `Resource` class wasn't removed from the SDK until version
1.20.0-dev.0.0, which was only recently published.  Reverting this
change to allow people using older SDK releases a little more time to
upgrade.

This reverts commit 2cdafd82c2.

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

Review URL: https://codereview.chromium.org/2299243002 .
2016-09-01 16:08:43 -07:00
Brian Wilkerson 2cdafd82c2 Remove unnecessary hide clauses
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2305453002 .
2016-08-31 16:44:52 -07:00
Konstantin Shcheglov f096f7b985 Flush results when contexts are made idle.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2297343002 .
2016-08-31 14:03:25 -07:00
Konstantin Shcheglov cc6beaf56d Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
There are following changes:

1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Brian Wilkerson db61b35a62 Fix a null pointer exception (found in a log)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2290233006 .
2016-08-31 12:57:19 -07:00
Konstantin Shcheglov f8f4228728 Revert "Flush AST results for source outside of the analysis roots."
This reverts commit b115309531.

Revert "Use FlushTargetFilter to pre-filter targets before checking their results."

This reverts commit 2e24662c06.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2298043002 .
2016-08-30 19:55:10 -07:00
Konstantin Shcheglov 1c6d3472a6 Set 'packageResolverProvider' for ContextBuilder in DAS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2290423002 .
2016-08-30 10:56:27 -07:00
Konstantin Shcheglov 09b851c97f Don't perform final fields and top-level variables type propagation.
A similar feature is now implemented in strong mode, and users who
need it, should switch to strong mode.

When we are ready to drop propagated types altogethoer, we could
deprecate or remove UnlinkedVariable.propagatedTypeSlot in IDL.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26794

Review URL: https://codereview.chromium.org/2288223003 .
2016-08-29 15:18:12 -07:00
Konstantin Shcheglov e346689805 Issue 27179. Materialize synthetic constructors on rename.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27179

Review URL: https://codereview.chromium.org/2289823002 .
2016-08-29 08:52:13 -07:00
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Konstantin Shcheglov af6bd2ef88 Use SdkExtensionFinder in the old Analysis Server implementation.
To be replaced with ContextBuilder of course.
But we need this for the time being.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2272093003 .
2016-08-24 13:58:16 -07:00
Brian Wilkerson 40a310748a Correctly use sdk passed on command-line
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2276033003 .
2016-08-24 12:38:21 -07:00
Konstantin Shcheglov 2e24662c06 Use FlushTargetFilter to pre-filter targets before checking their results.
This helps to reduce number of checks, so makes flushing faster.
In non-incremental changes it gives 0.32% -> 0.11%.
In incremental changes it gives 10% -> 2.6%.

We still pass both target and result into the second filter for
convenience, e.g. to print them both without need to remember the
current target in a local variable.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2267273004 .
2016-08-24 09:44:06 -07:00
Konstantin Shcheglov b115309531 Flush AST results for source outside of the analysis roots.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2271803002 .
2016-08-23 14:53:51 -07:00
Konstantin Shcheglov 90c7698f1b 'Extract Local' and 'Inline Local' refactoring need only single file analysis.
We still analyze more than we actually need - we don't need the full
RESOLVED_UNIT, we could live with some much lower RESOLVED_UNITx. But it
might be fast enough for practical purposes to compute fully resolved
units.

Maybe we should set up monitoring for refactoring times...

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2262393003 .
2016-08-22 18:59:55 -07:00
Konstantin Shcheglov 424cb8d9a4 Fix for 'Extract Local' in an expression function body.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2267893002 .
2016-08-22 11:58:08 -07:00
Brian Wilkerson b86a021155 Remove changes that were accidentally entangled with an earlier CL (TBD)
Review URL: https://codereview.chromium.org/2266763002 .
2016-08-21 16:10:08 -07:00
Brian Wilkerson 79f190cf69 Supress deprecation warnings in a deprecated library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2261053002 .
2016-08-21 15:47:38 -07:00
Konstantin Shcheglov a98ec79a0c Always enable --finer-grained-invalidation, ignore the flag.
Remove the flag later.
https://github.com/dart-lang/sdk/issues/27108

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2250513008 .
2016-08-19 14:01:49 -07:00
Konstantin Shcheglov 2e4b51700f Revert: Always enable --finer-grained-invalidation, ignore the flag.
I see failures on pub bots.
Will fix them and reapply later.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2264683002 .
2016-08-19 11:39:39 -07:00
Konstantin Shcheglov 40b70c29d1 Always enable --finer-grained-invalidation, ignore the flag.
Remove the flag later.
https://github.com/dart-lang/sdk/issues/27108

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2257243004 .
2016-08-19 10:56:35 -07:00