Commit graph

57 commits

Author SHA1 Message Date
pq 2f9c4af993 Error Suppression FTW.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1420363005 .
2015-10-28 09:59:05 -07:00
pq bf0ba96027 Analysis Options processing task and manager.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1413973003 .
2015-10-20 15:38:55 -07:00
Konstantin Shcheglov 5e9ea82aa4 Issue 24612. Skip excluded folder during contexts creation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24612

Review URL: https://codereview.chromium.org/1411393003 .
2015-10-19 13:17:11 -07:00
Konstantin Shcheglov efc1d4b224 Ignore contexts in folders named 'packages' or starting with dot.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24614

Review URL: https://codereview.chromium.org/1415713002 .
2015-10-19 11:59:11 -07:00
Brian Wilkerson adb8ebd0e6 Remove obsolete flag to enable package support
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1411833002 .
2015-10-16 13:43:00 -07:00
pq e5f3bb163b AS strong-mode .analysis_options awareness.
R=brianwilkerson@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1403983002 .
2015-10-13 13:22:49 -07:00
pq d6d2e6f3c6 Options plugin initialization fix.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1400473004 .
2015-10-08 14:52:42 -07:00
Paul Berry f9aebddc67 Ignore added files in hidden directories.
In commit 6ddc37a5cc, the ContextManager
was modified to disable analysis of files in hidden directories,
provided those files existed prior to the creation of the context.
This CL extends the fix to apply also to files that are added after
context creation.

Fixes #24212.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1372173004 .
2015-09-28 14:10:32 -07:00
pq d869088ea3 Error handling for bad .analysis_options files.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1364813003 .
2015-09-23 13:27:19 -07:00
Brian Wilkerson 42d1d4532d Reformat code to minimize churn
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1310263003 .
2015-09-09 08:19:18 -07:00
Paul Berry 8f2ed2c68d Fix most implementations of UriResolver.restoreAbsolute.
Although it wasn't previously clear in the documentation,
implementations of UriResolver.restoreAbsolute() should only depend on
Source.fullName.  To do otherwise breaks some assumptions made by
analysis server.  This CL fixes all implementations except
SdkExtUriResolver (which has been deferred to issue #24090).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1296653003 .
2015-08-18 11:32:15 -07:00
John McCutchan 67a7aeaf12 Add _sdkext support back to analysis server
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1295463003 .
2015-08-13 12:24:37 -07:00
Brian Wilkerson 97225c3a21 Possible fix for Windows bot failures
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1275503003 .
2015-08-10 13:10:08 -07:00
Paul Berry 206083c8b1 In analysis server, favor package root setting over ".packages" file.
R=brianwilkerson@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org//1277063002 .
2015-08-07 09:23:53 -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
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
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 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
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
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
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 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
pq 05d4206929 Server .packages support.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1242023008 .
2015-07-18 22:18:30 -07:00
John McCutchan 0300e2e9fd Make analysis_server use ignore patterns from .analysis_options file
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1234293003 .
2015-07-17 14:10:37 -07:00
John McCutchan cb5335dc4a Add a PathFilter to each context in analysis_server
BUG=
R=brianwilkerson@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org//1238173003 .
2015-07-17 12:42:57 -07:00
Brian Wilkerson 0c6872acef Hook for overriding the ContextManager and some code clean-up (with more to follow)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1223413003 .
2015-07-13 10:20:13 -07:00
Brian Wilkerson bdfc16a146 Hook for overriding the creation of a package resolver
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1214243005.
2015-07-06 13:06:33 -07:00
Dan Rubel eb95064511 recompute package map when input file changes
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1180843011.
2015-06-20 17:18:54 -04:00
Brian Wilkerson add5a6910d Remove many explicit references to AnalysisContextImpl and enable testing of the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1150863007
2015-06-06 08:30:38 -07:00
Brian Wilkerson ad52c9eab9 Add support for specifying files needing analysis
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1152013002
2015-05-21 14:34:04 -07:00
scheglov@google.com 9efb25fa50 Use package:test_reflective_loader instead of reflective_tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1101003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45365 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 20:54:29 +00:00
paulberry@google.com 7e53bd2b1f Avoid redundant calls to "pub list" when multiple dependencies change.
BUG=dartbug.com/22574
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1089453002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45170 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 16:02:18 +00:00
brianwilkerson@google.com b396bc4c96 Support refresh of individual analysis roots (issue 22254)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1047733004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44791 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:07:23 +00:00
brianwilkerson@google.com 8c298b499e Recognize nested pubspecs (issue 22907)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1042293003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44780 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 16:01:03 +00:00
brianwilkerson@google.com d954183441 Change all sources associated with changed files (issue 22680)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//981283003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44335 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 18:28:21 +00:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//969113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
brianwilkerson@google.com 5a4919c270 Add instrumentation (issue 22572)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//956103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44071 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 19:54:36 +00:00
danrubel@google.com 6a90488fc8 cache pub list results
BUG=
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//941883002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44062 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 17:24:08 +00:00
brianwilkerson@google.com 2e466105b2 Create package: URIs everywhere
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//946803002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43965 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 17:34:12 +00:00
brianwilkerson@google.com 0e73ada9c2 Use package: URIs for files in lib
R=paulberry@google.com

Review URL: https://codereview.chromium.org//914373004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43827 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 22:47:34 +00:00
scheglov@google.com 658d3e949e Check PackageMapUriResolver constructor arguments.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//887943004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43405 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 16:06:25 +00:00
scheglov@google.com a38a503d86 Replace @ReflectiveTestCase() with @reflectiveTest.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//849863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
scheglov@google.com b8da9bc651 Format and sort analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//725143004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
scheglov@google.com 7f4d5bb1fb Issue 21506. Fix for adding back previously excluded resources in sub-folders.
The server's part of the issue.

R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21506

Review URL: https://codereview.chromium.org//692073004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41500 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 18:47:14 +00:00
paulberry@google.com 0251bcdcf6 Add package root support to analysis server.
Not yet hooked up in Dart editor.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//679763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41292 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 20:29:24 +00:00
paulberry@google.com 751e087262 Add package root setting to analysis server API.
The command does not have any effect yet.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//672003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41253 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 00:11:36 +00:00
danrubel@google.com 70d983e570 add element to completion suggestions
suggest getter rather than field element
add test for function suggestions

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org//580623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40366 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 03:50:46 +00:00