Konstantin Shcheglov
6fe8e2278b
Simplify PackageMapUriResolver - one folder, return any file, or null.
...
If the package is know, we return the corresponding file, whether it
exists or not.
If the package is not know, there is no valid Source to resolve to,
so we return null.
We don't need all the features that existed.
Internally we switched to BazelPackageUriResolver, which has its own
logica for searching files in workspaces across multiple folders.
All the places where we create PackageMapUriResolver in analyzer
or analysis_server, we create it with exactly one folder.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2812093002 .
2017-04-11 13:03:56 -07:00
Devon Carew
3fd497b510
Ignore some uses of deprecated APIs.
...
BUG=
Review-Url: https://codereview.chromium.org/2796483002 .
2017-04-03 08:31:00 -07:00
Konstantin Shcheglov
0728e4ee70
Implement 'analysis.getErrors' for the new driver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2566013002 .
2016-12-11 15:27:57 -08:00
Brian Wilkerson
86c62a6bad
Remove the command-line plugin
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2565993002 .
2016-12-11 10:59:19 -08:00
Brian Wilkerson
a01afcd1d1
Remove the options plugin
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Brian Wilkerson
0ea654a068
Remove the AnalysisOptionsProcessor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2559523005 .
2016-12-07 10:51:33 -08:00
Dan Rubel
74d713ece9
remove support for analyzer configuration in pubspec
...
This removes support for having directives like this in your pubspec:
analyzer:
configuration: test_pack/config
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2511963002 .
2016-11-20 20:44:04 -05:00
Dan Rubel
c1451ac218
fix include options test on windows
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2505633002 .
2016-11-15 15:13:25 -05:00
danrubel
18ab91f70b
skip new test on windows
...
Review URL: https://codereview.chromium.org/2496403002 .
2016-11-14 16:35:45 -05:00
danrubel
68ba3cfe51
work in progress - support analysis options include declaration
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2489973002 .
2016-11-14 15:12:03 -05:00
Konstantin Shcheglov
d4ebdabf43
MemoryResourceProvider.getFolder() should not create the folder.
...
But newFolder() should be used to create.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2396423002 .
2016-10-07 10:12:00 -07:00
Brian Wilkerson
2328bef00b
Fix more tests on windows bots
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2398113002 .
2016-10-06 10:21:01 -07:00
Konstantin Shcheglov
5455fd0118
Remove 'initializeTestEnvironment' from 'analyzer'.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov
175dad4f15
Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Brian Wilkerson
ef2a3b982c
MemoryResourceProvider always uses the current platform
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2391883002 .
2016-10-03 19:24:21 -07:00
Brian Wilkerson
ab9ba20c04
Fix recently introduced strong-mode errors
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -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
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
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
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
Konstantin Shcheglov
ce5a17ab63
Attempt to load sdk.ds from the only embedder.
...
And return it only in strong mode.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2277003003 .
2016-08-25 09:08:00 -07:00
Brian Wilkerson
2797cf5367
Code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2265793002 .
2016-08-21 15:48:44 -07:00
Chris Bracken
5a936f26ea
Extract EmbedderRelatedTest to a utility file
...
This avoids importing all the embedder_test tests for tests where only
EmbedderRelatedTest is required. It also simplifies automatically globbing
utility code vs tests.
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2254313002 .
Committed: https://github.com/dart-lang/sdk/commit/8e35cbf413a25814bf3ebb4aea945a66156139a5
2016-08-18 13:38:34 -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
Konstantin Shcheglov
18b6c12f61
Rewrite SdkExtUriResolver into reflective.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2243493002 .
2016-08-11 09:28:59 -07:00
Brian Wilkerson
b888675b55
Move embedder locator and convert context builder to use the new API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2208503004 .
2016-08-04 10:41:53 -07:00
Brian Wilkerson
dc7fb35bd4
Refactor common portions of the two SDK implementations into a base class
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/2069483002 .
2016-06-16 08:57:32 -07:00
pq
fba5cbc425
Analyzer 0.27.4-alpha.9 (API fixes) ( #26562 ).
...
Restores `EmbedderUriResolver` API.
Addresses breakages in `dartdoc` and any other downstream dependencies.
See: https://github.com/dart-lang/sdk/issues/26562 .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2021453003 .
2016-05-29 06:57:42 -07:00
pq
53fe39137f
Embedder support refactoring (phase 1).
...
A bunch of changes to pave the way for emebdder SDK summary creation.
* Moves _embedder.yaml processing into the embedder SDK (out of the resolver).
* Changes EmbedderUriResolver to compose rather than extend a DartUriResolver.
* Fixes the wierd handling (dropping to add back) of `dart:` URIs.
* Fixes the incorrect overriding docs for `SDKLibraryImpl.shortName`.
* Updates embedder test to include a definition of `dart:core` in anticipation of adding some embedder SDK tests.
Some API work TODO in a follow-up CL (notably the way we check for the presence of embedders by querying the resolver is odd).
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2009303002 .
2016-05-25 10:52:53 -07:00
Brian Wilkerson
44836f8538
Support the name analysis_options.yaml for analysis options files
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1975963002 .
2016-05-13 07:33:06 -07:00
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