If the types in specified workbooks do not reference other types not in them self, then there is no need to do the full first-pass compiling.
|
func (gen *Generator) GenWorkbook(relWorkbookPaths ...string) error { |
|
// first pass |
|
switch gen.InputOpt.FirstPassMode { |
|
case options.FirstPassModeNormal: |
|
if err := gen.preprocess(false, false); err != nil { |
|
return err |
|
} |
|
log.Infof("%15s: parsing all books", "first-pass") |
|
if err := gen.processFirstPass(false); err != nil { |
|
return err |
|
} |
|
case options.FirstPassModeAdvanced: |
|
log.Infof("%15s: parsing previous generated proto files", "first-pass") |
|
if err := gen.preprocess(true, false); err != nil { |
|
return err |
|
} |
|
log.Infof("%15s: parsing only specified books", "first-pass") |
|
if err := gen.processWorkbookOnFirstPass(relWorkbookPaths...); err != nil { |
If the types in specified workbooks do not reference other types not in them self, then there is no need to do the full first-pass compiling.
tableau/internal/protogen/protogen.go
Lines 133 to 150 in 92b805c