Commit Graph

99 Commits

Author SHA1 Message Date
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
Konstantin Shcheglov 818c4b5bfd Remove AbsolutePathContext and use package:path instead.
I see however that linter/test/rule_test.dart uses it, but as far as I
can see, that's it. All other usages are from analyzer and
analysis_server.

R=brianwilkerson@google.com

Change-Id: I2b82870a4a4ec6f155326d8ee6dc1c1028f84793
Reviewed-on: https://dart-review.googlesource.com/52265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-20 21:01:06 +00:00
Devon Carew 3a5fcf5a87 Upgrade the dep on package:isolate.
Change-Id: Ie9c52c6dd24672e2469787220505bd85a50ed5ff
Reviewed-on: https://dart-review.googlesource.com/51241
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-04-16 17:08:48 +00:00
Brian Wilkerson e2ee654cd1 Make a method in MempryResourceProvider private
Change-Id: Iae42ab38e3ae379fa015fbbd5c0341f6539996db
Reviewed-on: https://dart-review.googlesource.com/51060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-12 22:04:16 +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 d9a44c9dc7 Revert "Normalize Windows drive letters to uppercase for analysis"
This reverts commit 56acaee9b1.

See https://github.com/dart-lang/sdk/issues/32186

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

Change-Id: I76c673758e4b9acd22044985b4054b5504f4a205
Reviewed-on: https://dart-review.googlesource.com/41902
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-15 22:10:56 +00:00
Danny Tuppeny 56acaee9b1 Normalize Windows drive letters to uppercase for analysis
This fixes #32095, ~~however I'm currently unable to get the tests running locally. I'll continue to work on that, but I'm hoping that creating a PR runs all the tests on CI so we should at least get to see if this (legitimately) broke anything in the meantime?~~

Turns out this also fixes #32042! I can't run the latest analyzer code against a version of the SDK that the flutter_tools is happy with, however I rolled my analyzer code back to `2.0-dev.22` and repro'd this error, then applied the same changes from this PR to that version, and the errors went away.

Turns out to also fix #28895!

@bwilkerson

Closes #32133
https://github.com/dart-lang/sdk/pull/32133

GitOrigin-RevId: 94cc37479214beaf1c8e3e2befa9bef882dbcd5d
Change-Id: I32a5ce52c7b28e1d484c1e5e9a9dd6d64c2b1b3b
Reviewed-on: https://dart-review.googlesource.com/40720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-13 19:36:36 +00:00
Lasse R.H. Nielsen 736e310ed5 Reapply "Simplify logic for creating a single IsolateRunner in analyzer."
This reverts commit 83de2423ae.

Reason for revert: Error causing the revert did not seem to be related to this change anyway.

Original change's description:
> Revert "Simplify logic for creating a single IsolateRunner in analyzer."
> 
> This reverts commit 7867fed521.
> 
> Reason for revert: 
> Type error caught by DDC where the type of the function passed to isolate.run isn't what the runner expects.
> 
> Original change's description:
> > Simplify logic for creating a single IsolateRunner in analyzer.
> > 
> > Change-Id: I8583f9947fde8f4cf87d7feb64c8eb170a19e81d
> > Reviewed-on: https://dart-review.googlesource.com/6941
> > Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> 
> TBR=lrn@google.com,scheglov@google.com
> 
> Change-Id: I5a0e46e345673dee447fd848c064dd0039832fb1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/7280
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,scheglov@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ic3793a85d979b695dc62bafd19c490aa24547682
Reviewed-on: https://dart-review.googlesource.com/8060
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-09-26 12:26:10 +00:00
Lasse R.H. Nielsen 83de2423ae Revert "Simplify logic for creating a single IsolateRunner in analyzer."
This reverts commit 7867fed521.

Reason for revert: 
Type error caught by DDC where the type of the function passed to isolate.run isn't what the runner expects.

Original change's description:
> Simplify logic for creating a single IsolateRunner in analyzer.
> 
> Change-Id: I8583f9947fde8f4cf87d7feb64c8eb170a19e81d
> Reviewed-on: https://dart-review.googlesource.com/6941
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

TBR=lrn@google.com,scheglov@google.com

Change-Id: I5a0e46e345673dee447fd848c064dd0039832fb1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/7280
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-09-20 11:05:28 +00:00
Lasse Reichstein Holst Nielsen 7867fed521 Simplify logic for creating a single IsolateRunner in analyzer.
Change-Id: I8583f9947fde8f4cf87d7feb64c8eb170a19e81d
Reviewed-on: https://dart-review.googlesource.com/6941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-20 09:14:59 +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
Konstantin Shcheglov 5517f356c8 Check for null in _getStandardStateLocation().
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/3006023002 .
2017-09-01 09:07:51 -07:00
P.Y. Laligand 59516d9794 Added an analysis server argument to set the location of the session cache. (#30583) 2017-08-31 10:25:50 -07:00
Devon Carew f6f845c879 Fix a completion exception during import suggestions.
BUG=
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2862793002 .
2017-05-04 09:24:18 -07:00
Konstantin Shcheglov 9dd0668ae2 Fix for DirectoryWatcher.handleError() closure signature.
I missed the fact that the closure must have either one, or two arguments,
I see failures at runtime in internal logs.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2782463003 .
2017-03-28 09:42:36 -07: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
danrubel 4ca5ac929a fix MemoryResourceProvider context on Windows
On Windows, the MemoryResourceProvider.convertPath method
prefixes the path with the C: drive, but the context associated with
the MemoryResourceProvider has a drive letter based upon the underlying
current directory. Most of the time, these two drive letters are the
same, but sometimes, such as on the Windows bot, the current working
directory is on drive E:, rather than drive C:.
This causes package Uris to be mapped to drive E: rather than the
expected drive C:

This CL changes the MemoryResourceProvider constructor
to set the current working directory to C:\ when running on Windows
so that it aligns with MemoryResourceProvider.convertPath.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2714373002 .
2017-02-26 13:30:42 -08:00
danrubel 940fe975a8 Revert "debug MemoryResourceProvider on Windows"
This reverts commit a0ec77e383.

Review-Url: https://codereview.chromium.org/2716153002 .
2017-02-26 08:50:09 -08:00
danrubel a0ec77e383 debug MemoryResourceProvider on Windows
Review-Url: https://codereview.chromium.org/2719793002 .
2017-02-26 08:23:18 -08:00
Konstantin Shcheglov 81b725aa3f Filter out 'FileSystemException: Failed to watch path' from _PhysicalFolder.changes.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2660703002 .
2017-01-27 13:23:01 -08:00
Konstantin Shcheglov aaaeee5bc4 Make MemoryResourceProvider.convertPath() work with partially posix paths.
So that 'C:\some\path/to/file.dart' -> 'C:\some\path\to\file.dart'.

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

Review URL: https://codereview.chromium.org/2542793003 .
2016-12-01 08:39:44 -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 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