-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Go 1.22 to avoid scoping bugs with closures in for loops? #7758
Comments
1.66 already has Go 1.22 https://forum.rclone.org/t/rclone-v1-66-release/44987
|
Oh, I was going based on the go.mod file, which still says Line 3 in 2c76800
|
Aha, I guess the minimum version is still 1.20, and the CI still tests go1.20. Nothing to do here. Thanks, @Animosity022! |
@dmcardle we try to support current go and two previous versions, so currently that is go1.22, go1.21, go1.20. However in two go versions time that support will look like go1.24, go1.23, go1.22 so at that point we can remove those unnecessary lines of code so you can re-open that issue then if you want! Eg this (might not be all of them if we renamed the var too).
|
The associated forum post URL from
https://forum.rclone.org
N/a
What is the problem you are having with rclone?
Version of Go prior to 1.22 contain a footgun related to closures in for loops: https://go.dev/blog/loopvar-preview
Release notes for Go 1.22
I've run into this twice so far:
cmd/gitannex: Add layout modes for compatibility #7754 (comment)
rclone/cmd/gitannex/gitannex_test.go
Lines 865 to 868 in 2c76800
What is your rclone version (output from
rclone version
)HEAD, currently 2c76800
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
N/a, the language semantics are cross-platform
Which cloud storage system are you using? (e.g. Google Drive)
N/a
The command you were trying to run (e.g.
rclone copy /tmp remote:tmp
)N/a
A log from the command with the
-vv
flag (e.g. output fromrclone -vv copy /tmp remote:tmp
)N/a
How to use GitHub
The text was updated successfully, but these errors were encountered: