coremodels: Combine static and generic registries (#53246)

* Stop generating non-dynamic registry code

* Remove generic, errors, s/static/base/

* Sort during codegen, not runtime

* Not a method call

* Precisiate a comment

* Remove generic registry, fix assignability test
This commit is contained in:
sam boyer
2022-08-04 00:04:54 +04:00
committed by GitHub
parent d54e55ea9a
commit b11f66b4bb
9 changed files with 101 additions and 247 deletions
+4
View File
@@ -9,6 +9,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"cuelang.org/go/cue/cuecontext"
@@ -59,6 +60,9 @@ func main() {
lins = append(lins, lin)
}
}
sort.Slice(lins, func(i, j int) bool {
return lins[i].Lineage.Name() < lins[j].Lineage.Name()
})
wd := gcgen.NewWriteDiffer()
for _, ls := range lins {