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

feat(cicd): support golang 1.16 #104

Merged

Conversation

RicoToothless
Copy link
Contributor

👏 解決掉的 issue / Resolved Issues

📝 相關的 issue / Related Issues

none

⛏ 變更內容 / Details of Changes

  • support golang 1.16

@PichuChen
Copy link
Member

我們會有打算向下相容到哪個版本嗎?

@RicoToothless
Copy link
Contributor Author

才疏學淺,目前我是想不到 golang version 向下相容有什麼特別的需求,還請多多指教
個人看法是 golang version 能升就升,有程式邏輯錯誤能改就改,不能改就固定在那個 version 就好了

@PichuChen
Copy link
Member

才疏學淺,目前我是想不到 golang version 向下相容有什麼特別的需求,還請多多指教
個人看法是 golang version 能升就升,有程式邏輯錯誤能改就改,不能改就固定在那個 version 就好了

簡單來說就是調整成 1.16 之後其實會鼓勵開發者使用 1.16 的新特色,但是假如有人的機器他的環境可能沒有到 1.16 ,開發上就會有障礙,因此就變成我們的程式碼需要考慮到多舊的版本這樣。

雖然 Golang 設計時會保證相容性,不過這個相容性是在我們原有的程式碼在 Golang 升級上去時還會能用這樣。

所以具體來說我們要不要繼續保留對 golang 1.14 的測試,還是就最低支援版本直接拉到1.16了這樣?

@RicoToothless
Copy link
Contributor Author

查了一下,至少 homebrew 已經支援 go 1.16

個人覺得維護單一版本比較單純,如果 1.16 太新,或許可以考慮 1.15?

@PichuChen
Copy link
Member

我的想法是 matrix 他可以同時測試多個版本
因此如果說不是改掉原本的 1.14 而是增加 1.16 這樣,也就是讓 matrix 同時測試這兩個版本呢?

@y2468101216
Copy link
Collaborator

可能要研究一下 golang 有沒有所謂的 LTS ,我們可以一直相容 LTS 跟最新版本就好

@Julian-Chu
Copy link
Contributor

Julian-Chu commented Feb 25, 2021

就直接拉到1.16就好了, go支援兩個最新的major version,1.14接著就不支援了
現時點改成1.15的必要性不大, 最重要的是1.16支援M1,看看多少開發者用mac。ioutil也整併去io,用1.15後續可能還是要動到。1.16 embedded file也許在config也用的到。

往下測試沒問題,不過規範的開發環境還是升到1.16

@RicoToothless
Copy link
Contributor Author

這邊補一下 golang relase policy
不過要強制要求大家都要用 1.16 可能有人不會注意到,
或許測多個版本可以一目了然只是單純 golang version 的問題而不是邏輯上的問題。

@PichuChen PichuChen merged commit db3bd8f into Ptt-official-app:development Feb 25, 2021
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.

[建議] 支援 golang 1.16
4 participants