Konstantin Shcheglov
51950ab881
Add Resource.parent2 that returns non-null Folder, add Folder.isRoot
...
A bigger version of than https://dart-review.googlesource.com/c/sdk/+/184381
This is breaking change, so we do this in steps.
Change-Id: I0c7212a073b605ade56657036543c604651810c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184581
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-12 19:09:20 +00:00
Konstantin Shcheglov
9f986d2501
Migrate package:analyzer to null safety.
...
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2021-02-01 18:56:04 +00:00
Konstantin Shcheglov
f3fba2eeb5
Fix _PackageMapUriResolverTest on Windows.
...
Change-Id: Id53c541bf681ccd2f035bc64e733f976bef98af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-10 17:39:47 +00:00
Konstantin Shcheglov
fd60cbc21f
Issue 42190. Fix PackageMapUriResolver and path with non-ASCII characters.
...
Bug: https://github.com/dart-lang/sdk/issues/42190
Change-Id: I4a5fea9f808a08d547b7b6e97ba8b93ee9dd16e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-09 16:32:16 +00:00
Konstantin Shcheglov
54b7543c55
Fix unnecessary_const in analyzer.
...
The only non-mechanical change is update for tool/diagnostics/generate.dart
to handle MethodInvocation, because without resolution and without
explicit `new` and `const` we get MethodInvocation(s).
R=brianwilkerson@google.com
Change-Id: Ib89ce9c37066e9b27ad03aed96b349ef36f11d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127453
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 15:03:00 +00:00
Konstantin Shcheglov
364dd8936b
Fix unnecessary_new in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 01:11:30 +00:00
Brian Wilkerson
5f0de26d48
Clean up the remaining copyright notices
...
Change-Id: If099be4f71ba551df0dc3d69815ae6a9f55d1eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-24 20:11:28 +00:00
Konstantin Shcheglov
9c585bf5df
Document that ResourceProvider requires absolute, normalized paths, and enforce this.
...
This allows us to avoid performing normalization, and work with paths
as is. So, this speeds up SourceFactoryImpl.restoreUri() from 7.5% to 3.7%
R=brianwilkerson@google.com
Change-Id: I085f3db40af6543fbb524a82fad48aa051e87937
Reviewed-on: https://dart-review.googlesource.com/77017
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-28 17:18:49 +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
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
Devon Carew
b12d010064
Remove the use of deprecated package:test API.
...
Bug:
Change-Id: I671678117f72efac5efd60d7b4e459dffcce47c6
Reviewed-on: https://dart-review.googlesource.com/5542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-13 21:55:00 +00:00
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
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
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
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
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
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
Brian Wilkerson
908708d655
More fixes for failures on the Windows bot
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
Konstantin Shcheglov
4936eb8d5d
Fix for 'Create part' Quick Fix.
...
1. NonExistingSource.modificationStamp should return -1.
2. NonExistingSource.fullName should be always an absolute path, not a URI.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1135073004
2015-05-18 11:55:23 -07:00
scheglov@google.com
9534f300c2
ReApply: Issue 23133. Fix for restoring 'package:' uris on Windows.
...
There was a bug in the previous version https://codereview.chromium.org//1070203002
We used system path context instead of the one from the given ResourceProvider.
So, it worked, but was failing tests on Windows, because we always use posix style.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23133
Review URL: https://codereview.chromium.org//1051273007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45069 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 15:27:07 +00:00
ricow@google.com
88a0451f5a
Revert "Issue 23133. Fix for restoring 'package:' uris on Windows."
...
This reverts revision 45023
It is my strong suspicion that this is causing the redness here:
http://build.chromium.org/p/client.dart/builders/pub-win-russian-be/builds/3729/steps/pub%20and%20pkg%20%20tests%20failures/logs/stdio
R=scheglov@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//1073993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45049 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 05:55:53 +00:00
scheglov@google.com
1be249945b
Issue 23133. Fix for restoring 'package:' uris on Windows.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23133
Review URL: https://codereview.chromium.org//1070203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45023 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-09 18:23:42 +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
88e19fcb6e
When converting files to package URI's, favor longer directory matches.
...
Longer directory matches in mean that the relative path part of
the package URI will be shorter, making it more likely to match
user intent.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//953863004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44025 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 18:04:09 +00:00
paulberry@google.com
2b6e5b5f68
When translating from file to URI, make sure translation is reversible.
...
BUG=dartbug.com/22555
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//935453007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44003 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 22:15:39 +00:00
brianwilkerson@google.com
0e73ada9c2
Use package: URIs for files in lib
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//914373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43827 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 22:47:34 +00:00
scheglov@google.com
658d3e949e
Check PackageMapUriResolver constructor arguments.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//887943004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43405 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 16:06:25 +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
brianwilkerson@google.com
35b13e0885
Make constant lists immutable
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//730783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41757 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:33:57 +00:00
scheglov@google.com
c5263aae9f
Breaking changes in 'analyzer' package.
...
1. Source.uri added.
2. DartSdk.fromEncoding() replaced with fromFileUri().
This CL cannot be committed as is until pkg/code_transformers is fixed.
R=brianwilkerson@google.com , sigmund@google.com
BUG=
Review URL: https://codereview.chromium.org//428303004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38949 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 20:41:42 +00:00
scheglov@google.com
57b5c62818
Test for the 'importing a package library' fix.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//426793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38653 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 22:18:14 +00:00
scheglov@google.com
4a47ef63f5
Move PackageMapUriResolver into analyzer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//422973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38650 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 21:09:58 +00:00