Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: pkg/analyzer/lib/src/summary/summarize_elements.dart

Issue 1754793002: Add major and minor version numbers to summary files. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index b854352a08a5ca5c68a3fe6b3324c0623040264a..3d9896b09496050ee0033d0c38f8b90057ea1d14 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -114,6 +114,23 @@ class LibrarySerializationResult {
* [PackageBundleBuilder].
*/
class PackageBundleAssembler {
+ /**
+ * Value that will be stored in [PackageBundle.majorVersion] for any summaries
+ * created by this code. When making a breaking change to the summary format,
+ * this value should be incremented by 1 and [currentMinorVersion] should be
+ * reset to zero.
+ */
+ static const int currentMajorVersion = 1;
+
+ /**
+ * Value that will be stored in [PackageBundle.minorVersion] for any summaries
+ * created by this code. When making a non-breaking change to the summary
+ * format that clients might need to be aware of (such as adding a kind of
+ * data that was previously not summarized), this value should be incremented
+ * by 1.
+ */
+ static const int currentMinorVersion = 0;
+
final List<String> _linkedLibraryUris = <String>[];
final List<LinkedLibraryBuilder> _linkedLibraries = <LinkedLibraryBuilder>[];
final List<String> _unlinkedUnitUris = <String>[];
@@ -129,7 +146,9 @@ class PackageBundleAssembler {
linkedLibraries: _linkedLibraries,
unlinkedUnitUris: _unlinkedUnitUris,
unlinkedUnits: _unlinkedUnits,
- unlinkedUnitHashes: _unlinkedUnitHashes);
+ unlinkedUnitHashes: _unlinkedUnitHashes,
+ majorVersion: currentMajorVersion,
+ minorVersion: currentMinorVersion);
}
/**
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698