-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: RemoveAll no longer returns *os.PathError #30491
Comments
Change https://golang.org/cl/164720 mentions this issue: |
I think we need to add a |
I don't think this is technically a release blocker. |
Also, the release is already out. What would it block? |
@bradfitz I think the point it be in 1.12.1 or 1.13 on the assumption that changing the returned error type in 1.12 (which the documentation doesn't guarantee anyway, unlike some other calls) is an important API breakage. |
Oh, if that was a request to cherry-pick the fix to Go 1.12.x, I agree. I'll let @ianlancetaylor approve. |
friendly ping @ianlancetaylor - waiting on your approval for this cherry pick candidate |
@julieqiu There is nothing to cherry pick yet. I agree that if the fix to master is sufficiently simple and safe then it should be cherry picked to the 1.12 branch. But at least to me it doesn't make sense to approve a cherry pick without knowing what we are cherry picking. |
@ianlancetaylor It is necessary to cherry picked to the 1.12 branch? And I can send a CL to 1.12 release branch later. |
@gopherbot, please backport to Go 1.12. |
Backport issue(s) opened: #30859 (for 1.12). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/167739 mentions this issue: |
Fixes #30859 Updates #30491 Change-Id: If4070e5d39d8649643d7e90f6f3eb499642e25ab Reviewed-on: https://go-review.googlesource.com/c/go/+/164720 Run-TryBot: Baokun Lee <nototon@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> (cherry picked from commit d039e12) Reviewed-on: https://go-review.googlesource.com/c/go/+/167739 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Baokun Lee <nototon@gmail.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In go 1.11, os.RemoveAll returned an *os.PathError when it failed to remove something due to a permissions issue. While not documented in the godoc for os.RemoveAll, this behavior was useful to implement a retry loop that attempted to chown the failing path and then call os.RemoveAll again (for example, https://android.googlesource.com/platform/build/soong/+/ef36053829238e24088c578eeac08a1693177757/ui/build/util.go#74). In go 1.12 os.RemoveAll returns a syscall.Errno instead, which doesn't tell the caller which path failed.
This test passes on go 1.11 but fails on go 1.12:
On go 1.11 this test passes, but fails on go 1.12:
Should os.RemoveAll always return a *os.PathError?
The text was updated successfully, but these errors were encountered: