1) truncate filenames containing hash to only use first 7 chars of hash.
2) change output filename from <base>.go to <base>_noms.go
3) check for includes of file in same directory and don't generate twice.
Before encoding a compoundBlob we create a compoundBlobStruct and
encode that instead.
After decoding we check if the value is a compoundBlobStruct and if so
we convert it to a compoundBlob.
Fixes#455, #165
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.
Sets, Lists, Refs and Maps of imported types work now.
This PR also factors some of codegen.go into a separate package, to slim down
that file a bit.
Towards issue #294