Commit Graph

3160 Commits

Author SHA1 Message Date
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 ac81124b8c Revert "Use dependency_overrides / analyzer in analysis_server."
This reverts commit 72f5463631.

Yes, we do have bot failures :-(

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

Review URL: https://codereview.chromium.org/2298423002 .
2016-08-31 15:01:10 -07:00
Konstantin Shcheglov 72f5463631 Use dependency_overrides / analyzer in analysis_server.
RFC

We always do this locally, but until analysis_server is published,
we could just keep this change in repo.

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

Review URL: https://codereview.chromium.org/2298973002 .
2016-08-31 14:44:09 -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
Devon Carew c3e64df2af Fix an analysis server test.
BUG=

Review URL: https://codereview.chromium.org/2294163002 .
2016-08-30 17:58:31 -07:00
Devon Carew cd0a81ddf5 Update the styles for the analysis server specification.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2296023002 .
2016-08-30 15:42:27 -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
Danny Tuppeny 5fe56b0d3a Remove a duplicated angle bracket. (#27171) 2016-08-27 07:11:46 -07:00
ddrone 6902f2a97d Add a link to API spec (#27158) 2016-08-25 11:04:35 -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
Brian Wilkerson 6a3e185521 Allow file resolver provider to return null, just like package resolver provider
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2260593003 .
2016-08-18 15:00:19 -07:00
danrubel d92849a8af fix completion in switch case
Fixes https://github.com/dart-lang/sdk/issues/26856

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2250873002 .
2016-08-16 18:07:52 -07:00
Konstantin Shcheglov 010578b88a Issue 26335. Insert an empty line if the class body is a single line.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26335

Review URL: https://codereview.chromium.org/2256463002 .
2016-08-16 15:13:22 -07:00
Konstantin Shcheglov ee3a93a0a8 Add a new Analysis Server flag '--enable-pub-summary-manager'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2243003002 .
2016-08-12 14:05:55 -07:00
Konstantin Shcheglov a3a031195a Add DartSdk.getLinkedBundle() and use it in PubSummaryManager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2242963002 .
2016-08-12 12:11:03 -07:00
Brian Wilkerson c41427383b Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -07:00
Alexei Eleusis Diaz Vera c365f3023b fix typo (#27056) 2016-08-11 12:19:48 -07:00
Brian Wilkerson 2657536034 Create new error message for missing generated files
R=scheglov@google.com, skybrian@google.com

Review URL: https://codereview.chromium.org/2232863004 .
2016-08-10 12:42:14 -07:00
Konstantin Shcheglov 0522cad42a Convert to async/await parts that cause strong mode warnings.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2233633003 .
2016-08-10 10:28:34 -07:00
Brian Wilkerson 38689cd848 Fix errors introduced by recent strong-mode changes
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2233913003 .
2016-08-10 09:12:49 -07:00
Konstantin Shcheglov de837749a2 Basic linking in PubSummaryManager.
Many features are not implemented yet, but I'd like to show to you and
if it a step in the correct directlion, land it.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2226973005 .
2016-08-09 18:03:13 -07:00
Brian Wilkerson b29c6bf330 Suppress follow-on errors when a file is imported with either a prefix or a show clause
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2226613004 .
2016-08-09 11:11:39 -07:00
Konstantin Shcheglov 6df5ea27a5 Revert 6ad38498c8 (PARSED_UNIT).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2231473002 .
2016-08-09 10:14:18 -07:00
Konstantin Shcheglov 43fef756ae Provide LINE_INFO from ResynthesizerResultProvider.
Also, to guarantee that LINE_INFO is computed, we need to replace
context.getLineInfo() with context.computeLineInfo() in the server.
This should be equivalently fast in both summary (from provider) and
non-summary cases (the source should have been scanned and parsed in
order to resolve references to its elements).

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2225893003 .
2016-08-09 09:12:24 -07:00
Konstantin Shcheglov c35fb3c79d Initial implementation of pub summary manager.
For now we just generate unlinked, spec summaries.
We don't use them.

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

Review URL: https://codereview.chromium.org/2220703002 .
2016-08-09 07:18:52 -07:00
Konstantin Shcheglov 6ad38498c8 Extract unresolved AST parsing (PARSED_UNIT1) from full parsing, which includes UriBasedDirective(s) resolution.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2229603003 .
2016-08-08 14:45:27 -07:00
Brian Wilkerson 5b26441dbf Convert server and cli and deprecate the old implementation
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2214613003 .
2016-08-04 11:28:16 -07:00
Konstantin Shcheglov 6cceb72ea7 Don't report removed sources as changed in CacheConsistencyValidatorImpl.
Also I believe we don't need this check anymore.
context.getLibrariesContaining(source).isEmpty &&
context.getLibrariesDependingOn(source).isEmpty)

1. It was not used in applyChanges(), which could probably cause losing
some dependencies.

2. Since https://codereview.chromium.org/2172143003 we record that
there are dependencies on the removed, so not existing, source. So,
when the source is added again, _sourceAvailable() will invalidate
its CONTENT and the whole transitive closure of its users.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2209493003 .
2016-08-03 13:30:09 -07:00
Konstantin Shcheglov 30b2401907 Issue 25666. Add test for shadowing of a superclass member from other library.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25666

Review URL: https://codereview.chromium.org/2204263002 .
2016-08-03 10:16:36 -07:00
Konstantin Shcheglov 77590f5ab1 Use unitMember/classMember/parameter names instead of offsets in index.
This fixes index for cases when element offset might change without
causing resolution of its users, e.g. incremental changes (like
inserting a whitespace) and incremental invalidation.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2203173002 .
2016-08-02 23:18:29 -07:00
Brian Wilkerson 1ba4a1e887 Mark analysis_server as being strong-mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2198223002 .
2016-08-01 12:23:22 -07:00
Brian Wilkerson 16cc45417c Make analyzer strong-mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2196363003 .
2016-08-01 11:55:15 -07:00