Commit Graph

21 Commits

Author SHA1 Message Date
Erik Arvidsson
84b4aba5a6 HRS: Prefix map/set values with map/set (#3655)
We now print map and set values as:

```
map {
  "string": 42,
  "set": set {
    true,
    false,
  },
}
```

Towards #1466
2017-08-31 13:31:21 -07:00
Erik Arvidsson
a93777d93a HRS: Cleanup struct head (#3647)
For struct values we always prefix with struct.

For struct types we always prefix with Struct.

Towards #1466
2017-08-29 17:47:54 -07:00
Erik Arvidsson
9cd2aae786 Print Refs with # (#3644)
Print Ref values as #123 instead of 123

Since our hashes are SHA-512 and we write them using Base32 there are a lot of overlaps with other parts of NomDL. This makes them unambiguous.

Towards #1466
2017-08-29 17:43:29 -07:00
Rafael Weinstein
c3f98d1631 Remove in mem graphs (#3635)
This patch removes the ability to keep alive uncommitted prolly-tree sequences.
2017-08-29 13:12:10 -07:00
Rafael Weinstein
22e5b323e4 List Editor (#3586) 2017-07-13 15:37:48 -07:00
Rafael Weinstein
fe0fc3ad86 Introduce SetEditor, Nestable Editors (#3557) 2017-06-21 15:22:04 -07:00
Rafael Weinstein
1796d2f865 Streaming p tree updates + Map Editor (#3545) 2017-06-15 15:49:04 -07:00
Rafael Weinstein
9654d372a2 OrderedSequenceDiff ValueChanged adds NewValue/OldValue (#3468) 2017-05-09 16:43:04 -07:00
cmasone-attic
fef871c1a7 ValueStore.Flush() no longer persists Chunks (#3416)
ValueStore.Flush() now Puts all Chunks buffered in the ValueStore
layer into the underlying ChunkStore. The Chunks are not persistent
at this point, not until and unless the caller calls Commit() on
the ChunkStore.

This patch also removes ChunkStore.Flush(). The same effect can be
achieved by calling ChunkStore.Commit() with the current Root for both
last and current.

NB: newTestValueStore is now private to the types package.
The logic is that, now, outside the types package, callers
need to hold onto the underlying ChunkStore if they want to
persist Chunks.

Toward #3404
2017-04-21 17:30:56 -07:00
Aaron Boodman
06cebbe346 Introduce @target annotation for paths (#3352)
Introduce @target annotation for paths

Fixes #2172
2017-04-13 14:56:31 -07:00
Erik Arvidsson
fd997f7bfa Add IsValueSubtypeOf and IsCommit (#3375)
This adds IsValueSubtypeOf which skips computing the type of the value.

Use IsValueSubtypeOf to implement IsCommit which checks if a value is a
commit.

Replace usages of IsSubtype(t, TypeOf(v)) with IsValueSubtypeOf(v, t).

Fixes #3326
Fixes #3348
2017-04-13 10:49:17 -07:00
Rafael Weinstein
fbfdd317fc Encode all noms quantities as varint (#3368) 2017-04-08 22:48:03 -07:00
Erik Arvidsson
c964aff0af Remove types.Value Type() in favor of types.TypeOf() (#3337)
BREAKING CHANGE

This removes the `Type()` method from the `types.Value` interface.
Instead use the `types.TypeOf(v types.Value) bool` function.

Fixes #3324
2017-04-03 14:04:13 -07:00
Rafael Weinstein
22a7d8cf7e Type.Kind => Type.TargetKind, Add Value.Kind (#3332) 2017-03-31 18:09:35 -07:00
Dan Willhite
10570f591e Fix print_diff when map is keyed by non-primitive (#3128) 2017-01-30 18:40:52 -08:00
cmasone-attic
cfa109f502 Switch Map/Set Diff to use top-down by default (#3106)
The only thing that wants what we used to call the "best" diff
algorithm is the command-line tools. Non-interactive programs all want
the algorithm that finishes up fastest, which is top-down.

Fixes https://github.com/attic-labs/attic/issues/627
2017-01-23 15:08:50 -08:00
Dan Willhite
e30272abeb Implement poke functionality using diff.Apply function (#2828) 2016-12-07 11:57:48 -08:00
Rafael Weinstein
a67bb9bf7b Minor rework of hash.Hash API (#2888)
Define the hash.Hash type to be a 20-byte array, rather than embed one. Hash API Changes: `hash.FromSlice` -> `hash.New`, `hash.FromData` -> `hash.Of`
2016-12-02 12:11:00 -08:00
Dan Willhite
b6b1389c30 Danloader (#2794)
* Downloader

* Review changes
2016-11-08 16:46:55 -08:00
Dan Willhite
1cd34e0ebd Add Append() method to types.Path (#2783) 2016-10-29 12:37:50 -07:00
Dan Willhite
d94fb97788 Move diff package to top-level go directory (#2739)
Towards #609.
2016-10-20 10:19:57 -07:00