Skip to content

Comments

Build: set 1.17 as minimum supported Go version#3461

Merged
JoeKar merged 1 commit intomicro-editor:masterfrom
alexandear:go-mod-version
Sep 16, 2024
Merged

Build: set 1.17 as minimum supported Go version#3461
JoeKar merged 1 commit intomicro-editor:masterfrom
alexandear:go-mod-version

Conversation

@alexandear
Copy link
Contributor

@alexandear alexandear commented Sep 9, 2024

The PR sets Go version in the go.mod to 1.17 and run go mod tidy.
Also, adds Go 1.23 to CI.

@JoeKar
Copy link
Member

JoeKar commented Sep 9, 2024

The PR sets Go version in the go.mod to 1.19 and run go mod tidy. Looks like this is the minimum-supported Go version for the project.

Currently I'm not aware of if the build is still possible with something lower than 1.19, but at least the whole build and test infrastructure uses this fixed version.
I can live with that.

Can you please rebase the history of your PR to split the changes of go.mod, go mod tidy and build tags into separate commits?

@Andriamanitra
Copy link
Contributor

Currently I'm not aware of if the build is still possible with something lower than 1.19, but at least the whole build and test infrastructure uses this fixed version. I can live with that.

I was able to build micro with a go version as old as go@1.17 (linux/amd64). If I go down to go@1.16 the build starts failing due to internal/clipboard/clipboard.go:6:2: //go:build comment without // +build comment.

Of course "happens to work on this version" does not necessarily mean the same thing as minimum supported version.

@JoeKar
Copy link
Member

JoeKar commented Sep 10, 2024

If I go down to go@1.16 the build starts failing due to internal/clipboard/clipboard.go:6:2: //go:build comment without // +build comment.

So it didn't match this minimum go version requirement either.
Since the test action was introduced more than 1 year ago (via d1af21f) with go@1.19 I recommend that we stick to a min. version of 1.19 as long as possible, to have it somehow comprehensible.

PS:
1.19 is in golang stable (bookworm) and backported to oldstable (bullseye).

@dmaluka
What is your opinion?

@dmaluka
Copy link
Collaborator

dmaluka commented Sep 10, 2024

Currently I'm not aware of if the build is still possible with something lower than 1.19

It so happens that I've been building micro with 1.17 on my primary machine all this time, so I can confirm that 1.17 actually works for us.

So, do we have any actual reason to require 1.19 as the minimum version? If not, I'd suggest we stick to 1.17 for now. Why unnecessarily complicate lives of users who want to build micro with an older version of Go?

but at least the whole build and test infrastructure uses this fixed version.

In fact even that turns out to be not exactly non-controversial. There has just been a report of an unfortunate regression we introduced in 2.0.14: #3463

@alexandear
Copy link
Contributor Author

alexandear commented Sep 11, 2024

Currently, only Go 1.22 and 1.23 is supported according to the release policy. So, even Go 1.19 is deprecated.


Can you please rebase the history of your PR to split the changes of go.mod, go mod tidy and build tags into separate commits?

Done.

@dmaluka
Copy link
Collaborator

dmaluka commented Sep 11, 2024

Currently, only Go 1.22 and 1.23 is supported according to the release policy. So, even Go 1.19 is deprecated.

That is Go release policy, not our release policy.

Thanks for the note though, it seems a good idea to bump up Go from 1.19 to 1.22 or newer in our build infra.

Which doesn't mean that we should prevent users from building micro on their own with an older Go version if they want to.

@JoeKar
Copy link
Member

JoeKar commented Sep 11, 2024

So, do we have any actual reason to require 1.19 as the minimum version? If not, I'd suggest we stick to 1.17 for now.

Ok, I've no problem with that either. So we bump go 1.16 to go 1.17 in go.mod and...

Thanks for the note though, it seems a good idea to bump up Go from 1.19 to 1.22 or newer in our build infra.

...do so.

@dmaluka
Copy link
Collaborator

dmaluka commented Sep 11, 2024

So we bump go 1.16 to go 1.17 in go.mod

And also update this sentence in README.md: "Make sure that you have Go version 1.16 or greater and Go modules are enabled."

@alexandear alexandear changed the title Build: set 1.19 as minimum supported Go version Build: set 1.17 as minimum supported Go version Sep 12, 2024
@JoeKar JoeKar merged commit a3211dc into micro-editor:master Sep 16, 2024
@alexandear alexandear deleted the go-mod-version branch September 16, 2024 20:11
@JoeKar JoeKar mentioned this pull request Sep 22, 2024
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.

4 participants