Answer architecture round 3, stability round 1 and product-owner round 1: CalcName and proven.OfCalc for one meaning per name, a lazy load placed where its lookup found it, DataType's constants typed under it, and cover printing the module's total
This commit is contained in:
+3
-3
@@ -99,7 +99,7 @@ func loadShipped(root *folder, wanted []unloadedCategory) {
|
||||
if !unloaded {
|
||||
continue
|
||||
}
|
||||
site, err := u.load(root)
|
||||
site, err := u.load()
|
||||
if err != nil {
|
||||
panic(invariant.Broken("shipped %s: %v; after a change under data/, regenerate shippedindex.go", join(strings.Join(u.dir, "."), u.name), err))
|
||||
}
|
||||
@@ -117,8 +117,8 @@ func loadShipped(root *folder, wanted []unloadedCategory) {
|
||||
|
||||
// load parses and compiles the category, and moves it from its folder's unloaded map to
|
||||
// the folder's children.
|
||||
func (u unloadedCategory) load(root *folder) (categorySite, error) {
|
||||
if err := shippedSource.Load(u.dir, u.name, compileInto(root)); err != nil {
|
||||
func (u unloadedCategory) load() (categorySite, error) {
|
||||
if err := shippedSource.Load(u.dir, u.name, compileInto(func([]string) *folder { return u.in })); err != nil {
|
||||
return categorySite{}, err
|
||||
}
|
||||
delete(u.in.unloaded, u.name)
|
||||
|
||||
Reference in New Issue
Block a user