Add .golangci.yaml & and add .golangci.yaml config, fixes #34
Merge request reports
Activity
changed milestone to %2025.04 LEAP VPN Release
requested review from @cyberta
assigned to @peanut2
We can also fix this little thing: obfsvpn!69 (comment 1231443) (obfsvpn should be merged before)
added 1 commit
- 08786e41 - [CI] Remove "gofmt -l ./" job from .gitlabci.yml
Hm the
gomobile
part is failing because of some dependency inconsistencies. Do you have an idea @cyberta? https://0xacab.org/leap/bitmask-core/-/jobs/682098#L20added 6 commits
-
08786e41...d3c23078 - 3 commits from branch
main
- 40dc815d - Add .golangci.yaml
- 291e8674 - Add vendor modules
- d3c8ebbd - [CI] Remove "gofmt -l ./" job from .gitlabci.yml
Toggle commit list-
08786e41...d3c23078 - 3 commits from branch
Hm, Why are you adding the vendoring directory here? I think we should avoid that.
Fyi: I've rebased with last main, now there's a divergence between go.mod and vendor directory. When I'm back I could re run the vendor command, but I would prefer we kept the repo small and don't duplicate the code we already maintain in different repositories.
@jkito was a fan having it in the desktop repo. One real benefit I see is that the CI stages don't have to fetch the go modules every time.
blog posts about to vendor or not:
- https://penkovski.com/post/to-vendor-or-not-to-vendor/
- https://victoriametrics.com/blog/vendoring-go-mod-vendor/
In the end, I'm a bit more on the
yes
side. Reason: In a censored environment (maybe Github is down/censored - even if there is https://proxy.golang.org) you can build the software when you have access to the repo.
added 6 commits
-
d3c8ebbd...990fca40 - 3 commits from branch
main
- c8f97bae - Add .golangci.yaml
- bc6cf491 - Add vendor modules
- 4dc229fa - [CI] Remove "gofmt -l ./" job from .gitlabci.yml
Toggle commit list-
d3c8ebbd...990fca40 - 3 commits from branch
@peanut2 the CI runner works now, but the CI fails related to the formatting issues in the vendoring directory. Could you please have a look?
added 2 commits
Still read, but for a different reason. Can you please check? It's gomobile related and I can't run/test it locally.
$ make mobileclient echo "ANDROID_NDK_HOME: ${ANDROID_NDK_HOME}" && \ go env && \ go get golang.org/x/mobile/cmd/gomobile@latest && \ go install golang.org/x/mobile/cmd/gomobile@latest && \ gomobile init && \ gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./bitmask-core.aar -v ./pkg/mobile && \ go mod tidy ANDROID_NDK_HOME: /opt/android-sdk-linux/ndk/21.4.7075529 GO111MODULE='' GOARCH='amd64' GOBIN='/usr/local/go/bin' GOCACHE='/root/.cache/go-build' GOENV='/root/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/root/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/root/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.22.2' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/builds/leap/bitmask-core/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1432177422=/tmp/go-build -gno-record-gcc-switches' go: downloading golang.org/x/mobile v0.0.0-20250106192035-c31d5b91ecc3 go: downloading golang.org/x/mod v0.22.0 go: downloading golang.org/x/sync v0.10.0 go: downloading golang.org/x/tools v0.29.0 go: downloading golang.org/x/sys v0.29.0 go: upgraded golang.org/x/crypto v0.30.0 => v0.32.0 go: added golang.org/x/mobile v0.0.0-20250106192035-c31d5b91ecc3 go: upgraded golang.org/x/mod v0.17.0 => v0.22.0 go: upgraded golang.org/x/net v0.32.0 => v0.34.0 go: upgraded golang.org/x/sys v0.28.0 => v0.29.0 go: upgraded golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d => v0.29.0 gomobile: err: exit status 1: stderr: go: inconsistent vendoring in /builds/leap/bitmask-core: golang.org/x/net@v0.34.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/crypto@v0.32.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/mobile@v0.0.0-20250106192035-c31d5b91ecc3: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/mod@v0.22.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/sys@v0.29.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/tools@v0.29.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/crypto@v0.30.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod golang.org/x/net@v0.32.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod golang.org/x/sys@v0.28.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod To ignore the vendor directory, use -mod=readonly or -mod=mod. To sync the vendor directory, run: go mod vendor make: *** [Makefile:21: mobileclient] Error 1