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 replaces the HTTP ChunkStore implementation with an implementation of
our new DataStore client protocol. It migrates much of the batching logic
from RemoteStore into the new BatchStore, which is analogous to a class we
have on the Go side, but continues to use a Delegate to handle all the HTTP
work.
This patch also introduces ValueStore, which handles validating Values as
they're written. Instead of handling Value reading and writing itself,
DataStore now extends ValueStore.
Towards #1280
Struct type definition is now inlined into the chunk. To break
cycles we use back references.
- Removes unresolved type refs
- Removes packages
Fixes#1164Fixes#1165
type.js no longer exports makePrimitiveType. It is recommended to use
the type constants directly. There are a few cases where we had a
NomsKind and needed a Type. For those cases there is now a
getPrimitiveType but it is not exported by noms.
Fixes#1168
The decoder now generates a class for a struct. Given:
```noms
struct MyStruct {
x: Int8
s: optional String
}
```
the generated class looks something like this:
```js
class MyStruct extends Struct {
get x(): int8 { ... }
setX(value: int8): MyStruct { ... }
get s(): ?string { ... }
setS(value: ?string): MyStruct { ... }
}
```
The base class `Struct` has nothing on it (except chunks). It
usefull in cases where a generic struct is wanted.
To reflect on Structs we introduce StructMirror.
This also means that Commit is now a real ~~boy~~type.
This does not yet handle Defs.
Towards #1157