Skip to content

Commit

Permalink
add support for go workspaces
Browse files Browse the repository at this point in the history
Add a go.work file listing all modules in this monorepo and remove local
replace directives from all go.mod files

Signed-off-by: Sanskar Jaiswal <[email protected]>
  • Loading branch information
aryan9600 committed Jan 6, 2023
1 parent 90080a7 commit 8385fdf
Show file tree
Hide file tree
Showing 10 changed files with 415 additions and 45 deletions.
7 changes: 0 additions & 7 deletions git/gogit/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ module github.com/fluxcd/pkg/git/gogit

go 1.18

replace (
github.com/fluxcd/pkg/git => ../../git
github.com/fluxcd/pkg/gittestserver => ../../gittestserver
github.com/fluxcd/pkg/ssh => ../../ssh
github.com/fluxcd/pkg/version => ../../version
)

require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
Expand Down
10 changes: 0 additions & 10 deletions git/internal/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ module github.com/fluxcd/pkg/git/internal/e2e

go 1.18

replace (
github.com/fluxcd/pkg/git => ../../../git
github.com/fluxcd/pkg/git/gogit => ../../gogit
github.com/fluxcd/pkg/git/libgit2 => ../../libgit2
github.com/fluxcd/pkg/gittestserver => ../../../gittestserver
github.com/fluxcd/pkg/http/transport => ../../../http/transport
github.com/fluxcd/pkg/ssh => ../../../ssh
github.com/fluxcd/pkg/version => ../../../version
)

// Fix CVE-2022-1996 (for v2, Go Modules incompatible)
replace github.com/emicklei/go-restful => github.com/emicklei/go-restful v2.16.0+incompatible

Expand Down
10 changes: 0 additions & 10 deletions git/libgit2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ module github.com/fluxcd/pkg/git/libgit2

go 1.18

replace (
github.com/fluxcd/pkg/git => ../../git
// Enables the use of pkg/git/gogit/fs.
github.com/fluxcd/pkg/git/gogit => ../gogit
github.com/fluxcd/pkg/gittestserver => ../../gittestserver
github.com/fluxcd/pkg/http/transport => ../../http/transport
github.com/fluxcd/pkg/ssh => ../../ssh
github.com/fluxcd/pkg/version => ../../version
)

// Fix CVE-2022-1996 (for v2, Go Modules incompatible)
replace github.com/emicklei/go-restful => github.com/emicklei/go-restful v2.16.0+incompatible

Expand Down
29 changes: 29 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
go 1.19

use (
./apis/acl
./apis/event
./apis/kustomize
./apis/meta
./git
./git/gogit
./git/internal/e2e
./git/libgit2
./gittestserver
./helmtestserver
./http/fetch
./http/transport
./kustomize
./lockedfile
./masktoken
./oci
./oci/tests/integration
./runtime
./sourceignore
./ssa
./ssh
./tar
./testserver
./untar
./version
)
386 changes: 386 additions & 0 deletions go.work.sum

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions helmtestserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/fluxcd/pkg/helmtestserver

go 1.18

replace github.com/fluxcd/pkg/testserver => ../testserver

require (
github.com/fluxcd/pkg/testserver v0.4.0
golang.org/x/crypto v0.2.0
Expand Down
2 changes: 0 additions & 2 deletions kustomize/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/fluxcd/pkg/kustomize

go 1.18

replace github.com/fluxcd/pkg/apis/kustomize => ../apis/kustomize

require (
github.com/drone/envsubst v1.0.3
github.com/fluxcd/pkg/apis/kustomize v0.7.0
Expand Down
6 changes: 0 additions & 6 deletions oci/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ module github.com/fluxcd/pkg/oci

go 1.18

replace (
github.com/fluxcd/pkg/sourceignore => ../sourceignore
github.com/fluxcd/pkg/tar => ../tar
github.com/fluxcd/pkg/version => ../version
)

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0
Expand Down
2 changes: 0 additions & 2 deletions oci/tests/integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/fluxcd/pkg/oci/tests/integration

go 1.18

replace github.com/fluxcd/pkg/oci => ../../

require (
github.com/fluxcd/pkg/oci v0.6.0
github.com/fluxcd/test-infra/tftestenv v0.0.0-20220726140458-65e1a901cbb9
Expand Down
6 changes: 0 additions & 6 deletions runtime/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ module github.com/fluxcd/pkg/runtime

go 1.18

replace (
github.com/fluxcd/pkg/apis/acl => ../apis/acl
github.com/fluxcd/pkg/apis/event => ../apis/event
github.com/fluxcd/pkg/apis/meta => ../apis/meta
)

require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20221103172237-443f56ff4ba8
github.com/fluxcd/pkg/apis/acl v0.1.0
Expand Down

0 comments on commit 8385fdf

Please sign in to comment.