Commit Graph

172 Commits

Author SHA1 Message Date
Jens Johansen 88db201efc [analyzer] Replace pathContext.relative inside LocatedGlob.matches
Comparing a before and an after aot-compiled analysis server,
running each 25 times, via `pkg/front_end/tool/benchmarker.dart`:

```
out/ReleaseX64/dart pkg/front_end/tool/benchmarker.dart \
  --iterations=25 \
  --snapshot=pkg/analysis_server/bin/server.aot.1 \
  --snapshot=pkg/analysis_server/bin/server.aot.2 \
  --arguments="--disable-file-byte-store" \
  --arguments="--train-using" \
  --arguments="pkg/front_end/lib/"
```

(where `server.aot.1` is an aot-compile without this CL and
`server.aot.2` is an aot-compile with this CL) gets this result:

```
msec task-clock:u: -5.2977% +/- 0.4313% (-466.26 +/- 37.96) (8801.11 -> 8334.86)
page-faults:u: -2.5748% +/- 0.1648% (-4094.76 +/- 262.07) (159032.16 -> 154937.40)
cycles:u: -5.5212% +/- 0.4440% (-2034156211.44 +/- 163567376.21) (36842412971.36 -> 34808256759.92)
instructions:u: -8.2456% +/- 0.0556% (-4125031082.64 +/- 27819990.07) (50026884750.04 -> 45901853667.40)
branch-misses:u: -4.2637% +/- 2.0984% (-5839704.08 +/- 2873998.26) (136961902.80 -> 131122198.72)
seconds time elapsed: -5.2895% +/- 0.4311% (-0.47 +/- 0.04) (8.82 -> 8.35)
seconds user: -5.5473% +/- 0.5002% (-0.47 +/- 0.04) (8.46 -> 7.99)
Scavenge(   new space) goes from 152 to 134
MarkSweep(   promotion) goes from 15 to 14
Notice combined GC time goes from 2804 ms to 2707 ms (notice only 1 run each).
```
Change-Id: Ib5070b3c037b30f96bb91b3536d85b85ebe0c30c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-05-16 01:28:25 -07:00
Sam Rawlins c4c9854b9b analyzer_testing: Move ResourceProviderMixin to analyzer_testing
Work towards https://github.com/dart-lang/sdk/issues/55660

Change-Id: I31932409e495369793dd16c017385c98b86cf44c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427480
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-09 16:56:29 -07:00
Sam Rawlins 739ca671af Deprecate MemoryResourceProvider.convertPath in favor of extension
Work towards https://github.com/dart-lang/sdk/issues/55660

The comment for `MemoryResourceProvider.convertPath` includes:

> This is a utility method for testing; paths passed in to other
> methods in this class are never converted automatically.

and indeed, the actual impl of this method is found in an extension,
in analyzer's test_utilities/ directory. It seems to me better to
leave a testing utility as a testing utility, and not expose it in
the public API of MemoryResourceProvider.

Additionally, the extension method is used by `ResourceProviderMixin`,
which is moving to the public analyzer_testing package. It is illegal
to have a circular non-dev dependency between the analyzer package
and the analyzer_testing package.

The migration for the ~half dozen test files that use this method is
to call the extension method directly. Sometimes with an extension
override, and sometimes without.

Change-Id: I9c2e18600461134bfd91c082b3af0d5079600f0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426984
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-07 13:10:03 -07:00
Konstantin Shcheglov becd91df17 Format analyzer/ with tall mode.
Change-Id: I410cd1cf63fbf00b868bbb3e060433cad3ac9e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-04-21 12:15:58 -07:00
Sam Rawlins 998cd101b8 analyzer: Correct comment references in some source files
This corrects about 40 of 220 comment_references issues in the analyzer
package.

In correcting the `experimentStatusToStringList` function, I see that
it is unused.

Change-Id: I0c2ec602262121337e7305797596fac9df987973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-10-29 21:38:34 +00:00
Konstantin Shcheglov cf1f2e53a3 Breaking changes for analyzer version 7.0.0
Change-Id: Id6e329c7665d1dca1920d744dd7d0e9722da768c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-21 21:32:28 +00:00
Konstantin Shcheglov 7ae9900059 CQ. Deprecate File.createSource()
Change-Id: I222989d1ef915f7f14d7a3f36eab614a163faec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-13 21:11:39 +00:00
Konstantin Shcheglov 73cd7c6439 CQ. Deprecate exports from package:analyzer/src/source/source.dart
Change-Id: I6256ad2a8472636fd39a9db7e0360f8d7104da0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369560
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-11 22:49:51 +00:00
Konstantin Shcheglov 1b9cc28879 CQ. Make FileSource API, move to lib/source.
Change-Id: I981d3f0904917ada322ca06448f03ff33ae1f095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369360
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-06-03 00:36:59 +00:00
Konstantin Shcheglov b2329f92c0 CQ. Stop exporting src/file_system/file_system.dart
Change-Id: Idbd9f8ff36ebf339bf62e4a0c3d4d42009913d60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-31 14:55:02 +00:00
Konstantin Shcheglov 0ef8f05c6c Fix 'unnecessary_final' in analyzer/.
But don't enable it yet, pending https://github.com/dart-lang/linter/issues/4938

Change-Id: I42df6e5c2699b08d729518c0565165d81e07ad3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-04-16 21:46:15 +00:00
Konstantin Shcheglov f9d4df6331 CQ. Enable avoid_redundant_argument_values in analyzer/
Change-Id: I8e5f5f6629249d1fdfddcfe87d20680b37198765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-02-26 19:55:13 +00:00
Paul Berry 9d39c79471 Change packages analyzer and _fe_analyzer_shared to use language version 3.2.
This will allow these packages to take advantage of private field
promotion.

Change-Id: I35dc57ecd7a0c3afde4713cd60aca86b479393a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351162
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-09 14:19:30 +00:00
Danny Tuppeny 69eb4e3532 [analyzer]/[analysis_server] Simplify reusing MockPackagesMixin and ConfigurationFilesMixin with non-memory resource providers
Change-Id: I0663ede821140a58fe7195603ec125d3bf9a2eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350381
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-06 22:38:50 +00:00
Danny Tuppeny 2bf9fefa90 [analyzer] Move convertPath from MemoryResourceProvider to an extension
+ make the implementation of ResourceProviderMixin methods not depend on MemoryResourceProvider.

This is a step towards being able to share more code between tests that use different kinds of ResourceProviders. Although ResourceProviderMixin  currently still has a MemoryResourceProvider, all of the methods themselves can work against any ResourceProvider.

convertPath was moved to an extension in test_utilities (rather than to the base ResourceProvider) because it seems quite test-specific (it assumes any absolute paths are relative to drive C - something we'll need to update to use for non-memory tests.

Change-Id: Ibb3cfb31ebbdac6410868f0395bd19f9ce7b0e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 19:16:23 +00:00
Danny Tuppeny 63772f10fe [analyzer] Ensure watchers can be subscribed to more than once
The stream created by memory resources was a single-subscriber stream. The stream from the physical file system watchers was a broadcast stream, but the code to translate FileSystemException to the abstractions was written in a way that made it single-subscriber.

This fixes both to ensure that a `ResourceWatcher` can support multiple subscribers that can subscribe and cancel at different times.

We don't currently use this, so this change should effectively be a no-op right now, but it will allow us to reuse the temporary catchers we create when set up analysis roots instead of creating new ones.

There's an issue at https://github.com/dart-lang/sdk/issues/54274 discussing changing how we watch here, but it may still be worth picking the low-hanging fruit in the short-term.

Change-Id: I3bda77ddaee676c573021aa671cb01bae48bd56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-19 16:53:59 +00:00
Sam Rawlins 73ab31b98a analyzer: Move the Source class to be public API.
Deprecate accessing LineInfo, Source, or SourceRange via the
old library (pkg/analyzer/lib/src/generated/source.dart).
Migrate all SDK code to the new library.

Fixes https://github.com/dart-lang/sdk/issues/46420

Change-Id: Ic7c98a5820415c92a457f9fa2756351b05520cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-14 17:10:37 +00:00
Martin Kustermann 81df36216f Make utf8.encode() have Uint8List return type
Right now `utf8.encode()` has a static return type of `List<int>`
due to extending `Encoding` (which extends `Codec<String, List<int>>`).

We cannot easily change `Encoding` to extend `Codec<String, Uint8List>`
because that would also change `utf8.decode()` to require `Uint8List`
which would be a breaking change.

So instead we override `utf8.encode()` to have more precise return type.

Some parts of our SDK are run using the checked-in SDK, so it cannot
rely on the changed return type yet (until checked-in SDK is rolled).

So we use `const Utf8Encoder().convert()` as a temporary change, as
that already has `Uint8List` return type.

Issue https://github.com/dart-lang/sdk/issues/52801

TEST=ci

CoreLibraryReviewExempt: More precise return type for existing API
Change-Id: I2861d1f0eb3d292d8e3ec8437c0d441a2d2bd193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254903
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-07-11 08:54:33 +00:00
Danny Tuppeny 2c321ea2a1 [analyzer] Ensure wrapped watcher streams are cancelled when subscriber cancels
Fixes https://github.com/dart-lang/sdk/issues/51746.

Change-Id: If5e98eef60c9404378c7bbb050fcfbe6a6d807f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289080
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-15 21:25:06 +00:00
Danny Tuppeny e231f12420 [analysis_server] Don't endlessly rebuild analysis contexts on PathNotFound errors
Fixes https://github.com/Dart-Code/Dart-Code/issues/4280.

Change-Id: I8f36672dfd5fcca2e4be87408d385219b0a81d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-02-28 20:27:43 +00:00
Konstantin Shcheglov f0a07ac120 Enforce use_super_parameters in analyzer/.
Change-Id: I92a002d69a10b83b9600455156a43c1592439477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-19 19:36:41 +00:00
Konstantin Shcheglov 139385c615 Breaking changes for analyzer version 4.0.0
Change-Id: I26961f29f9171e94db2f5c95f1f8af5fd01bb9b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-07 06:52:27 +00:00
Sam Rawlins d5cc53a1b8 Prefer for-loop over forEach; other little fixes
These linter fixes help prepare analyzer for lints 2.0.0

Change-Id: Ic942fa367965edac479b917cbbb601b30da8b53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237766
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-03-18 03:37:47 +00:00
Konstantin Shcheglov d72934449f Deprecate 'Resource.parent2', use 'parent' instead.
Change-Id: Icf3cefa8061543a3965e1eedab4b57bb6c67c920
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 22:11:23 +00:00
Konstantin Shcheglov 9d63d22455 Add @Deprecate for implementations of watch().
Change-Id: I0d00d9d068f25b7678857e3afc766cb854a3f2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 21:27:33 +00:00
Konstantin Shcheglov a43a3fec98 Improve null safety in _MemoryResource.watch()
Change-Id: Ia641aa5a1e8475206bc0fdbf90ef9c202a0ea91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228780
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-19 16:44:06 +00:00
Danny Tuppeny 9d2b31ab72 [analysis_server] Improve comments for watch/events on File and Folders
Change-Id: Ied0369420651604aeaa44f0052172e868cbd6fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228561
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-18 17:29:56 +00:00
Danny Tuppeny 650b9627b7 [analysis_server] Rebuild analysis contexts if changes occur between creation and watchers being ready
See https://github.com/Dart-Code/Dart-Code/issues/3438.

Change-Id: I3ca038d8c878b118a465b6f230c62912d63990eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222763
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-15 00:18:41 +00:00
Konstantin Shcheglov f317d7c1db Breaking changes for analyzer version 3.0.0
Internal presubmit:
https://fusion2.corp.google.com/presubmit/tap/366560067/OCL:366560067:BASE:415321249:1639080094301:ae113907

Change-Id: Idf9cb7d98f490409bec4eab8833b95328ece9e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212610
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-09 23:07:19 +00:00
Konstantin Shcheglov ab55396c25 Remove FileBasedSource, deprecate source_io.
Change-Id: I42c79a1c46711a9427d8716df91cd6980f0c57c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-19 19:07:37 +00:00
Konstantin Shcheglov 1edcd482f3 Use Uint8List in ResourceProvider(s).
Change-Id: I0f0d3af1d196117c3e722013eb708af27130269e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216278
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-10-12 21:04:13 +00:00
Konstantin Shcheglov 31a04e775d Remove the path from the file read exception message.
Change-Id: Ic43ce2132344fd64bdff31fd1105796cb6204847
Bug: https://buganizer.corp.google.com/issues/200468974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 16:53:07 +00:00
Konstantin Shcheglov 45bfa70348 Put the path back into file not found exception.
Its absence causes a dartdoc test failure.

Bug: https://github.com/dart-lang/sdk/issues/47220
Bug: https://buganizer.corp.google.com/issues/200468974
Change-Id: I0fe8af902cd9a11abb0102ce4744c57f1738ab5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 18:39:27 +00:00
Konstantin Shcheglov 28738dfad0 Store data objects for File/Folder in MemoryResourceProvider.
And by storing the list of child names in a folder we can implement
Folder.getChildren() more efficiently.

Bug: https://github.com/dart-lang/sdk/issues/47220
Change-Id: I893dffd6ada4095b8580ec5d469142478f57f284
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-19 20:43:01 +00:00
Ahmed Ashour f1ded6af56 Remove import dart:core
Fixes #47092

TEST=existing

Change-Id: I3c5c0a1ec5e0426642a5dc70aa9a0391a143ed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212298
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-06 11:57:40 +00:00
Konstantin Shcheglov 26def2f44e Fix null checks in OverlayResourceProvider.
Change-Id: Ib7ca231413ace2647d69f711a7259072c4ecfbfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205822
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-02 17:06:05 +00:00
Brian Wilkerson eb1ce5d640 Remove some unnecessary null checks
These were found using the unnecessary-null-checks lint. It has a bug
that prevents us from enabling it at the moment, but we should consider
enabling it once the bug has been fixed.

Change-Id: Ice250b5a6a8723c5f08dec5b07ae738e17c842cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196550
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:22:43 +00:00
Brian Wilkerson 5be0438e47 Make local variables that hide fields be final (analyzer)
Change-Id: I4cb41aec1757e133751979d3c0cdc697ccafc4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:04:04 +00:00
Konstantin Shcheglov 4366ff1afd Tests and fixes for resolveSymbolicLinksSync()
Change-Id: Ic4266f4ad1f46e405e22986e3660a3889ec7016c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 21:02:04 +00:00
Konstantin Shcheglov ab31c14841 Fixes for MemoryResourceProvider Folder.exists/getChildren() and links.
Bug: https://github.com/dart-lang/sdk/issues/44501
Change-Id: I60a79474111e56ebece3d9df3fe9281f6e3fcc06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186800
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 06:48:29 +00:00
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
Devon Carew 2ba123b86e [analysis server] remove the --file-read-mode cli option for the analysis server
Change-Id: I279233cd0b7ec09a7d2fdcd50837552f56f2584d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-12 21:42:50 +00:00
Devon Carew e7647f2cf2 Revert "[analysis server] remove the --file-read-mode cli option for the analysis server"
This reverts commit 1caee4d1fd.

Reason for revert: This breaks google3 - we need to update the linter's use of the analyzer API.

Original change's description:
> [analysis server] remove the --file-read-mode cli option for the analysis server
>
> Change-Id: Id07e3655cb4bcfc462ada0db8257e7cf584272f5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171101
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=devoncarew@google.com,scheglov@google.com,brianwilkerson@google.com

Change-Id: I68294ad8b565a94aa098e65276b78e9745eec5a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171640
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-11 20:10:41 +00:00
Devon Carew 1caee4d1fd [analysis server] remove the --file-read-mode cli option for the analysis server
Change-Id: Id07e3655cb4bcfc462ada0db8257e7cf584272f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-11 19:30:23 +00:00
Sam Rawlins 60323ebce9 Analyzer: Add nullability hints to memory_file_system
The migration tool thinks the various parameters are nullable otherwise.

Change-Id: Ie24cf73bfd32ed4d4bade36a9d4fda76e1ca991a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170481
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-05 11:41:44 +00:00
Konstantin Shcheglov b4a09d8dec Catch exceptions from File.resolveSymbolicLinksSync()
Bug: https://buganizer.corp.google.com/issues/169040783
Bug: https://github.com/dart-lang/sdk/issues/43497
Change-Id: I5f4c1ffaec4af2d4d3855b9a99c3a78c36401ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-21 18:36:32 +00:00
Konstantin Shcheglov 044d3d5e22 Add MemoryResourceProvider.newLink()
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/43465
Change-Id: I56a33413cc297b1c362b92b60999e3b506d5e139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163264
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-17 22:40:01 +00:00
Mike Fairhurst 000f3135a5 [analyzer] Remove unused dart:async imports
Change-Id: If21c3a30f3bc521586ad01f8f9e241038e7aa7eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161448
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:14:22 +00:00
Konstantin Shcheglov f3936bca67 Add Resource.provider
R=brianwilkerson@google.com

Change-Id: I1d41d46f927e0ca804031a6fdf8148825695636e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-14 01:49:45 +00:00