5 ms·
I just wish the could stabilize the compiler before piling on more features. I regularly run into internal compiler errors these days for pretty normal looking
by codr7 1y ago
I just wish the could stabilize the compiler before piling on more features.
I regularly run into internal compiler errors these days for pretty normal looking code.
It's getting to the point where I'm reluctant to invest more time in the language right now.
UPDATE: See comment below for full error message and a link to the code.
- johnfn 1y agoIn that case, you might enjoy this part of the article: > For the foreseeable future, the Go team will stop pursuing syntactic language changes for error handling
- Thaxll 1y agoI've never seen a single internal compiler issue in 10 years of working in Go. What error are you talking about?
- shivamacharya 1y agoIf you do stuff the language doesn’t support, it’s not the languages problem.
- codr7 1y agoI did nothing weird, played around a bit with the new iterators. Internal compiler errors are very much the implementation's problem. UPDATE: See comment below for full error message and a link to the code.
- shivamacharya 1y agoI only say this because I have yet to encounter a single internal compiler error in years of writing Go professionally. I can’t conceive of the kind of code one must be writing for internal compiler errors to be a repeated issue.
- deleted 1y ago[deleted]
- codr7 1y agoSo here's the complete error message: <unknown line number>: internal compiler error: unexpected types2.Invalid Please file a bug report including a short program that triggers the error. https://go.dev/issue/new https://go.dev/issue/new And here's the code that triggers it: https://github.com/codr7/shi-go/blob/main/src/shi/call.go https://github.com/codr7/shi-go/blob/main/src/shi/call.go The code is never referenced in the project, but running make in the project root with this file in it triggers the error. Remove the file and the error disappears. Happy now?
- kiitos 1y agoPaste exactly what commands you run and exactly their output, including exactly the rev of the repo you're running them in. > Remove the file and the error disappears Remove the file and the code no longer compiles, because the file contains definitions that are used by other code in the package. If removing that file doesn't break your build, something is wrong with your build! Your Makefile seems to be calling `go test src/tests/*` which is invalid syntax, I suspect that's just one of many similar kinds of mistakes, and likely indicative of a misunderstanding of the language tooling... > https://github.com/codr7/shi-go/blob/main/src/shi/call.go https://github.com/codr7/shi-go/blob/main/src/shi/call.go This code is buggy from tip to tail, my goodness! Starting with no `gofmt` formatting, everything in https://github.com/codr7/shi-go/blob/main/src/shi/vm.go https://github.com/codr7/shi-go/blob/main/src/shi/vm.go, invalid assumptions in everything that embeds a Deque, no meaningful tests, misuse of globals, the list goes on and on... ! It seems like you're programming against a language spec that you've invented yourself, maybe influenced by Go, but certainly not Go as defined!