Build in obs directly from this repo #20

Closed
jzerebecki wants to merge 1 commits from jzerebecki/autogits:build-directly into main
Owner

This will allow direct feedback to pull requests.

This will allow direct feedback to pull requests.
jzerebecki added 1 commit 2025-04-01 17:33:49 +02:00
Owner

vendor/src.opensuse.org/autogits/* should not be part of the vendor tarball. That's just these sources. Can they be excluded?

`vendor/src.opensuse.org/autogits/*` should not be part of the vendor tarball. That's just these sources. Can they be excluded?
Author
Owner

That problem also exists in the current packaging. obs-go-modules can not currently exclude. I'm not sure about go itself, maybe there is a way to rearrange stuff so go can be clever, my guess is it can't? Or maybe one needs to set some environment variable, so go recognizes the situation?

When I try to vendor the other modules I also get errors, not sure if some of them are related, probably not:

ERROR:obs-service-go_modules:go: src.opensuse.org/autogits/group-review imports
        src.opensuse.org/autogits/common imports
        github.com/go-openapi/runtime/client: missing go.sum entry for module providing package github.com/go-openapi/runtime/client (imported by src.opensuse.org/autogits/common); to add:
        go get src.opensuse.org/autogits/common@v0.0.0-00010101000000-000000000000
ERROR:obs-service-go_modules:go: src.opensuse.org/autogits/workflow-direct tested by
        src.opensuse.org/autogits/workflow-direct.test imports
        src.opensuse.org/autogits/common/mock: no required module provides package src.opensuse.org/autogits/common/mock; to add it:
        go get src.opensuse.org/autogits/common/mock
That problem also exists in the current packaging. obs-go-modules can not currently exclude. I'm not sure about go itself, maybe there is a way to rearrange stuff so go can be clever, my guess is it can't? Or maybe one needs to set some environment variable, so go recognizes the situation? When I try to vendor the other modules I also get errors, not sure if some of them are related, probably not: ``` ERROR:obs-service-go_modules:go: src.opensuse.org/autogits/group-review imports src.opensuse.org/autogits/common imports github.com/go-openapi/runtime/client: missing go.sum entry for module providing package github.com/go-openapi/runtime/client (imported by src.opensuse.org/autogits/common); to add: go get src.opensuse.org/autogits/common@v0.0.0-00010101000000-000000000000 ``` ``` ERROR:obs-service-go_modules:go: src.opensuse.org/autogits/workflow-direct tested by src.opensuse.org/autogits/workflow-direct.test imports src.opensuse.org/autogits/common/mock: no required module provides package src.opensuse.org/autogits/common/mock; to add it: go get src.opensuse.org/autogits/common/mock ```
Author
Owner

Doh. Go allows multiple binaries in a module. So you can structure it so the root contains one go module then the common code will not be copied during vendoring. Downside is that outside imports of the common code will copy all the code for the binaries.

Do you want to go that way?

Doh. Go allows multiple binaries in a module. So you can structure it so the root contains one go module then the common code will not be copied during vendoring. Downside is that outside imports of the common code will copy all the code for the binaries. Do you want to go that way?
Owner

The mocks are generated and are only used for tests. In the submodirectories, you need to run go generate and the mocks will appear.

The mocks are generated and are only used for tests. In the submodirectories, you need to run `go generate` and the mocks will appear.
Owner

This means it's fine they are not there.

This means it's fine they are not there.
Owner

Lets close this in favour of the #23

Lets close this in favour of the #23
adamm closed this pull request 2025-04-02 19:48:19 +02:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: git-workflow/autogits#20