Commit Graph

68 Commits

Author SHA1 Message Date
Paul Berry 9556a95038 Fix string->bytes encoding in overlay_file_system
Change-Id: I2777c09908172c282f59cb2bf0ed5bd208442dd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-28 20:01:05 +00:00
Brian Wilkerson e43d81af5f Folders containing overlayed files should exist even if they do not exist on disk
Change-Id: I511b5075cb10b2594dce9dc33f165b64d9527043
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103565
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 20:47:46 +00:00
Brian Wilkerson 075ff39ed7 Attept to fix failing test on Windows
Change-Id: Ib1b94f0ddc2a45011782273c9d63c0a0dcb52ef2
Reviewed-on: https://dart-review.googlesource.com/c/87100
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-12 16:55:34 +00:00
Brian Wilkerson 68889c97ae Rework the file system tests so that most tests are shared
Change-Id: Ibeee593ebd3e240dca5ac86a50a3179d72c5ba61
Reviewed-on: https://dart-review.googlesource.com/c/86827
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-11 13:49:21 +00:00
Konstantin Shcheglov 79eb965d8f Replace FileContentOverlay with OverlayResourceProvider in AnalysisServer.
R=brianwilkerson@google.com

Change-Id: Ic2fc13f4eacd94471fc8dccc1102e6fdbe59342d
Reviewed-on: https://dart-review.googlesource.com/c/86785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-12-10 21:00:57 +00:00
Konstantin Shcheglov e223bd3628 Replace most of direct uses of MemoryResourceProvider with ResourceProviderMixin.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I87114418b63ef68665b9c3e487980a72db00ec6a
Reviewed-on: https://dart-review.googlesource.com/c/81744
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-27 17:50:10 +00:00
Brian Wilkerson 469e1e2e64 Remove unnecessary library directives
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 00:44:04 +00:00
Konstantin Shcheglov b6368c78fa Extract PhysicalResourceProvider watch tests and mark them flaky.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I3a203392acfb344dc5c88a815f6db15ccb3560f3
Reviewed-on: https://dart-review.googlesource.com/77460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-01 18:07:43 +00:00
Konstantin Shcheglov 85fb1f3de1 Fix Analyzer tests on Windows bot.
R=brianwilkerson@google.com

Change-Id: Ia43513d068a7676e8760efb87631cccd124b3c69
Reviewed-on: https://dart-review.googlesource.com/77265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-01 01:02:46 +00:00
Konstantin Shcheglov 25c659934a Change ResourceUriResolver to accept any file URI.
We don't really need to check that the corresponding resource is
a file. Now it is a file, or a directory, the moment later it is not.
We will try to read it, if we can - fine, if not - it does not exist.

This makes my Flutter analysis benchmark about 3% faster.

R=brianwilkerson@google.com

Change-Id: I955be276c7a694a408c70f8f2d47dce75594ebc8
Reviewed-on: https://dart-review.googlesource.com/77243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-29 17:23:00 +00:00
Konstantin Shcheglov 7298790ca6 Remove an invalid test from PhysicalResourceProviderTest.
TBR

This does not fix Windows bot, but I think will help for the Mac one.

Change-Id: I13d7914e60492e4865827e6c06359440aeeff29a
Reviewed-on: https://dart-review.googlesource.com/77221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-28 19:03:01 +00:00
Kevin Moore cb4a19b5fc misc(pkg/analyzer): update to latest pkg:matcher API
Change-Id: I42a5c41394226f6ddc9c0608c6d688ae683ffdea
Reviewed-on: https://dart-review.googlesource.com/62680
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-06-27 19:29:20 +00:00
Brian Wilkerson 165c57ffd7 Attempt to fix the windows bot 3
Change-Id: I4e5803f6c77f30cc82e0a2a4981df18aaba10291
Reviewed-on: https://dart-review.googlesource.com/60981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-19 17:06:38 +00:00
Brian Wilkerson 4a353fea35 Another attempt to fix tests on Windows
Change-Id: I7c1c12ec3b9244d52633bc46a115e1b9e51dc87b
Reviewed-on: https://dart-review.googlesource.com/60821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-19 00:23:59 +00:00
Brian Wilkerson 1dcc3264e7 Fix tests that are failing on Windows
Change-Id: Id7182df3f08078f0e6c1959db94cf2da0bebd995
Reviewed-on: https://dart-review.googlesource.com/60680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-18 17:07:11 +00:00
Brian Wilkerson afa8ff6292 Add a resource provider that supports file overlays
Change-Id: If09447d2bf50c69e007bf1953461ee16c46c7ab4
Reviewed-on: https://dart-review.googlesource.com/60406
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-15 19:28:29 +00:00
Brian Wilkerson f6d2c2378a Add awaits in async methods to restore previous semantics
Change-Id: I7711cd878a31df0fb0c92572e2256c0a26923640
Reviewed-on: https://dart-review.googlesource.com/59480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-08 19:58:07 +00:00
Brian Wilkerson 7054d92a02 Remove some classes from the analyzer public API
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-24 15:28:15 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Konstantin Shcheglov 5450d917fe Fix PhysicalResourceProvider tests on Windows.
R=brianwilkerson@google.com

Bug:
Change-Id: I3665041840081e6d4889487249bf4b7d09be652b
Reviewed-on: https://dart-review.googlesource.com/7846
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-22 21:20:14 +00:00
Konstantin Shcheglov 50c964b819 Add option for AnalysisDriver to use KernelDriver and KernelResynthesizer.
Run NonErrorResolverTest_Driver tests with this option enabled.
We fail 163 out of 478 tests, or 35%.

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

Bug:
Change-Id: Iac6154a14a1357fe239b0140f9f66de792825693
Reviewed-on: https://dart-review.googlesource.com/6340
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-18 02:09:14 +00:00
Devon Carew 2b3b0272c4 Switch to using specific throws calls instead of general throwsA() calls.
Bug:
Change-Id: Id604dca1b8c3060c1d12c9ed0b1493771d2eb0d6
Reviewed-on: https://dart-review.googlesource.com/5883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2017-09-14 18:04:44 +00:00
Brian Wilkerson f645c34bb0 Add support for copying directory structures
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2733053002 .
2017-03-06 08:51:40 -08:00
Konstantin Shcheglov 891e709c5f Add File.lengthSync to use it for FileByteStore eviction.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2490023003 .
2016-11-10 13:31:06 -08:00
Brian Wilkerson 1a893edb82 Add prefix to path import to work around breaking change
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2411423003 .
2016-10-13 08:29:09 -07: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
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 b83ca4f8dc Fix context comparisons
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2397813002 .
2016-10-05 09:57:53 -07:00
Brian Wilkerson db73915c77 More fixes for testing under windows
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2393663002 .
2016-10-04 13:11:57 -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
Brian Wilkerson 3a6d80780b Add support for resolving symbolic links
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2270593003 .
2016-08-23 09:39:48 -07:00
Brian Wilkerson 17ffa1e9c0 Add writeAsStringSync (issue 27109)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2265593002 .
2016-08-19 12:17:13 -07:00
Konstantin Shcheglov 9f187f3df5 Normalize paths in PhysicalResourceProvider.getFile()/getFolder().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2239303004 .
2016-08-12 11:04:02 -07:00
Brian Wilkerson c03b85d418 Add a toUri method to Resource
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2165843002 .
2016-07-20 08:53:03 -07:00
Konstantin Shcheglov ed887c09d1 Validate cache consistency asynchronously. Compute modification times of physical files in a separate isolate.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2132073003 .
2016-07-08 15:01:05 -07:00
Jaime Wren 7f244c8d39 Deprecate FileUriResolver and RelativeFileUriResolver in source_io.dart, replace the usages with ResourceUriResolver(PhysicalResourceProvider.INSTANCE).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2060263006 .
2016-06-16 11:14:03 -07:00
Konstantin Shcheglov d2e3078321 Add Resource.delete() method.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2067613002 .
2016-06-13 13:00:06 -07:00
Konstantin Shcheglov cb428694d3 Add Folder.getChildAssumingFile().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2058163002 .
2016-06-10 10:37:43 -07:00
Paul Berry 9e52ab17e0 Consolidate duplicate code for resloving URIs.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1831133005 .
2016-03-25 10:37:36 -07:00
Konstantin Shcheglov 561f6f5bed Add File.renameSync() to virtual file system.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1808213004 .
2016-03-17 12:50:21 -07:00
Konstantin Shcheglov 45711829f6 Add File.readAsBytesSync/writeAsBytesSync() methods.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1811643002 .
2016-03-16 11:21:59 -07: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 f464e2eddb Use AbsolutePathContext in Folder.contains().
This makes MDL analysis about 5% faster, from 5900 samples to 5600 samples.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1444943003 .
2015-11-15 09:33:16 -08:00
Konstantin Shcheglov ebdfa991d4 Issue 24538. Route SDK results into SDK context DartWorkManager.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24538

Review URL: https://codereview.chromium.org/1399873002 .
2015-10-09 21:45:35 -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
Brian Wilkerson 6359735d93 Disable flaky test under Windows (and fix formatting from an earlier CL)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1287513002 .
2015-08-10 13:32:07 -07:00
Brian Wilkerson fa80ca52e9 Revert a work-around that is now causing bot failures
R=danrubel@google.com

Review URL: https://codereview.chromium.org//1282873002 .
2015-08-10 12:06:27 -07:00