Changing source code in order code to be supported from older Golang versions e.g. Go 1.10

192 views
Skip to first unread message

Dimitrios Trechas

unread,
Mar 5, 2020, 11:08:07 AM3/5/20
to golang-nuts
Dear colleagues,

There are even now cases that a Windows XP is needed. The latest Golang compiler that could target XP was 1.10.

Is there anyone who had to write a source converter that could convert recent Golang code to backwards compatible code (in case there is no version clash/hell of different libs) ? E.g. number literals, source modules to Golang 1.10?


Thank you in advance.  

Amnon Baron Cohen

unread,
Mar 6, 2020, 6:20:38 PM3/6/20
to golang-nuts
Anyone who is able to put up with a 20 year old OS
will be able to tolerate a 2 year old Go version...

Jake Montgomery

unread,
Mar 6, 2020, 7:11:44 PM3/6/20
to golang-nuts
On Friday, March 6, 2020 at 1:20:38 PM UTC-5, Amnon Baron Cohen wrote:
Anyone who is able to put up with a 20 year old OS
will be able to tolerate a 2 year old Go version...

Dimitrios' question is a perfectly legitimate one. Your response does nothing to actually answer the question. It also comes across as a bit snarky. Just a friendly reminder that the Go community strives to be "friendly and welcoming" to all. https://golang.org/conduct is a worthwhile read.


Jesper Louis Andersen

unread,
Mar 7, 2020, 11:42:28 AM3/7/20
to Dimitrios Trechas, golang-nuts
While it isn't supported, it might be there are not that much work needed to make 1.14 run on Windows XP. At least you should consider that path as well in addition to program rewriting. It may be a simpler path.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9c246db8-5197-4e1d-a32e-2bca11e99e20%40googlegroups.com.


--
J.

Amnon Baron Cohen

unread,
Mar 7, 2020, 1:38:17 PM3/7/20
to golang-nuts


On Saturday, 7 March 2020 11:42:28 UTC, Jesper Louis Andersen wrote:
While it isn't supported, it might be there are not that much work needed to make 1.14 run on Windows XP. At least you should consider that path as well in addition to program rewriting. It may be a simpler path.

On Thu, Mar 5, 2020 at 12:08 PM Dimitrios Trechas <dtr...@gmail.com> wrote:
Dear colleagues,

There are even now cases that a Windows XP is needed. The latest Golang compiler that could target XP was 1.10.

Is there anyone who had to write a source converter that could convert recent Golang code to backwards compatible code (in case there is no version clash/hell of different libs) ? E.g. number literals, source modules to Golang 1.10?


Thank you in advance.  

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.


--
J.

Amnon Baron Cohen

unread,
Mar 7, 2020, 1:43:50 PM3/7/20
to golang-nuts

Manlio Perillo

unread,
Mar 7, 2020, 2:23:37 PM3/7/20
to golang-nuts

Brian Candler

unread,
Mar 7, 2020, 3:28:46 PM3/7/20
to golang-nuts
I think the problem with compiling code written for go 1.14 with the compiler for go 1.10 is not so much the minor language features like number literals, but additions to the standard library which those applications may depend on.

This means you may need to backport parts of the standard library to go 1.10 as well.

Amnon Baron Cohen

unread,
Mar 8, 2020, 8:31:18 AM3/8/20
to golang-nuts
Microsoft stopped supporting XP in 2006. This meant XP machines stopped getting security updates.
The following year the WannaCry trojan infected 200,000 XP computers globally, including 80,000 in Britain's
National Health Service (including some MRI machines). This caused a major crisis in hospitals, the cancellation
of all non-urgent procedures and the reversion to manual methods of administration. This attack cost the NHS
over £80 million. Nobody has ever estimated the impact on patient outcome.

There are many ways could try to "help" Dimitrios find ways to run modern Go code on XP, and help him 
extend the lifetime of his fleet of XP machines. But this would keep his organisation vulnerable to the next
WannaCry attack. So I would suggest the most useful response is "don't do it".

Jesper Louis Andersen

unread,
Mar 8, 2020, 12:16:59 PM3/8/20
to Amnon Baron Cohen, golang-nuts
On Sun, Mar 8, 2020 at 9:31 AM Amnon Baron Cohen <amn...@gmail.com> wrote:

There are many ways could try to "help" Dimitrios find ways to run modern Go code on XP, and help him 
extend the lifetime of his fleet of XP machines. But this would keep his organisation vulnerable to the next
WannaCry attack. So I would suggest the most useful response is "don't do it".


The key point here is risk assessment. Your points are what should be factored into such a decision. Personally, I would seek to upgrade out of such old software, and I think it is somewhat healthy that we eventually make operating vulnerable systems cost-ineffective. But you also have to factor in a lot of other considerations. Some people are somewhat forced to live with the risk of a software vulnerability because there are other parts of the infrastructure you cannot upgrade. So you do your best to wall off the rest of the world and keep using the old system. It isn't ideologically sound. It isn't a good viable long-term solution. But at times, the survival of a company requires you to gamble with the risk.

Another observation is that to upgrade out of old software, you need to create an upgrade path that is viable. Since you are somewhat left behind, there are reasons for building some stepping stones along the way, perhaps not just tossing a hail-mary to the newest versions in the hope it fixes everything. Exploring these options might make it easier to handle the situation and slowly move away from a platform you don't want to be part of anymore. You strike the system and listen for where there is a resonance, you can use to lift yourself out of the misery.


Reply all
Reply to author
Forward
0 new messages