mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:07:49 +00:00
Include packageLanguageVersion into the linked signature.
It is exposed from LibraryElement. Change-Id: I6acf704312e185ff8fd8b6391590d5385f9821df Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162482 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
38156a5a39
commit
0567babb06
|
@ -85,7 +85,7 @@ typedef WorkToWaitAfterComputingResult = Future<void> Function(String path);
|
|||
/// TODO(scheglov) Clean up the list of implicitly analyzed files.
|
||||
class AnalysisDriver implements AnalysisDriverGeneric {
|
||||
/// The version of data format, should be incremented on every format change.
|
||||
static const int DATA_VERSION = 110;
|
||||
static const int DATA_VERSION = 111;
|
||||
|
||||
/// The length of the list returned by [_computeDeclaredVariablesSignature].
|
||||
static const int _declaredVariablesSignatureLength = 4;
|
||||
|
|
|
@ -115,7 +115,7 @@ class FileState {
|
|||
final FeatureSet _contextFeatureSet;
|
||||
|
||||
/// The language version for the package that contains this file.
|
||||
final Version _packageLanguageVersion;
|
||||
final Version packageLanguageVersion;
|
||||
|
||||
int id = fileObjectId++;
|
||||
int refreshId;
|
||||
|
@ -156,7 +156,7 @@ class FileState {
|
|||
this.source,
|
||||
this.workspacePackage,
|
||||
this._contextFeatureSet,
|
||||
this._packageLanguageVersion,
|
||||
this.packageLanguageVersion,
|
||||
) : isInExternalSummaries = false;
|
||||
|
||||
FileState._external(this._fsState, this.uri)
|
||||
|
@ -166,7 +166,7 @@ class FileState {
|
|||
workspacePackage = null,
|
||||
_exists = true,
|
||||
_contextFeatureSet = null,
|
||||
_packageLanguageVersion = null {
|
||||
packageLanguageVersion = null {
|
||||
_apiSignature = Uint8List(16);
|
||||
_libraryCycle = LibraryCycle.external();
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ class FileState {
|
|||
var signature = ApiSignature();
|
||||
signature.addUint32List(_fsState._saltForUnlinked);
|
||||
signature.addFeatureSet(_contextFeatureSet);
|
||||
signature.addLanguageVersion(_packageLanguageVersion);
|
||||
signature.addLanguageVersion(packageLanguageVersion);
|
||||
signature.addString(_contentHash);
|
||||
signature.addBool(_exists);
|
||||
contentSignature = signature.toByteList();
|
||||
|
@ -510,7 +510,7 @@ class FileState {
|
|||
unit.lineInfo = LineInfo(const <int>[0]);
|
||||
|
||||
unit.languageVersion = LibraryLanguageVersion(
|
||||
package: _packageLanguageVersion,
|
||||
package: packageLanguageVersion,
|
||||
override: null,
|
||||
);
|
||||
|
||||
|
@ -561,7 +561,7 @@ class FileState {
|
|||
..configureFeatures(
|
||||
featureSetForOverriding: _contextFeatureSet,
|
||||
featureSet: _contextFeatureSet.restrictToVersion(
|
||||
_packageLanguageVersion,
|
||||
packageLanguageVersion,
|
||||
),
|
||||
);
|
||||
Token token = scanner.tokenize(reportScannerErrors: false);
|
||||
|
@ -640,7 +640,7 @@ $content
|
|||
|
||||
var unitImpl = unit as CompilationUnitImpl;
|
||||
unitImpl.languageVersion = LibraryLanguageVersion(
|
||||
package: _packageLanguageVersion,
|
||||
package: packageLanguageVersion,
|
||||
override: overrideVersion,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ class _LibraryWalker extends graph.DependencyWalker<_LibraryNode> {
|
|||
for (var node in scc) {
|
||||
cycle.libraries.add(node.file);
|
||||
|
||||
signature.addLanguageVersion(node.file.packageLanguageVersion);
|
||||
signature.addString(node.file.uriStr);
|
||||
|
||||
signature.addInt(node.file.libraryFiles.length);
|
||||
|
|
Loading…
Reference in a new issue