[ledger] Use a NO_LINT constant to ensure no lint error on fidl files.
Bounds on vector are not relevant for this files for the following
reason:
- ledger.fidl use server side pagination to ensure these vectors are always
small enough to be send over a channel
- cloud_provider.fidl serialize these vectors into a VMO.
Change-Id: If461f416a55aa12ecbe9ba4d1706b2dc4288dfb1
diff --git a/sdk/fidl/fuchsia.ledger.cloud/cloud_provider.fidl b/sdk/fidl/fuchsia.ledger.cloud/cloud_provider.fidl
index c23d1ed..b782f1f 100644
--- a/sdk/fidl/fuchsia.ledger.cloud/cloud_provider.fidl
+++ b/sdk/fidl/fuchsia.ledger.cloud/cloud_provider.fidl
@@ -9,6 +9,9 @@
// This file defines a cloud service that can be used by Ledger to power cloud
// sync.
+// Constant for unbounded vectors.
+const uint32 NO_LINT = 4294967295;
+
/// Response status for cloud provider operations.
enum Status : int32 {
OK = 0;
@@ -107,12 +110,12 @@
/// A list of commits for serialization in CommitPack.
struct Commits {
- vector<Commit> commits;
+ vector<Commit>:NO_LINT commits;
};
/// A list of references for serialization in ReferencePack.
struct References {
- vector<bytes> references;
+ vector<bytes:NO_LINT>:NO_LINT references;
};
/// Contains a Buffer containing the FIDL serialization of References.
diff --git a/sdk/fidl/fuchsia.ledger/fuchsia.ledger.api b/sdk/fidl/fuchsia.ledger/fuchsia.ledger.api
index 048fc1d..2834c62 100644
--- a/sdk/fidl/fuchsia.ledger/fuchsia.ledger.api
+++ b/sdk/fidl/fuchsia.ledger/fuchsia.ledger.api
@@ -1,3 +1,3 @@
{
- "fidl/fuchsia.ledger/ledger.fidl": "d641f561ad6716ba29bd805e93f79422"
+ "fidl/fuchsia.ledger/ledger.fidl": "d7b49a1edd0fa3f1819036b3ee38904f"
}
\ No newline at end of file
diff --git a/sdk/fidl/fuchsia.ledger/ledger.fidl b/sdk/fidl/fuchsia.ledger/ledger.fidl
index be1c66f..037d211 100644
--- a/sdk/fidl/fuchsia.ledger/ledger.fidl
+++ b/sdk/fidl/fuchsia.ledger/ledger.fidl
@@ -10,6 +10,9 @@
// This file contains definitions of interfaces and data structures to access
// the Fuchsia Ledger.
+// Constant for vectors used in paginated queries.
+const uint32 NO_LINT = 65536;
+
/// Type of the keys in a ledger Page.
using Key = bytes:256;
@@ -264,13 +267,13 @@
/// Missing |LAZY| values can be retrieved over the network using Fetch().
/// The returned |entries| are sorted by |key|.
GetEntries(Key key_start, Token? token)
- -> (vector<Entry> entries, Token? next_token);
+ -> (vector<Entry>:NO_LINT entries, Token? next_token);
/// Same as |GetEntries()|. The connection will be closed with a
/// ZX_ERR_BAD_STATE epitaph if a value does not fit in a FIDL message.
[Deprecated]
GetEntriesInline(Key key_start, Token? token)
- -> (vector<InlinedEntry> entries, Token? next_token);
+ -> (vector<InlinedEntry>:NO_LINT entries, Token? next_token);
/// Returns the keys of all entries in the page which are greater or equal to
/// |key_start| using the lexicographic order. If |key_start| is empty, all
@@ -282,7 +285,7 @@
/// previous call. |next_token| will not be NULL as long as there are more
/// results and NULL once finished.
GetKeys(Key key_start, Token? token)
- -> (vector<Key> keys, Token? next_token);
+ -> (vector<Key>:NO_LINT keys, Token? next_token);
/// Returns the value of a given key.
/// Only |EAGER| values are guaranteed to be returned. Calls when the value is
@@ -326,9 +329,9 @@
/// the |timestamp| of a follow up change is greater than this one's.
zx.time timestamp;
/// List of new and modified entries. |changed_entries| are sorted by |key|.
- vector<Entry> changed_entries;
+ vector<Entry>:NO_LINT changed_entries;
/// List of deleted keys, in sorted order.
- vector<Key> deleted_keys;
+ vector<Key>:NO_LINT deleted_keys;
};
/// Interface to watch changes to a page. The client will receive changes made by
@@ -461,7 +464,7 @@
/// will have a non-NULL value, which can be used to retrieve the rest of
/// the results by calling |GetFullDiff()| with that token.
GetFullDiff(Token? token)
- -> (vector<DiffEntry> changes, Token? next_token);
+ -> (vector<DiffEntry>:NO_LINT changes, Token? next_token);
/// |GetConflictingDiff| returns the set of all key/value pairs that were
/// modified on both sides to different values, or deleted on one side and
@@ -470,7 +473,7 @@
/// It behaves like |GetFullDiff| otherwise.
[Deprecated]
GetConflictingDiff(Token? token)
- -> (vector<DiffEntry> changes, Token? next_token);
+ -> (vector<DiffEntry>:NO_LINT changes, Token? next_token);
/// Once the result of the merge has been computed |Merge()| can be called with
/// all changes that resolve this conflict. If the result does not fit in a
@@ -485,7 +488,7 @@
/// through |MergeNonConflictingEntries()| below), the left value will be
/// used. It is thus not necessary to send a MergedValue with a |LEFT| value
/// source, unless to overwrite a previous MergedValue.
- Merge(vector<MergedValue> merge_changes);
+ Merge(vector<MergedValue>:NO_LINT merge_changes);
/// Automatically merges all non conflicting entries (entries that are
/// modified on one side only or identical on both sides). This is equivalent