Skip to content

Commit e3d8ef3

Browse files
committed
WIP: pkg/intel/metadata: debug manifest codegen
Signed-off-by: Daniel Maslowski <info@orangecms.org>
1 parent 02de48c commit e3d8ef3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

  • pkg/intel/metadata/common/manifestcodegen

pkg/intel/metadata/common/manifestcodegen/cmd/manifestcodegen/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ func processPath(path string, isCheck, enableTracing bool, packageName string) e
8787
goPaths = append(goPaths, filepath.Join(homeDir, "go"))
8888
}
8989

90+
cwd, err := os.Getwd()
91+
if err != nil {
92+
return fmt.Errorf("unable to determine working directory: %w", err)
93+
}
94+
goPaths = append(goPaths, cwd)
95+
9096
dirInfo, err := analyze.Scan(path, goPaths)
9197
if err != nil {
9298
return fmt.Errorf("unable to analyze path '%s': %w", path, err)

pkg/intel/metadata/common/manifestcodegen/pkg/analyze/scan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func getRawPkg(
4343
buildCtx := build.Default
4444
buildCtx.GOPATH = strings.Join(goPaths, string(filepath.ListSeparator))
4545
buildCtx.BuildTags = append(buildCtx.BuildTags, `manifestcodegen`)
46+
fmt.Printf("search for `%v` in `%v` (%v) \n\n", path, goPaths, buildCtx.GOPATH)
4647
dirRaw, err := gosrc.OpenDirectoryByPkgPath(&buildCtx, path, false, false, false, nil)
4748
if err != nil {
4849
return nil, fmt.Errorf("unable to open go directory: %w", err)

0 commit comments

Comments
 (0)