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
Dan Rubel
f550b8d76e
add file watching support
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1191933004 .
2015-06-20 15:03:14 -04:00
brianwilkerson@google.com
81e474c43e
Clean up many generated constructors
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1131423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45676 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 19:06:12 +00:00
brianwilkerson@google.com
0491a6ff6b
More comment clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1021723008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44670 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 16:06:20 +00:00
scheglov@google.com
5c9110841e
Fix hints in the analyzer package.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1026093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44639 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 17:34:00 +00:00
scheglov@google.com
5432c74cd6
Add readAsStringSync() to File.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1007233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44506 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 15:01:52 +00:00
scheglov@google.com
339476c61f
Wrap dart:io exception in getChildren(), implement for the memory FS.
...
...for consistency.
Plus tests.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//989393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44358 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 04:30:56 +00:00
scheglov@google.com
60d4a29500
Fix for subscribing for notifications for files in packages.
...
Unfortunately this fix makes the server about 20% slower.
This is mostly because of the check in scheduleNotificationOperations(),
as required to fix dartbug.com/22210. I think it is much cheaper to send
duplicate notifications, like outline or navigation, than to check if
they should not be sent.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//987663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44305 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 22:55:20 +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
scheglov@google.com
1a7ac64ae2
Don't remove indexing operations on potential source changes.
...
This covers the following scenario:
1. User performs an undo operation in a save editor.
2. Editor updates the file buffer, so sends 'add overlay'.
Server performs an incremental analysis and schedules an 'analyze' operation.
3. The 'analyze' operation runs and schedules 'index' operation.
4. Editor saves the file buffer.
Editor sends 'remove overlay command'.
Server removes all the scheduled notification and index operations for the file.
Server notices that there is no real change for the file, so the is nothing to do.
But it still reschedules notifications, because the client might have lost some information.
5. Notifications are resent, but indexing is not performed.
So, the solution is to reschedule indexing operation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//958373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44111 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 01:34:56 +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
scheglov@google.com
279bdb7ec0
Add File.modificationStamp accessor.
...
Dan, I noticed that you're using createSource().modification stamp to access this information.
So, we need a more direct way to get it.
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//940313003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43968 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 18:40:09 +00:00
brianwilkerson@google.com
4468038300
Rework requests in execution domain
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//904733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43556 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 15:49:44 +00:00
brianwilkerson@google.com
890c99238c
Make source be a target
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//882813007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43355 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 17:08:28 +00:00
jwren@google.com
252c19c920
Addition of the new flag "file-read-mode" into the analysis server to fix the offset bug with IntelliJs integration.
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//857283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43028 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 21:48:00 +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