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

Remove dependency on ginkgo v1.16.4 #530

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Remove dependency on ginkgo v1.16.4 #530

merged 1 commit into from
Mar 25, 2022

Conversation

BooleanCat
Copy link
Contributor

According to the go.sum, gomega depends on github.com/onsi/ginkgo@v1.16.4 and yet it uses github.com/onsi/ginkgo@v2.0.0.

This is trivial to fix now that Go 1.18 has shipped, involving only changing the value of the Go directive to 1.18 and then doing a go mod tidy will remove it.

Resolves #529

@BooleanCat
Copy link
Contributor Author

I see failures related to go mod failing. Perhaps the Go mod check should only happen with Go 1.18 and all tests can be run on 1.16, 1.17, 1.18.

I'm not sure what the policy is for Gomega regarding Go compatibility but 1.16 is actually past end of life anyway.

@BooleanCat
Copy link
Contributor Author

@blgm I've added a second commit that changes how tests are executed through github actions:

  1. Test with Go 1.18
  2. Only check for go mod tidy changes with latest Go

What do you think about dropping 1.16 testing now that it's end of life?

@onsi
Copy link
Owner

onsi commented Mar 21, 2022

Hey @BooleanCat thanks for this! So glad to see this crazy circular dependency finally get broken. I'm good with dropping 1.16 now that 1.18 is out. Do you mind updating the PR with that?

@BooleanCat
Copy link
Contributor Author

@onsi Done!

@BooleanCat
Copy link
Contributor Author

I can reproduce these failures locally - taking a look now.

@BooleanCat
Copy link
Contributor Author

It looks like tests are failing because GetAndCompileTest no longer functions in Go 1.18. This function downloads a go package, compiles and runs the tests and does so in the GOPATH. It uses get get to achieve this and calling go get outside the context of a go module is disallowed in Go 1.18.

@BooleanCat
Copy link
Contributor Author

I attempted to use go install in the implement ion instead but it then complains about a missing version for the target package. If I then add @latest suffix to the package being used for the failing test I get another failure indicating that using go install to get a non-main package isn't allowed.

Updating to Go 1.18 may simply incur a breaking change to Gomega here.

@BooleanCat
Copy link
Contributor Author

Looks like tests are failing against Go 1.18 without any changes - I'll open a separate issue for this.

@BooleanCat
Copy link
Contributor Author

Blocked on #531

@BooleanCat
Copy link
Contributor Author

Fix for Go 1.18 here, will rebase once merged: #532

@onsi
Copy link
Owner

onsi commented Mar 25, 2022

hey @BooleanCat - sorry for the delay. I think this is unblocked now.

@BooleanCat
Copy link
Contributor Author

@onsi I've done a cheeky rebase now that it's working with Go 1.18

@onsi
Copy link
Owner

onsi commented Mar 25, 2022

thanks!

@onsi onsi merged commit 4dea8d5 into onsi:master Mar 25, 2022
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

Successfully merging this pull request may close these issues.

Don't depend on github.com/onsi/ginkgo v1.16.4
2 participants