-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
archive/tar: decide before go1.22 whether the FileInfoNames interface is Unix-only use #65245
Comments
Change https://go.dev/cl/556399 mentions this issue: |
cc @dsnet because https://dev.golang.org/owners |
More information: The reason this interface only changed FileInfoHeader behavior on unix was that we didn't know how non-Unix systems like windows could get uid and gid from fs.FileInfo. I just reviewed #50102, and it seems that this interface is designed to avoid any id ->name lookups. Looks like that's what we're going to do here:
I'll send a CL later to do that. My understanding of the non Unix uid and gid only from https://pkg.go.dev/os/user#User. |
…or only in unix fix invalid documentation links incidentally. For golang#65245 Change-Id: I58ebdb22d6051f676f38e7bed8bc8d9fddcbf6b4
Change https://go.dev/cl/558135 mentions this issue: |
Sorry, my description of the implementation wasn't quite right. |
I suggest FileInfoNames changing FileInfoHeader behavior on unix only at go1.22 . |
The Since this is a new feature in Go 1.22 and we're very deep into the release cycle at this point, we should probably roll back the API addition and send it back through proposal review to revise the interface. |
Change https://go.dev/cl/558295 mentions this issue: |
Change https://go.dev/cl/557840 mentions this issue: |
This reverts CL 514235. Also reverts CL 518056 which is a followup fix. Reason for revert: Proposal #50102 defined an interface that is too specific to UNIX-y systems and also didn't make much sense. The proposal is un-accepted, and we'll revisit in Go 1.23. Fixes (via backport) #65245. Updates #50102. Change-Id: I41ba0ee286c1d893e6564a337e5d76418d19435d Reviewed-on: https://go-review.googlesource.com/c/go/+/558295 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
CL 514235 is reverted. Updates #65245. Updates #61422. Change-Id: Ib5d2e16c982ab25c8a87af2bdaee8568446cf599 Reviewed-on: https://go-review.googlesource.com/c/go/+/557840 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Change https://go.dev/cl/558296 mentions this issue: |
…ace" This reverts CL 514235. Also reverts CL 518056 which is a followup fix. Reason for revert: Proposal #50102 defined an interface that is too specific to UNIX-y systems and also didn't make much sense. The proposal is un-accepted, and we'll revisit in Go 1.23. Fixes #65245. Updates #50102. Change-Id: I41ba0ee286c1d893e6564a337e5d76418d19435d Reviewed-on: https://go-review.googlesource.com/c/go/+/558295 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit 5000b51) Reviewed-on: https://go-review.googlesource.com/c/go/+/558296
Closed by merging 333ecd4 to release-branch.go1.22. |
This reverts CL 514235. Also reverts CL 518056 which is a followup fix. Reason for revert: Proposal golang#50102 defined an interface that is too specific to UNIX-y systems and also didn't make much sense. The proposal is un-accepted, and we'll revisit in Go 1.23. Fixes (via backport) golang#65245. Updates golang#50102. Change-Id: I41ba0ee286c1d893e6564a337e5d76418d19435d Reviewed-on: https://go-review.googlesource.com/c/go/+/558295 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
CL 514235 is reverted. Updates golang#65245. Updates golang#61422. Change-Id: Ib5d2e16c982ab25c8a87af2bdaee8568446cf599 Reviewed-on: https://go-review.googlesource.com/c/go/+/557840 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Update : #65245 (comment) And #65245 (comment)
#50102 add FileInfoNames interface to archive/tar
I in August 2023 by https://go-review.googlesource.com/c/go/+/514235 wrote an implementation for the proposal
(My CL only has a complete implementation for changing FileInfoHeader behavior on unix.)
See https://pkg.go.dev/os/user#User , seems that there is no guarantee that uid and gid for non Unix systems are of type int.
This need to be resolved before go1.22 is released, in case it cannot be resolved in a backward compatible way in the future.
Possible solutions:
The text was updated successfully, but these errors were encountered: