Commit Graph

77 Commits

Author SHA1 Message Date
Brian Wilkerson cc7eeb9611 More test clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2402883002 .
2016-10-09 16:32:07 -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 8a3d8eee67 Add BazelWorkspace and move BazelFileUriResolver to it.
R=brianwilkerson@google.com, jwren@google.com
BUG=

Review URL: https://codereview.chromium.org/2393813003 .
2016-10-05 18:08:07 -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 154bd389db Fix some failures on the windows bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2392793003 .
2016-10-04 08:21:28 -07:00
Brian Wilkerson 29c5c9985e Remove JavaFile.pathContext
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2386123004 .
2016-10-03 19:28:49 -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 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
Konstantin Shcheglov c1cd58ce29 Issue 27243. Don't attempt to read Windows device drivers.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27243

Review URL: https://codereview.chromium.org/2324513002 .
2016-09-07 13:00:08 -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
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -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
Brian Wilkerson 910b2ba016 Convert resource providers to use FileSource
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2245133005 .
2016-08-16 20:10:59 -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 b7aff9c72f Initial Bazel file resolver support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2079873002 .
2016-06-17 14:20:55 -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
Brian Wilkerson f183ec3a45 Fix equality between subclasses of Source
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2050083002 .
2016-06-09 07:42:32 -07:00
Brian Wilkerson 24d23680d1 Use null-aware operators to clean up the code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1933763002 .
2016-04-29 08:48:12 -07:00
Brian Wilkerson e531f01e73 Fix more strong mode errors in analyzer
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1847633002 .
2016-03-31 13:30:04 -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
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
pq 9ea17184ad Add @overrides to (a lot of) analyzer.
This gets us roughly half+ way there.  We should defintely consider automating this to speed up the rest.  (Even with the quick-fix it's VERY tedious and slow going.)

Once we've done this in bulk, I'd like to add the  `annotate_overrides` lint to analyzer and server `.analysis_options`.

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

Review URL: https://codereview.chromium.org/1749143003 .
2016-03-01 16:33:20 -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
Paul Berry 3dcef185d6 Fix newline normalization in _PhysicalFile.readAsStringSync().
Most clients of _PhysicalFile read the file by translating it into a
Source object using createSource() and then reading it using
FileBasedSource.contentsFromFile, which normalizes newlines using
FileBasedSource.fileReadMode.

However, a few clients read the file directly using
_PhysicalFile.readAsStringSync(), which wasn't doing the
normalization.  This CL adds the normalization to that code path.

One such client was the code generation logic for summaries; this
caused code generation to produce different results on Windows, which
led to a test failure.

Fixes #25470.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1584313010 .
2016-01-15 12:54:22 -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 e48f962af1 Validate that root paths are absolute and normalized.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25203

Review URL: https://codereview.chromium.org/1511833004 .
2015-12-09 15:05:22 -08:00
Brian Wilkerson 86216e5154 Consistently use implements when one interface inherits from another interface
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1481273002 .
2015-11-30 07:58:10 -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
Brian Wilkerson 24b24a3569 Reformat code to reduce churn
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1322513004 .
2015-09-09 08:19:41 -07:00
danrubel c1992fa5d7 modify MemoryResourceProvider to support windows pathContext for testing #24000
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1318813007 .
2015-08-31 14:53:16 -04: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
pq 587697ea02 Ensure actual URIs are properly processed.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1262213002 .
2015-07-29 13:16:15 -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
Brian Wilkerson bc265ebe28 Implement support for watching directories containing implicitly analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1244613004 .
2015-07-20 09:04:37 -07:00
pq 01af0560bb Package map source factory support [FIXED].
A rework of https://codereview.chromium.org/1206323005/ with better handling of the case where a .packages config file is not specified.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1223833008 .
2015-07-07 09:10:54 -07:00
pq bb196a27fc Revert "Package map source factory support."
This reverts commit e3a4ff55d7.

BUG=

Review URL: https://codereview.chromium.org//1228493003.
2015-07-06 11:45:32 -07:00
pq e3a4ff55d7 Package map source factory support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1206323005.
2015-07-06 11:13:17 -07:00
Paul Berry db6c95502a Work around naming conflict in analyzer's Resource class.
Commit f8ce36df55 introduced an SDK
class called "Resource", causing warnings to appear in any files that
reference the analyzer class with the same name.  (Fortunately there
was no regression in functionality since the spec requires the name
conflict to be resolved in favor of the definition that is outside the
SDK).

As a short term workaround to avoid the warnings, we are explicitly
importing 'dart:core' and hiding the new Resource class.  In a future
CL, we plan to rework analyzer's Resource class in order to make some
changes necessary for ".packages" file support; when that happens we
will probably rename the class to avoid the name conflict.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1215753003.
2015-06-26 13:00:44 -07:00
Lasse R.H. Nielsen f8ce36df55 Add Resource class. Currently unimplemented.
R=herhut@google.com, iposva@google.com

Committed: https://github.com/dart-lang/sdk/commit/2890a7a2a94ff54c7c0050e69c40ca6a60a28474

Review URL: https://codereview.chromium.org//1181663002.
2015-06-26 11:42:02 +02: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