This method returns a types.Ref, so ChildRef is the right name.
Also, delete metaSequenceObject::ChildValues, since it isn't and
shouldn't ever be called.
A common case for io.Writer errors is during noms-log or noms-show when
piped through head, i.e. "noms log ldb:/path/to:noms | head".
noms-log handles this itself by recovering from the panic, but rather
than porting this logic to noms-show, just make it so that you don't
need to recover in the first place.
This is similar to how errors from fmt.Println etc don't panic.
Non-write errors (like crashes) will continue to panic.
* Go: In httpBatchStore, order outgoing Chunks by ref-height
Rather than sending chunks to the server in the order that callers put
them into an httpBatchStore, instead order them by ref-height at the
time that Flush() is called. Making this change requires that
ref-height for a given chunk be passed in through the SchedulePut()
API, because Chunks (by design) don't carry much metadata about
themselves.
Toward #1510
makeUnionType now flattens and removes duplicate types. With this
change makeUnionType might no longer actually create a union
type in the case there is only one type in the union.
Towards #1491
This allows having a set/map of heterogenous elements/keys. To support
this we have to be able to have a total ordering for all noms values.
The ordering is false < true < -999 < 0 < 999 < "" < "a" < "z" < Hash
In other words, Bool < Number < String < * and for comparing non
primitives we compare the hash of the object.
Fixes#1104Fixes#1312
This is because:
* All type.Ref are now typed, so Typed was a tautology.
* The only way to construct a type.Ref is with a Value, so FromValue was
a tautology (with a small amount of work to remove callers of NewRef).
When we serialize a meta tuple we should serialize it with the Ref value (which includes the type). This is because in the future the sub tree might be of a different type than the current tree.
Towards #1312
A union type is a compound type with 0 or more types.
Its noms serialization is UnionKind, <number-of-types>, T0, ..., TN
Its HRS is T0 | T1 | ... | TN
Towards #1311
This is to support efficient chunk diff. Most of the churn in this patch
comes from updating test expectations, and updating every Ref construction
to include a height and every MetaTuple to include a Ref.
We used to serialize types in two different ways, depending on whether
the type was used as a tag or as a value. Now we serialize it the same
way.
Also, remove makeCompoundType completely.
And remove some dead code.
While this causes the cache to potentially grow infinitely,
having a DataStore keep track of every value it's read or written
makes it simpler to program with. Once types.Ref can only come to
be by being read out of a DataStore, we can do away with this
altogether.