diff --git a/gen/goversion.go b/gen/goversion.go index 46362c9..c920f37 100644 --- a/gen/goversion.go +++ b/gen/goversion.go @@ -31,6 +31,8 @@ import ( ) func generateGoVersions() { + fmt.Println("Generating " + goversionOutputFile + "&" + goversionCsv) + ctx := context.Background() opts := &github.ListOptions{PerPage: 100} @@ -129,4 +131,6 @@ func generateGoVersions() { } writeOnDemand(buf.Bytes(), goversionOutputFile) + + fmt.Println("Generated " + goversionOutputFile + "&" + goversionCsv) } diff --git a/gen/moduledata.go b/gen/moduledata.go index 2d4194f..681554d 100644 --- a/gen/moduledata.go +++ b/gen/moduledata.go @@ -291,6 +291,8 @@ func (g *moduleDataGenerator) writeVersionedModuleData(versionCode int, code str } func generateModuleData() { + fmt.Printf("Generating %s...", moduleDataOutputFile) + sources, err := getModuleDataSources() if err != nil { panic(err) diff --git a/gen/static.go b/gen/static.go index aebc26b..0a47789 100644 --- a/gen/static.go +++ b/gen/static.go @@ -110,7 +110,7 @@ import "fmt" var ( goversionCsv = filepath.Join(getSourceDir(), "resources", "goversions.csv") - outputFile = filepath.Join(getSourceDir(), "stdpkg_gen.go") + stdpkgOutputFile = filepath.Join(getSourceDir(), "stdpkg_gen.go") goversionOutputFile = filepath.Join(getSourceDir(), "goversion_gen.go") moduleDataOutputFile = filepath.Join(getSourceDir(), "moduledata_gen.go") ) diff --git a/gen/stdpkgs.go b/gen/stdpkgs.go index acc7a63..58eac94 100644 --- a/gen/stdpkgs.go +++ b/gen/stdpkgs.go @@ -29,6 +29,15 @@ import ( ) func generateStdPkgs() { + fmt.Println("Generating " + stdpkgOutputFile) + + logChan := make(chan string) + go func() { + for log := range logChan { + fmt.Println(log) + } + }() + wg := &sync.WaitGroup{} collect := func(ctx context.Context, cause context.CancelCauseFunc, tag string, result chan []string) { tree, _, err := githubClient.Git.GetTree(ctx, "golang", "go", tag, true) @@ -37,7 +46,7 @@ func generateStdPkgs() { return } - fmt.Println("Fetched std pkgs for tag:", tag) + logChan <- "Fetched std pkgs for tag: " + tag if len(tree.Entries) == 100000 { fmt.Printf("Warning: tree %s has 100000 entries, this may be limited by api, some might be missing", tag) @@ -86,6 +95,7 @@ func generateStdPkgs() { go func() { wg.Wait() close(pkgsChan) + close(logChan) }() for pkgs := range pkgsChan { @@ -117,5 +127,7 @@ func generateStdPkgs() { return } - writeOnDemand(buf.Bytes(), outputFile) + writeOnDemand(buf.Bytes(), stdpkgOutputFile) + + fmt.Println("Generated " + stdpkgOutputFile) }