Commit Graph

1341 Commits

Author SHA1 Message Date
danrubel 3b8b7ee7a2 suggest "deferred as" rather than "deferred"
suggest show and hide in import declaration

fixes #23967

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1276843007 .
2015-08-06 16:02:58 -07:00
Brian Wilkerson 2fd3bad64e Cause "implement methods" to be sorted before "make abstract"
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1276963003 .
2015-08-06 14:40:50 -07:00
Konstantin Shcheglov 65941839b7 Remove also duplicate imports.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1277983002 .
2015-08-06 12:42:30 -07:00
Paul Berry e21c112313 Upgrade analysis_server's dependency on analyzer to 0.26.1-alpha.0.
This is necessary in order to take advantage of the new signature for
the PathFilter constructor introduced in
d977370e3f.

Also the dependency on dart_style had to be widened since older
versions of dart_style force analyzer version <0.26.0.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1278853002 .
2015-08-06 11:33:13 -07:00
Paul Berry d977370e3f Fix PathFilter constructor to be backward compatible with analyzer 0.26.0.
Commit 24189ea4f9 modified the
PathFilter constructor signature in a backwards-incompatible way, and
made corresponding changes to analysis_server, causing warnings to
show up in analysis_server when analyzed using the version of analyzer
in its pubspec.

This CL switches to a backwards-compatible signature and updates the
analyzer pubspec in preparation for publishing.  Once the new version
of analyzer is published I will update analysis_server's pubspec to
point to it, which should fix the warnings.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1278823002 .
2015-08-06 11:03:55 -07:00
Brian Wilkerson 9aa45d4cf0 Capture more data when instrumenting exceptions
R=lukechurch@google.com

Review URL: https://codereview.chromium.org//1257023003 .
2015-08-06 08:50:39 -07:00
Brian Wilkerson 848386fddc (TBR) Add missed file
Review URL: https://codereview.chromium.org//1272273003 .
2015-08-05 08:23:43 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
danrubel a6ea45883d add location to suggestions from local file
fixes #23905

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1267203002 .
2015-08-04 22:12:01 -07:00
danrubel bf05b75f43 update suggestion element return type to have type param
cleanup loadLibrary suggestion to have correct element

dartbug.com/23905

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1260593005 .
2015-08-04 22:08:55 -07:00
Konstantin Shcheglov d11b644cc5 Issue 23963. Improve to/from block/expression body with void expressions.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23963

Review URL: https://codereview.chromium.org//1267333003 .
2015-08-04 16:16:17 -07:00
Konstantin Shcheglov fbb7aedee5 WEB-17598. Name new libraries according to the Dart Style Guide.
R=brianwilkerson@google.com
BUG= https://youtrack.jetbrains.com/issue/WEB-17598
     https://github.com/dart-lang/sdk/issues/23972

Review URL: https://codereview.chromium.org//1253103007 .
2015-08-04 14:47:30 -07:00
pq d4d7e300f4 Flip .packages server support bit.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1253183015 .
2015-08-04 14:01:49 -07:00
Konstantin Shcheglov 60ab26dc30 Simplify directive's optimizer edit.
There was also a bug in computing common range.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1272013002 .
2015-08-04 13:14:27 -07:00
Konstantin Shcheglov ca28e0ff4b Forgotten test.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1259263004 .
2015-08-04 08:35:53 -07:00
Konstantin Shcheglov 92f49b892d Implementation of 'edit.organizeDirectives'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1255413003 .
2015-08-03 22:44:35 -07:00
danrubel fde3b1b335 better completions in switch statements
Closes #23527

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1255953004 .
2015-08-03 14:06:30 -07:00
danrubel e8e6cf823a fix completion replacement offset/length for invalid token in switch statement
Closes #23947

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1271723002 .
2015-08-03 14:02:40 -07:00
John McCutchan dfc35faaf9 Make exclude list also exclude contexts
- Only create a context if the directory/.packages/pubspec.yaml is not excluded.
- Add tests.

Fixes: https://github.com/dart-lang/sdk/issues/23941

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

Review URL: https://codereview.chromium.org//1263443005 .
2015-08-03 13:54:17 -07:00
danrubel 9d5154a1fd include exported library namespace in prefixed import suggestions
Closes #23946

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1263093003 .
2015-08-03 13:52:44 -07:00
Konstantin Shcheglov 64ff591f56 Organize directives implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1266393002 .
2015-08-03 13:49:57 -07:00
Konstantin Shcheglov e5b4713f03 'Import library' and 'Create class' Quick Fixes for unresolved class-like name in list literals.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1269043003 .
2015-08-03 13:03:28 -07:00
Konstantin Shcheglov aa30cad380 Proposal for the 'edit.organizeDirectives' request.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23921

Review URL: https://codereview.chromium.org//1258563008 .
2015-08-03 07:59:26 -07:00
Brian Wilkerson 24189ea4f9 Make PathFilter use the resource providers path context
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1260443006 .
2015-07-31 10:06:38 -07:00
pq 818229cbae Server options file rename.
Clone of https://codereview.chromium.org/1256113004/ which I couldn't cleanly land...

Review URL: https://codereview.chromium.org//1261203003 .
2015-07-30 16:15:44 -07:00
pq 88b8fb8e1e Server options handling.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1270593002 .
2015-07-30 12:58:58 -07:00
Brian Wilkerson f909ed8adf Add test for references in comments
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1256333008 .
2015-07-30 11:20:00 -07:00
Paul Berry e93b52a66f Deprecate option "enableNullAwareOperators" in analysis server.
As of analyzer version 0.25.2, this option is no longer needed;
null-aware operators are always enabled.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1255113005 .
2015-07-28 11:31:03 -07:00
Paul Berry f5dab3fd2b Convert ContextManager to recursively watch analysis roots.
Previously ContextManager watched the contents of each context folder
independently; this was redundant in the case where one context folder
was nested inside another.  Also it led to some race conditions, since
we had to examine the contents of a folder in order to determine
whether there should be a context associated with it, but we couldn't
begin watching those files for that context until after the context
was created; this left a small window of time where a change to the
files might go unnoticed.

Note that a minor functional change is introduced: if "pub list"
indicates that the package resolution for a given folder is dependent
upon a file outside that folder, we no longer watch that file for
changes.  This shouldn't be a problem, since in practice "pub list"
always lists exactly two files as dependencies, and both of those
files are inside the folder (pubspec.yaml and pubspec.lock).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257933002 .
2015-07-26 20:56:43 -07:00
Paul Berry cdfa46faa5 Improve package root tests.
Partially fixes #23909.  Previously, these tests didn't work at all.
Now they verify that the FolderDisposition is based on the correct
package root, but they don't yet verify that the package map is
generated correctly.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257913002 .
2015-07-26 15:08:58 -07:00
Paul Berry 641284a263 Generalize the dependency tracking mechanism used by ContextManager.
Previously, we tracked "pub list" dependencies using
ContextInfo.packageMapInfo.dependencies, but that mechanism could only
be used for folders that resolved packages using "pub list".  Other
dependencies were tracked ad hoc (such as dependencies on ".packages",
or anti-dependencies* on "pubspec.yaml"); others weren't tracked at
all (such as dependencies on ".analysis_options").

(*In this context, an "anti-dependency" is a dependency on the fact
that a file is absent.  E.g. when we decide not to create a separate
context for a subfolder, it is in part because that subfolder lacks
its own "pubspec.yaml" file.)

This CL migrates the "pub list" dependencies to a more general
mechanism; future CL's will migrate the other ad hoc dependencies to
use the same mechanism.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258723002 .
2015-07-24 14:52:05 -07:00
Konstantin Shcheglov 14e1cdc86c Fix for 'analysis.getNavigation' implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1260503002 .
2015-07-24 14:27:20 -07:00
Paul Berry 46c284abdf Stop optimizing uses of "pub list".
The use case which made this optimization necessary is now gone, and
it's getting in the way of refactoring ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1256793006 .
2015-07-24 10:42:25 -07:00
danrubel ddf17fa575 performance measurement improvements and README update
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1250343002 .
2015-07-24 10:14:11 -04:00
Paul Berry 7fb62213cf Introduce FolderDisposition class hierarchy for use in ContextManagerCallback.
The new class hierarchy encapsulates the packageUriResolver and
packages parameters that were previously used in the
ContextManagerCallback API.  In a future CL, I intend to use it more
extensively within ContextManagerImpl in order to make the algorithm
for choosing contexts more declarative.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258473003 .
2015-07-24 06:42:54 -07:00
Paul Berry 391741a2de Clean up bogus codepath in ContextManager._computePackageUriResolver.
This codepath was only exercised during unit tests and race
conditions.  The fact that it was executed during unit tests at all
was due to a bug (see #23909).  The behavior during race conditions
was incorrect (it tried to set up package resolution using a folder
that didn't exist).

This CL fixes the race condition behavior and disables the affected
tests.  In a future CL I will fix the underlying bug that caused the
unit tests to execute incorrectly, and re-enable the tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1253803002 .
2015-07-24 06:39:21 -07:00
danrubel 5397035e2f performance measurement readme
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1244023003 .
2015-07-23 15:34:23 -04:00
Paul Berry 37bf862fe4 Get rid of ContextManager._contexts.
This data structure was redundant with the tree of contexts maintained
in ContextManager._rootInfo.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1243063003 .
2015-07-23 11:03:44 -07:00
Paul Berry b3d245d608 Clarify nomenclature of "ancestor" and "root" in context manager.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1249023003 .
2015-07-22 12:53:22 -07:00
Paul Berry 6f6410cd9f Preliminary refactoring work on ContextManager.
- There is now a single virtual ContextInfo representing the root of
  the context tree; this should allow us to reduce the need for
  traversing the _contexts map, and should reduce the number of corner
  cases that need to be handled when creating and destroying contexts,
  since tree roots will never be created nor destroyed.

- We now build the contexts while recursing down the directory tree
  and populate them with files while unwinding the recursion; this is
  more consistent with the data flow (deciding which contexts to build
  depends only on the current directory and directories above it;
  deciding which files to include in a context depends only on the
  current directory and directories below it).

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

Review URL: https://codereview.chromium.org//1243233003 .
2015-07-22 10:34:43 -07:00
Brian Wilkerson 1487e5ad91 Merge pull request #23867 from guillermooo-forks/make-indentation-configurable
make indentation configurable for codegen tools
2015-07-22 10:27:48 -07:00
danrubel e196c15ca1 performance measurement mods:
* apply source path translation in the order in which they are defined
* print elapse times in milliseconds
* log overlay content if server exception occurs
* simplify diagnostic port initialization
* add option to start server using new task model

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1249793007 .
2015-07-22 12:17:04 -04:00
pq f013d3868c Actual URI support for package URI resolution.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1245263002 .
2015-07-21 15:53:56 -07:00
Paul Berry e30ebf79e2 Remove redundant context lookups from option-processing code.
This required exposing the ContextInfo class for testing, but I don't think that's a problem because ContextInfo objects can't be reached through the public API of ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1251663002 .
2015-07-21 15:06:11 -07:00
Paul Berry b3da0bd138 Move _onContextsChangedController and defaultOptions into AnalysisServer.
This eliminates the need for some ugly casts.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1251563002 .
2015-07-21 11:34:18 -07:00
Brian Wilkerson 3d28c45311 Fix watch manager tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1248723002 .
2015-07-21 10:45:15 -07:00
Paul Berry 128dec84b5 Separate the API's used by ContextManager.
Previously, ContextManager had two API's: one used by analysis server
to tell the ContextManager what to do, and one used by the
ContextManager to make callbacks to analysis server in response to its
requests.  The first API was implemented in the class
AbstractContextManager, which derived from ContextManager, and the
second API was implemented in ServerContextManager, which derived from
AbstractContextManager.

In addition to causing confusion, this made it impossible to provide
an alternate implementation of ContextManager as a plug-in, since the
plug in would have had to re-implement the second API, and that would
have required accessing private implementation details of the
ContextManager.

This CL separates the API's: the first API is specified in
ContextManager and implemented in ContextManagerImpl, and the second
API is specified in ContextManagerCallbacks and implemented in
ServerContextManagerCallbacks.

In the long run I hope to eliminate the ContextManagerCallbacks class
entirely, by having the ContextManager tell its client what to do
using return values rather than callbacks.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1243893002 .
2015-07-21 10:40:57 -07:00
Konstantin Shcheglov c4652486b4 Fix for a copy/paste problem in GET_NAVIGATION_INVALID_FILE.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1243073004 .
2015-07-21 08:46:55 -07:00
Konstantin Shcheglov d5d0017e21 Tweak for navigation for URIs.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1246833002 .
2015-07-20 15:07:00 -07:00
Konstantin Shcheglov a049c5aba0 Update DAS protocol version to 1.9.0
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1241213002 .
2015-07-20 12:24:37 -07:00