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

Ignore build constraints not working #30

Open
xoxys opened this issue Dec 11, 2024 · 1 comment
Open

Ignore build constraints not working #30

xoxys opened this issue Dec 11, 2024 · 1 comment

Comments

@xoxys
Copy link

xoxys commented Dec 11, 2024

According to #22 build constraints should be excluded. However, executing mod on this test repo https://github.com/xoxys/renovate-reproduce the imports on https://github.com/xoxys/renovate-reproduce/blob/main/internal/docs/main.go are not updated.

❯ go run github.com/marwan-at-work/mod/cmd/[email protected] upgrade --mod-name=github.com/google/go-github/v66
running go mod tidy...
go: finding module for package github.com/google/go-github/v66/github
go: found github.com/google/go-github/v66/github in github.com/google/go-github/v66 v66.0.0

❯ git diff
diff --git a/go.mod b/go.mod
index 8d13da5..b3a4de5 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,9 @@ module github.com/xoxys/renovate-reproduce
 
 go 1.23.1
 
-require github.com/google/go-github/v66 v66.0.0
+require (
+       github.com/google/go-github/v66 v66.0.0
+       github.com/google/go-github/v67 v67.0.0
+)
 
 require github.com/google/go-querystring v1.1.0 // indirect
diff --git a/go.sum b/go.sum
index 4e289aa..6aca6cc 100644
--- a/go.sum
+++ b/go.sum
@@ -3,6 +3,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
 github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M=
 github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4=
+github.com/google/go-github/v67 v67.0.0 h1:g11NDAmfaBaCO8qYdI9fsmbaRipHNWRIU/2YGvlh4rg=
+github.com/google/go-github/v67 v67.0.0/go.mod h1:zH3K7BxjFndr9QSeFibx4lTKkYS3K9nDanoI1NjaOtY=
 github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/main.go b/main.go
index b6df32d..cd71117 100644
--- a/main.go
+++ b/main.go
@@ -3,7 +3,7 @@ package main
 import (
        "fmt"
 
-       "github.com/google/go-github/v66/github"
+       "github.com/google/go-github/v67/github"
 )
 
 func main() {
@xoxys
Copy link
Author

xoxys commented Dec 11, 2024

What works is adding back BuildFlags: []string{"-tags=generate"}, to the packages config. Not sure if that's the "correct" way.

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

1 participant