mirror of
https://github.com/dart-lang/sdk
synced 2024-07-05 09:20:04 +00:00
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>
This commit is contained in:
parent
9304826679
commit
7ae9900059
|
@ -1,3 +1,7 @@
|
|||
## 6.7.0-dev
|
||||
* Deprecated `File.createSource()`, it violates levels of abstraction.
|
||||
You can get `Source` instances from `AnalysisResult`s.
|
||||
|
||||
## 6.6.0
|
||||
* Stop exporting `src/file_system/file_system.dart`
|
||||
from `file_system/file_system.dart`.
|
||||
|
|
|
@ -31,6 +31,7 @@ abstract class File implements Resource {
|
|||
File copyTo(Folder parentFolder);
|
||||
|
||||
/// Create a new [Source] instance that serves this file.
|
||||
@Deprecated('Get Source instances from analysis results')
|
||||
Source createSource([Uri? uri]);
|
||||
|
||||
/// Synchronously read the entire file contents as a list of bytes.
|
||||
|
|
|
@ -354,6 +354,7 @@ class _MemoryFile extends _MemoryResource implements File {
|
|||
return destination;
|
||||
}
|
||||
|
||||
@Deprecated('Get Source instances from analysis results')
|
||||
@override
|
||||
Source createSource([Uri? uri]) {
|
||||
uri ??= provider.pathContext.toUri(path);
|
||||
|
|
|
@ -167,6 +167,7 @@ class _OverlayFile extends _OverlayResource implements File {
|
|||
}
|
||||
}
|
||||
|
||||
@Deprecated('Get Source instances from analysis results')
|
||||
@override
|
||||
Source createSource([Uri? uri]) =>
|
||||
FileSource(this, uri ?? provider.pathContext.toUri(path));
|
||||
|
|
|
@ -136,6 +136,7 @@ class _PhysicalFile extends _PhysicalResource implements File {
|
|||
return destination;
|
||||
}
|
||||
|
||||
@Deprecated('Get Source instances from analysis results')
|
||||
@override
|
||||
Source createSource([Uri? uri]) {
|
||||
return FileSource(this, uri ?? pathContext.toUri(path));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: analyzer
|
||||
version: 6.6.0
|
||||
version: 6.7.0-dev
|
||||
description: >-
|
||||
This package provides a library that performs static analysis of Dart code.
|
||||
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
|
||||
|
|
Loading…
Reference in New Issue
Block a user