all: support for Go 1.27#5477
Conversation
|
Size difference with the dev branch: Binary size differencedrivers/sizes-dev.txt has more commands than drivers/sizes-pr.txt
tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/adafruit4650
flash ram
before after diff before after diff
|
|
Added another commit with support for the new |
|
It got further. I think perhaps the new set of errors might have to do with the SSA changes for generics we were just discussing @jakebailey @aykevl |
|
Added another commit that updates |
|
For Windows, seems like you need the I think |
|
I think I actually have all of the other failures figured out, but, not sure what to do with the fixes. One or two of them I can send to |
cfcf9cd to
db17b48
Compare
|
@jakebailey I just overwrote your commits that you had already added to this branch by force puching without having pulled your changes to my local branch first. Sorry about that, my bad :( Can you help get them back in please? |
|
I don't have the ability to for a few days but you can download these and git apply them |
|
@jakebailey thanks! Just ammended this PR with those 2 commits... |
|
Looks like the test failures so far are perhaps related to |
|
Yeah, I couldn't figure those out as they did not reproduce locally |
|
Actually it seems like it was |
|
That last commit reminds me of #5508 |
|
#5508 was merged, then I removed my commit from this branch and rebased in the latest |
|
Looks like I needed a version of that commit after all to handle the float32/float64 difference. |
|
Rebased now that #5519 has been merged into |
|
I think we should open an issue for each of the tests that we needed to skip so we do not lose track of them, and then we should squash/merge the rest of this PR since 1.27 is nearly here. Any thoughts on this? |
|
I'm already looking into some of them, but issues would be nice of course; they're definitely not things that are blockers given they don't affect 1.26 |
|
@jakebailey does that mean you are in favor of merge? Other people, also please provide feedback. |
|
Yes; the issue with But in any case, I don't think that this means this PR is incomplete. |
Signed-off-by: deadprogram <ron@hybridgroup.com>
Signed-off-by: deadprogram <ron@hybridgroup.com>
Go 1.27 adds generic methods (golang/go#77273). golang.org/x/tools go/ssa v0.42.0 does not instantiate them: objectMethod only applies receiverTypeArgs and ignores method-level type parameters, so a call such as (*math/rand/v2.Rand).N resolves to the abstract generic method and its body reaches createConst with a type-parameter-typed zero constant, triggering "panic: expected nil interface constant". Upgrade golang.org/x/tools to v0.47.0, whose go/ssa returns nil from MethodValue for generic methods and instantiates method-level type parameters. No compiler changes are required. Since x/tools v0.47.0 requires Go 1.25, raise the minimum supported Go version from 1.24 to 1.25. Signed-off-by: deadprogram <ron@hybridgroup.com>
Go 1.27 packages can emit stack probes on Windows amd64 and arm64. Link the compiler-rt stack probe builtins and use compiler-rt for those targets so these packages build.
Go 1.27 jsonv2 pushes testdata/json.go beyond the LM3S6965 flash budget. Keep coverage on larger emulated targets while skipping only the too-small Cortex-M QEMU configuration.
Signed-off-by: deadprogram <ron@hybridgroup.com>
Signed-off-by: deadprogram <ron@hybridgroup.com>
|
I have rebased the commits into the most atomic set I can detemine. Leaving the commits to skip tests to provide a more specific trail for us to restore those tests when we are able instead of just creating issues. Thank you very much for all your help to get this done @jakebailey ⭐ Waiting for CI to complete, then will merge... |
|
The Wasi issue is just Goexit not working on Wasm, so that just has to be skipped until Wasm in general supports panic/recover properly. |
OK, that makes sense. There is already #4380 for when that occurs. |
This PR is to add support for Go 1.27
Current passes tests on 1.27-rc2