Skip to content

Update Go version #929

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

Open
dveeden opened this issue Oct 26, 2024 · 3 comments
Open

Update Go version #929

dveeden opened this issue Oct 26, 2024 · 3 comments

Comments

@dveeden
Copy link
Collaborator

dveeden commented Oct 26, 2024

In go.mod we have the version set to 1.18

The Go release policy is "Each major Go release is supported until there are two newer major releases.". This means only 1.23 and 1.22 are in support.

https://go.dev/doc/devel/release#:~:text=Each%20major%20Go%20release%20is%20supported%20until%20there%20are%20two%20newer%20major%20releases.

Not sure how this would impact projects depending on go-mysql.

Not sure if there are any real benefits to bumping the version either.

If we bump the version, should we go to 1.21, 1.22? or 1.23?

diff --git a/go.mod b/go.mod
index 612dad7..d7e79cf 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/go-mysql-org/go-mysql
 
-go 1.18
+go 1.21
 
 require (
        github.com/BurntSushi/toml v1.3.2

@lance6716 @atercattus what do you think?

@serprex
Copy link
Contributor

serprex commented Feb 19, 2025

go 1.21 introduced log/slog, I could write a PR switching out logger. That would be a breaking change, unless some compatibility layer is kept to support both logging interfaces (which I currently do to wrap slog logger in https://github.com/PeerDB-io/peerdb/blob/main/flow/connectors/mysql/logger.go)

@dveeden
Copy link
Collaborator Author

dveeden commented Feb 19, 2025

My personal preference is to use the standard library where possible, and slog would match that. However I don't know what @atercattus and @lance6716 think of that.

@lance6716
Copy link
Collaborator

I also prefer the standard library. For compatibility problem, I think the developers won't be bothered much if the new logger can be configurated easily, or we provide a converter function, or we release a major version which means API break.

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

3 participants