mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-31 03:18:43 -06:00
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.
30 lines
795 B
Cheetah
30 lines
795 B
Cheetah
// This file was generated by nomdl/codegen.
|
|
|
|
package {{.Name}}
|
|
|
|
{{if .HasImports}}
|
|
import (
|
|
{{range $imp := .Imports}}"{{$imp}}"
|
|
{{end}}
|
|
"github.com/attic-labs/noms/ref"
|
|
"github.com/attic-labs/noms/types"
|
|
)
|
|
{{end}}
|
|
|
|
{{if .HasTypes}}
|
|
var __{{.Name}}PackageInFile_{{.FileID}}_CachedRef = __{{.Name}}PackageInFile_{{.FileID}}_Ref()
|
|
|
|
// This function builds up a Noms value that describes the type
|
|
// package implemented by this file and registers it with the global
|
|
// type package definition cache.
|
|
func __{{.Name}}PackageInFile_{{.FileID}}_Ref() ref.Ref {
|
|
p := types.NewPackage([]types.TypeRef{ {{range $t := .Types}}
|
|
{{toTypesTypeRef $t "" ""}},{{end}}
|
|
}, []ref.Ref{ {{range $deps := .Dependencies}}
|
|
ref.Parse("{{$deps}}"),{{end}}
|
|
})
|
|
return types.RegisterPackage(&p)
|
|
}
|
|
{{end}}
|
|
|