Commit Graph

9 Commits

Author SHA1 Message Date
Erik Arvidsson 1d13a878c4 Fix types.Ref and RefKind objects
Ref Values now have a TargetRef() method that returns the ref.Ref of
the target the Value is referencing.

Note: This is a breaking change. In old code the Ref() of the Value was
the Ref of the underlying target.

Fixes #464
2015-10-26 11:18:02 -04:00
Erik Arvidsson 16353f38f8 NomDL: Make the new serialization default
This makes the new typed serialization the default (the old
serialization is not used but the code has not been cleaned up yet).

Some things are no working in the new world:

Chunking -  The compound list is not working correctly any more. The
Chunks method is having issues because it assumed things based on the
old implicit chunking.

Commit - uses a `Set(Commit)` which means that the parent commit is
embedded. We need to change that to be `Set(Ref(Commit))` so that the
parent commit is referenced instead.
2015-10-21 19:04:22 -04:00
Erik Arvidsson 9e36e080fd Disable unmarshal test that depends on map iteration order
Towards #396
2015-10-12 19:36:45 -04:00
Erik Arvidsson b6197aadc4 Add support for compound lists.
Lists are now either a leafList or a compoundList. The compoundList
consists of sublists that are the chunks of the whole list.
2015-08-28 15:41:51 -04:00
Dan Willhite ab34143ba5 Pin dependencies using godep tool. Rewrite dep urls. 2015-08-26 14:05:40 -07:00
Chris Masone ccd70d7c65 Changed error handling in Marshal and Unmarshal
Instead of returning errors, these now use d.Exp to raise catchable
errors.

Also, added commit hash at which code was pulled from encoding/json

Marshal io.Reader into a Blob, unmarshal Blob into io.Writer
2015-08-26 09:28:04 -07:00
Chris Masone 5de698b8f1 Add Unmarshal and Marshal
Unmarshal and Marshal are tools for moving data from Noms into native Go and
back. The rules are described in the documentation of the two functions, but
the behavior is broadly similar to encoding/json.

Towards issue #160
2015-08-26 09:27:58 -07:00
Chris Masone 27909c905d Move and rename encoding/json files to prep for mods
This patch renames files to the names that will be used by our marshal
package, so that the change history will be accurate.
2015-08-26 09:15:34 -07:00
Chris Masone 9875fccd40 Initial import of encoding/json files
The plan is to modify the encoding/json code heavily for use in
marshaling between native Go and Noms values. This pulls in the files
unmodified so we have a record of our changes.
2015-08-26 09:15:34 -07:00