Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when vendoring digger: Related to them using go.work or just broken go.sum? #54

Open
kastl-ars opened this issue Sep 24, 2024 · 1 comment

Comments

@kastl-ars
Copy link

Hi all,

I was trying to package digger, unfortunately it fails during vendoring the go dependencies.

This is my _service file:

<services>
  <service name="obs_scm" mode="manual">
    <param name="url">https://github.com/diggerhq/digger</param>
    <param name="scm">git</param>
    <param name="exclude">.git</param>
    <param name="exclude">go.work</param>
    <param name="exclude">go.work.sum</param>
    <param name="revision">v0.6.43</param>
    <param name="match-tag">v[0-9]*\.[0-9]*\.[0-9]*</param>
    <param name="versionformat">@PARENT_TAG@</param>
    <param name="versionrewrite-pattern">v(.*)</param>
    <param name="changesgenerate">enable</param>
    <param name="filename">digger-cli</param>
  </service>
  <service name="set_version" mode="manual">
  </service>
  <service name="go_modules" mode="manual">
    <param name="subdir">./cli/</param>
  </service>
  <!-- services below are running at buildtime -->
  <service name="tar" mode="buildtime">
  </service>
  <service name="recompress" mode="buildtime">
    <param name="file">*.tar</param>
    <param name="compression">gz</param>
  </service>
</services>

As you can see, they are using go.work which I need to exclude as the service is not yet (?) ready for this. And I need to use the go.mod and go.sum files from the cli subdirectory.

Unfortunately this fails, too, with lots of errors due to things missing in go.sum.

INFO:obs-service-go_modules:Using go.mod found at /tmp/tmp235j08bj/digger-cli-0.6.43/cli/go.mod
INFO:obs-service-go_modules:go mod download
INFO:obs-service-go_modules:go mod vendor
ERROR:obs-service-go_modules:go: github.com/diggerhq/digger/cli/cmd/digger imports
        github.com/spf13/cobra: missing go.sum entry for module providing package github.com/spf13/cobra (imported by github.com/diggerhq/digger/cli/cmd/digger); to add:
        go get github.com/diggerhq/digger/cli/cmd/digger
go: github.com/diggerhq/digger/cli/cmd/digger imports
        github.com/diggerhq/digger/libs/comment_utils/summary imports
        golang.org/x/text/cases: missing go.sum entry for module providing package golang.org/x/text/cases (imported by github.com/diggerhq/digger/libs/comment_utils/summary); to add:
        go get github.com/diggerhq/digger/libs/comment_utils/[email protected]
[...]

Is this an error on their side? Or to be expected due to the usage of go.work?

Kind Regards,
Johannes

@johanneskastl
Copy link

Broken go.sum in the cli directory...

Please close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants