Kindsys: Replace "Declaration" with "Definition" (#62515)
* s/Declaration/Definition/g * s/DeclForGen/DefForGen/g * Rename some local vars
This commit is contained in:
@@ -29,8 +29,8 @@ func (j *lmox) JennyName() string {
|
||||
return "LatestMajorsOrXJenny"
|
||||
}
|
||||
|
||||
func (j *lmox) Generate(decl *DeclForGen) (codejen.Files, error) {
|
||||
comm := decl.Properties.Common()
|
||||
func (j *lmox) Generate(def *DefForGen) (codejen.Files, error) {
|
||||
comm := def.Properties.Common()
|
||||
sfg := SchemaForGen{
|
||||
Name: comm.Name,
|
||||
IsGroup: comm.LineageIsGroup,
|
||||
@@ -39,7 +39,7 @@ func (j *lmox) Generate(decl *DeclForGen) (codejen.Files, error) {
|
||||
do := func(sfg SchemaForGen, infix string) (codejen.Files, error) {
|
||||
f, err := j.inner.Generate(sfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s jenny failed on %s schema for %s: %w", j.inner.JennyName(), sfg.Schema.Version(), decl.Properties.Common().Name, err)
|
||||
return nil, fmt.Errorf("%s jenny failed on %s schema for %s: %w", j.inner.JennyName(), sfg.Schema.Version(), def.Properties.Common().Name, err)
|
||||
}
|
||||
if f == nil || !f.Exists() {
|
||||
return nil, nil
|
||||
@@ -51,12 +51,12 @@ func (j *lmox) Generate(decl *DeclForGen) (codejen.Files, error) {
|
||||
}
|
||||
|
||||
if comm.Maturity.Less(kindsys.MaturityStable) {
|
||||
sfg.Schema = decl.Lineage().Latest()
|
||||
sfg.Schema = def.Lineage().Latest()
|
||||
return do(sfg, "x")
|
||||
}
|
||||
|
||||
var fl codejen.Files
|
||||
for sch := decl.Lineage().First(); sch != nil; sch = sch.Successor() {
|
||||
for sch := def.Lineage().First(); sch != nil; sch = sch.Successor() {
|
||||
sfg.Schema = sch.LatestInMajor()
|
||||
files, err := do(sfg, fmt.Sprintf("v%v", sch.Version()[0]))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user