lima
lima copied to clipboard
Stale comment about `::`
https://github.com/lima-vm/lima/blob/3ff1a15530f5f4b5ce9eb98600c72ea00fd914c6/pkg/guestagent/api/api.go#L26
{"level":"debug","msg":"guest agent event: {Time:2022-02-24 11:34:59.035917781 +0000 UTC LocalPortsAdded:[{IP::: Port:10250} {IP::: Port:6443} {IP::: Port:22} {IP:127.0.0.1 Port:43939} {IP:0.0.0.0 Port:31174} {IP:127.0.0.1 Port:10248} {IP:127.0.0.1 Port:10249} {IP:127.0.0.1 Port:10251} {IP:127.0.0.1 Port:10252} {IP:127.0.0.1 Port:6444} {IP:127.0.0.1 Port:10256} {IP:0.0.0.0 Port:32433} {IP:127.0.0.1 Port:10258} {IP:0.0.0.0 Port:22} {IP:127.0.0.1 Port:80} {IP:127.0.0.1 Port:443}] LocalPortsRemoved:[] Errors:[]}","time":"2022-02-24T06:34:59-05:00"}
I wanted to file this bug to complain about IP::: -- It'd be really helpful if : as a label and :: as an IPv6 address weren't pasted together.
This is just the way the Go fmt package dumps a struct with the %+v format:
https://github.com/lima-vm/lima/blob/01ce318b113b88196ad4862278fdb9876cb03cc8/pkg/hostagent/hostagent.go#L489
Given that this is just a debugging log message, I'm unconvinced that it is worth the effort to make it prettier.
Can I convince you that the comment itself is wrong? It says in future, but it seems pretty clear that the future is now.
the future is now
Maybe. I think the IPv6 support is not really working, which is why we disable IPv6 lookup in the host resolver by default). So the comment may be incorrect, in that IPv6 addresses can show up now, but fixing the comment may be the smallest part of the issue. Unfortunately I can't even think about this right now, but will leave the bug open as a reminder.