pq
870aa5e4f4
Pubspec-specified analysis configuration ( #26359 ).
...
Provides support for pubspec-specified analysis configurations.
Context: https://github.com/dart-lang/sdk/issues/26359
TODO:
* docs
* CLI support
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1923973004 .
2016-04-28 13:10:45 -07:00
Brian Wilkerson
6dae827b70
More strong mode fixes for analyzer
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842363004 .
2016-04-01 09:35:22 -07:00
Brian Wilkerson
513433d514
Sort analyzer sources
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1843473002 .
2016-03-28 17:41:52 -07:00
Konstantin Shcheglov
d097a6e1cd
Allow Analysis Server crawl up the folders to search .analysis_options file.
...
R=brianwilkerson@google.com , jwren@google.com , pquitslund@google.com
BUG=
Review URL: https://codereview.chromium.org/1832643002 .
2016-03-23 17:09:48 -07:00
Bob Nystrom
a602585097
Don't upgrade the severity of *everything* to an error in strong mode.
...
Oops!
Fixes #26026 .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1813973002 .
2016-03-17 12:58:18 -07:00
Bob Nystrom
2ef00b0c3d
Don't report redundant type errors in strong mode.
...
Currently, "sideways casts" -- type errors where one type is assigned
to an unrelated type -- are reported by both ErrorVerifier and strong
mode's Checker. This leads to duplicate errors that the user can see.
ErrorVerifier's errors are generally better: they give the user more
contextual information and are easier to read. So this CL eliminates
Checker's reporting of these errors and only uses ErrorVerifier's.
However, in strong mode, type errors like this are fatal: DDC can't
generate correct code. So this also automatically upgrades all static
type warnings to errors when strong mode is enabled.
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1780783002 .
2016-03-15 12:14:11 -07:00
danrubel
d26d023ce7
update tests for execution on windows
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1774623006 .
2016-03-09 22:33:35 -05:00
danrubel
14983f0a26
extract resource path test utils
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1777913003 .
2016-03-09 16:26:14 -05:00
pq
9b1fa223a8
Embedded libs key rename to defuse server landmine.
...
1.13 stable builds of the SDK contain a version of server that fails catastrophically when analyzing source that imports packages that define embedded libraries. Since we can't pragmatically require more recent SDKs for flutter development we have been prevented from landing embedded libs in the flutter engine. By renaming the key we use to identify contributed libraries, this change avoids the issue. Old versions of server will simply ignore the new key and new ones will process it properly. Win-win!
BUG=
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1643023002 .
2016-01-29 09:52:04 -08:00
danrubel
d486870787
* fixes embedder bugs on Windows
...
* updates embedder tests to properly test Windows
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1612393002 .
2016-01-28 10:50:57 -05:00
danrubel
296c99c004
(TBR) fix embedder windows test
...
See https://github.com/dart-lang/sdk/issues/25498
Review URL: https://codereview.chromium.org/1643643002 .
2016-01-27 13:44:41 -05:00
danrubel
0e3416fffe
fix embedder url mapping on Windows
...
see https://github.com/dart-lang/sdk/issues/25498
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1600933007 .
2016-01-21 09:56:42 -08:00
danrubel
b37e3b7ec1
(TBR) fix embedder tests on Windows
...
Review URL: https://codereview.chromium.org/1609003003 .
2016-01-19 16:24:01 -05:00
danrubel
97273b2658
(TBR) make test pass on Windows
...
see https://github.com/dart-lang/sdk/issues/25498
Review URL: https://codereview.chromium.org/1603973002 .
2016-01-19 13:33:34 -05:00
Dan Rubel
1ef8fc8cec
simplify EmbedderUrlResolver
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1596693002 .
2016-01-15 21:21:11 -05:00
danrubel
ebd1736c58
Add EmbedderSdk to EmbedderUriResolver
...
R=brianwilkerson@google.com , johnmccutchan@google.com , pquitslund@google.com
Review URL: https://codereview.chromium.org/1584663006 .
2016-01-14 14:51:43 -05:00
pq
62656833d4
Wraps up the server-side of the 'Allow a user to configure which hints are "fatal"' ask ( #24452 ).
...
* migrates error filtering from a predicate to a process that can customize severities.
* moves filtering/processing from the `dart` task into the `getErrors` request and the errors notification.
See: https://github.com/dart-lang/sdk/issues/24452
(Pending a thumbs-up, support for CLI to follow.)
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1517723002 .
2015-12-10 13:35:11 -08:00
Brian Wilkerson
f0d249e269
Clean up package imports and library names
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
Konstantin Shcheglov
ac24bd115c
Don't run 'pub list-package-dirs' if there is no pubpsec.lock file.
...
This should help on DAS startup - if we don't have to run Pub, this saves as much as 400ms for each pubspec.yaml file.
Without pubspec.yaml we won't get any results anyway.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1470793002 .
2015-11-23 09:19:10 -08:00
John McCutchan
bb4d547a5d
Add _embedder.yaml support to analyzer and analysis_server
...
- If a package has an '_embedder.yaml' file with an 'embedder_libs' key two things happen:
1) We do not use the DartUriResolver to resolve dart: libraries.
2) We use the EmbedderUriResolver to resolve all dart: libraries
- If multiple packages have an '_embedder.yaml' file we merge them.
- This might not be the final behaviour that we want but I'm not sure how to surface errors to the end user.
- The '_embedder.yaml' file has a top level key 'embedder_libs' which is a map from dart: library uri to source path. Other keys are ignored by the EmbedderUriResolver.
- Unit tests for analyzer
- Integration test for analysis_server.
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1437893003 .
2015-11-16 15:30:17 -08:00
pq
b0a08827aa
Improves options validation type safety ( #24885 ).
...
Fixes #24885 .
https://github.com/dart-lang/sdk/issues/24885
BUG=24885
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1437703003 .
2015-11-12 09:44:25 -08:00
pq
67dc108f39
Map merging.
...
Basic YAML map merging suitable for merging a default map with an overriding one.
The semantics favor the overrider with a twist to support a short-hand for lists that stand-in for maps of scalars to booleans. Specifically, lint rules can be enumerated as a list or as a map. To make this work, lists can be "promoted" to maps. In particular, if
linter:
rules:
- camel_case_types
- one_member_abstracts
is merged with
linter:
rules:
one_member_abstracts: false
always_specify_return_types: true
the right thing is done to get us to:
linter:
rules:
camel_case_types: true
one_member_abstracts: false
always_specify_return_types: true
R=brianwilkerson@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1425393002 .
2015-11-03 10:42:18 -08:00
pq
ffeacec73d
Improved YAML doc exception handling.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1415153004 .
2015-10-28 11:24:42 -07:00
pq
6c85fe785a
Analysis Options error notifications.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1411013003 .
2015-10-21 09:59:19 -07:00
Brian Wilkerson
04c5a5f199
Clean up hints
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1382403002 .
2015-10-05 09:20:44 -07:00
John McCutchan
9535715f92
Fix handling of empty .analysis_options files and test this case
...
Fixes #24431
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1369573003 .
2015-09-24 12:38:53 -07:00
John McCutchan
aa430494f4
Fix script entry case of SdkExtUriResolver.restoreAbsolute
...
- Fix entry case of restoreAbsolute.
- Add TODO to fix part case
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1294473009 .
2015-08-17 10:01:01 -07:00
Brian Wilkerson
e4052e936f
More fixes for the Windows bot
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1276973002 .
2015-08-06 11:39:43 -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
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
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
John McCutchan
4bf66ce912
Add an AnalysisOptionsProvider to analyzer
...
BUG=
R=pquitslund@google.com
Review URL: https://codereview.chromium.org//1231633011 .
2015-07-17 13:34:03 -07:00
John McCutchan
c9dd867c1f
Add path filter
...
BUG=
R=pquitslund@google.com
Review URL: https://codereview.chromium.org//1232763004 .
2015-07-17 10:06:29 -07:00
pq
a81c308283
Analyzer code cleanup.
...
Removed some unused imports and fixed member sorting.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1230273002 .
2015-07-10 13:42:27 -07:00
John McCutchan
7abe54a857
Move from .sdkext to _sdkext
...
Reason: Pub does not publish dot files.
Review URL: https://codereview.chromium.org//1224103003 .
2015-07-08 16:33:09 -07:00
John McCutchan
6ecf960c5e
Move SdkExtUriResolver from analysis_server to analyzer so it can be used in analyzer_cli
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1214823003 .
2015-07-08 10:28:19 -07:00
Konstantin Shcheglov
4936eb8d5d
Fix for 'Create part' Quick Fix.
...
1. NonExistingSource.modificationStamp should return -1.
2. NonExistingSource.fullName should be always an absolute path, not a URI.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1135073004
2015-05-18 11:55:23 -07:00
scheglov@google.com
9534f300c2
ReApply: Issue 23133. Fix for restoring 'package:' uris on Windows.
...
There was a bug in the previous version https://codereview.chromium.org//1070203002
We used system path context instead of the one from the given ResourceProvider.
So, it worked, but was failing tests on Windows, because we always use posix style.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23133
Review URL: https://codereview.chromium.org//1051273007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45069 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 15:27:07 +00:00
ricow@google.com
88a0451f5a
Revert "Issue 23133. Fix for restoring 'package:' uris on Windows."
...
This reverts revision 45023
It is my strong suspicion that this is causing the redness here:
http://build.chromium.org/p/client.dart/builders/pub-win-russian-be/builds/3729/steps/pub%20and%20pkg%20%20tests%20failures/logs/stdio
R=scheglov@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//1073993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45049 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 05:55:53 +00:00
scheglov@google.com
1be249945b
Issue 23133. Fix for restoring 'package:' uris on Windows.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23133
Review URL: https://codereview.chromium.org//1070203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45023 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-09 18:23:42 +00:00
brianwilkerson@google.com
98b7382071
Reformat
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//975453004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44149 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 21:34:46 +00:00
paulberry@google.com
45b7294eff
Don't do folder existence checks when parsing pub list results.
...
It's just a waste of time since we already to folder existence checks
when resolving package URI's. Besides, all the folders output by pub
list should always exist except in pathological situations.
Improves total analysis time by about 2%.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//952333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44137 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 18:28:22 +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
paulberry@google.com
88e19fcb6e
When converting files to package URI's, favor longer directory matches.
...
Longer directory matches in mean that the relative path part of
the package URI will be shorter, making it more likely to match
user intent.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//953863004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44025 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 18:04:09 +00:00
paulberry@google.com
2b6e5b5f68
When translating from file to URI, make sure translation is reversible.
...
BUG=dartbug.com/22555
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//935453007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44003 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 22:15:39 +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
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
brianwilkerson@google.com
35b13e0885
Make constant lists immutable
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//730783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41757 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:33:57 +00:00
paulberry@google.com
5b45f8e762
Move PubPackageMapProvider to its own file.
...
This will allow clients of the AnalysisServer package to provide their
own PackageMapProvider without bringing in a dependency on dart:io.
R=brianwilkerson@google.com , rpaquay@chromium.org
Review URL: https://codereview.chromium.org//599133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40638 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 18:09:08 +00:00