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

Update Go directive #257

Merged
merged 1 commit into from Apr 23, 2024
Merged

Update Go directive #257

merged 1 commit into from Apr 23, 2024

Conversation

Zerpet
Copy link
Contributor

@Zerpet Zerpet commented Apr 23, 2024

In #251, we used URI.Has() function, which was introduced in Go 1.17.
We also have a dependency on uber-go-leak, which requires Go 1.20. In
addition, we only test in "oldstable" and "stable" versions in CI. That
means, we test in version N and N-1, where N is the latest available
version of Go.

Attempting to build the tests in Go 1.16 errors with:

# github.com/rabbitmq/amqp091-go [github.com/rabbitmq/amqp091-go.test]
./uri.go:148:11: params.Has undefined (type url.Values has no field or method Has)
./uri.go:156:11: params.Has undefined (type url.Values has no field or method Has)
./uri.go:164:11: params.Has undefined (type url.Values has no field or method Has)

Attempting to build with 1.17 yields:

gmake tests
go test -race -v -tags integration
# go.uber.org/goleak/internal/stack
../../go/pkg/mod/go.uber.org/goleak@v1.3.0/internal/stack/stacks.go:123:19: undefined: errors.Join
../../go/pkg/mod/go.uber.org/goleak@v1.3.0/internal/stack/stacks.go:256:18: undefined: strings.CutPrefix
note: module requires Go 1.20
FAIL	github.com/rabbitmq/amqp091-go [build failed]
gmake: *** [Makefile:20: tests] Error 2

In #251, we used `URI.Has()` function, which was introduced in Go 1.17.
We also have a dependency on uber-go-leak, which requires Go 1.20. In
addition, we only test in "oldstable" and "stable" versions in CI. That
means, we test in version N and N-1, where N is the latest available
version of Go.

Signed-off-by: Aitor Perez Cedres <aitor.perez@broadcom.com>
@Zerpet Zerpet requested a review from lukebakken April 23, 2024 15:32
@Zerpet Zerpet added this to the 1.9.1 milestone Apr 23, 2024
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@Zerpet Zerpet merged commit 1ea08ba into main Apr 23, 2024
7 checks passed
@Zerpet Zerpet deleted the chore/update-deps branch April 23, 2024 17:00
@Zerpet Zerpet added the enhancement New feature or request label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants