mirror of
https://github.com/dart-lang/sdk
synced 2024-10-07 11:28:04 +00:00
Deprecate Source.modificationStamp
Change-Id: Id7f361beff1c4e3f9edc743c58cce7888d330c1f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220860 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
f9d737b07a
commit
d6d45d96f8
|
@ -5,6 +5,7 @@
|
|||
* Deprecated `UriResolver.restoreAbsolute`, use `pathToUri` instead.
|
||||
* Deprecated `SourceFactory.restoreAbsolute`, use `pathToUri` instead.
|
||||
* Deprecated `UriKind` and `Source.uriKind`.
|
||||
* Deprecated `Source.modificationStamp`.
|
||||
* Fixed #47715.
|
||||
|
||||
## 2.7.0
|
||||
|
|
|
@ -106,6 +106,7 @@ class NonExistingSource extends Source {
|
|||
@override
|
||||
bool get isInSystemLibrary => false;
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
@override
|
||||
int get modificationStamp => -1;
|
||||
|
||||
|
@ -204,6 +205,7 @@ abstract class Source {
|
|||
/// Clients should consider using the method
|
||||
/// [AnalysisContext.getModificationStamp] because contexts can have local
|
||||
/// overrides of the content of a source that the source is not aware of.
|
||||
@Deprecated('Not used anymore')
|
||||
int get modificationStamp;
|
||||
|
||||
/// Return a short version of the name that can be displayed to the user to
|
||||
|
|
|
@ -65,7 +65,7 @@ class FileSource extends Source {
|
|||
/// See [contents].
|
||||
TimestampedData<String> get contentsFromFile {
|
||||
return TimestampedData<String>(
|
||||
modificationStamp, fileReadMode(file.readAsStringSync()));
|
||||
file.modificationStamp, fileReadMode(file.readAsStringSync()));
|
||||
}
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
|
@ -81,6 +81,7 @@ class FileSource extends Source {
|
|||
@override
|
||||
bool get isInSystemLibrary => uri.scheme == DartUriResolver.DART_SCHEME;
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
@override
|
||||
int get modificationStamp {
|
||||
try {
|
||||
|
|
|
@ -72,6 +72,7 @@ class InSummarySource extends BasicSource {
|
|||
@override
|
||||
TimestampedData<String> get contents => TimestampedData<String>(0, '');
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
@override
|
||||
int get modificationStamp => 0;
|
||||
|
||||
|
|
|
@ -216,6 +216,7 @@ class MemoryFileSourceNotExistingTest extends BaseTest {
|
|||
expect(source.fullName, sourcePath);
|
||||
}
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
test_modificationStamp() {
|
||||
expect(source.modificationStamp, -1);
|
||||
}
|
||||
|
|
|
@ -471,6 +471,7 @@ class TestSource extends Source {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
@override
|
||||
int get modificationStamp =>
|
||||
generateExceptionOnRead ? -1 : _modificationStamp;
|
||||
|
|
|
@ -169,6 +169,7 @@ class MockSource implements Source {
|
|||
@override
|
||||
bool get isInSystemLibrary => false;
|
||||
|
||||
@Deprecated('Not used anymore')
|
||||
@override
|
||||
int get modificationStamp => 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue