fix compatibility issues with go 1.21#3455
Conversation
|
"There's no need to insist on it. Most people who can use computers will install the tutorial, modify the code themselves, and compile it. The code in this discussion was not written by me; it was generated using ChatGPT. If a compatible version can be compiled, the new transmission method can be included in the compatible version if it supports go1.21; otherwise, it should be disabled." |
|
I once had some similar suggestions to keep go1.20 to support Win7, but the result of discussion was feel free to use the new go version's features |
|
假如本项目再也不支持Windows7,可以使用VxKex项目来使其在Windows7中运行。 |
|
personally, i did not feel the need to use go 1.22 features in splithttp, |
|
looks good |
|
想确认一下,Go 1.21 编译的 Xray-core 的确能在 Win7 跑吗?可能会把下个版本的编译改为 Go 1.21,或者单独给 Win7 出 release |
|
I think the discussion makes it already clear that xray does run on Windows 7 (or at least some parts of it), it's just a question of whether the project really wants to support it. It's been discussed there already but I also think that separate builds for win7 are much safer. net/http has many bugfixes in 1.22. |
1.21不行 必须降回1.20 见 https://github.com/XTLS/Xray-core/releases/tag/v1.8.4 大概有几个地方需要小改 |
|
the project could position itself like this:
|
不需要降到那么低的版本,Go1.21.4可以编译并运行,到了Go1.21.5及以上版本则不行。 |
是可以跑的,不过只能Go1.21.4及以下版本才可以跑,Go1.21.5及以上版本则不行。 |
|
@mmmray 有时间研究一下怎么给 CI 加个 Go 1.21.4 编译吗?Xray-win7-64.zip 和 Xray-win7-32.zip |
|
积累了很多 commits,我先发个新版吧,下个版本再给 releases 加 Win7 专版,下个版本只积累 bug fixes, |
给所有用新版本特性的地方加个build flag绕过或者抛错误 感觉会很丑陋 |
|
|
I now also agree with Fangliding, build flags are ugly. The code compiles fine on 1.21.4 without changes, so there is hope. I just don't know what it means for new feature development. I definitely want to avoid making the testsuite pass on older versions of Go (it is already unstable enough today), and I think bug reports for Win 7 should not be processed.
Can do it next week. I also am still unsure if this is worth doing at all, I don't see a strong motivation/justification, maybe I am missing some context. |
能否也提供没有build flag的源代码,让用户尝试将编译错误信息丢给AI,让AI给出解决方案。 |
|
? |
|
@mmmray 仅提供编译,无其它支持 |


#3373 (comment)
I know 1.21 is not really supported, but the fix is very simple. it seems unnecessary to force the user to change this all the time.
perhaps there can be a minimal build for go 1.21 that does not get new transports? but then, enforced in CI. as chise suggested.