Skip to content

go: improve vendoring

Lukas Funke openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4classes: go-vendor: improve handling of go vendoringmeta/classes/go-vendor.bbclass+240 -841 reply
2/4recipetool: go: do not restore go.mod/sum filescripts/lib/recipetool/create_go.py+0 -20 replies
3/4recipetool: go: ignore 'go: *' log messagesscripts/lib/recipetool/create_go.py+6 -10 replies
4/4recipetool: go: apply pylint recommendationsscripts/lib/recipetool/create_go.py+205 -1520 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] go: improve vendoring

From: Lukas Funke <[email protected]>

This series is intended to improve 'vendoring' for golang projects. 'Vendoring' is the golang mechanism to build go-projects in an offline manner. It enables the fetcher to gather all dependencies during fetching-phase and unpack them during build into the workdirs 'vendor' folder.

During testing on our go-projects some issues were discovered, that prevent clean vendoring:

- The '//go:embed' directive enables go-files to include additional source files. These files/folder are not considered in the manifest created by go. Thus, this files are not copied to the vendor folder by yocto, resulting in a broken build.
- Some files contain additional '//go:build' directives, that instruct go to ignore this files during vendoring. This case is now covered as well.

Additional changes:

- fix an issue where some go log messages are included in the vendor manifest
- run pylint analysis on the 'go' recipetool part and incorporate suggestions

Lukas Funke (4):
classes: go-vendor: improve handling of go vendoring
recipetool: go: Do not restore go.mod/sum file
recipetool: go: ignore 'go: *' log messages
recipetool: go: apply pylint recommendations

 meta/classes/go-vendor.bbclass      | 324 ++++++++++++++++++-------
 scripts/lib/recipetool/create_go.py | 362 ++++++++++++++++------------
 2 files changed, 449 insertions(+), 237 deletions(-)
Signature · 1 line
2.30.2