Skip to content
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

[SR-11922] FileHandle.truncate(at/toOffset): Different signature between DarwinFoundation and SwiftFoundation. #3370

Closed
YOCKOW opened this issue Dec 8, 2019 · 3 comments
Assignees

Comments

@YOCKOW
Copy link
Collaborator

YOCKOW commented Dec 8, 2019

Previous ID SR-11922
Radar None
Original Reporter @YOCKOW
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.1.2

  • macOS 10.15.1

  • Ubuntu 18.04

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @YOCKOW
Priority Medium

md5: ddeef0edfc9bc133b9bde9fea61465c4

Issue Description:

Because FileHandle's "truncateFile(atOffset: )" has been deprecated on both DarwinFoundation and SwiftFoundation, new function is introduced. However, the signatures are different between DarwinFoundation and SwiftFoundation:

"func truncate(atOffset offset: UInt64) throws" on DarwinFoundation.
See https://developer.apple.com/documentation/foundation/filehandle/3172532-truncate

"func truncate(toOffset offset: UInt64) throws" on SwiftFoundation.
See 55c404b#diff-8ecab93373e5147e5738e6bdebbcda43R372

This makes incompatibility.

@YOCKOW
Copy link
Collaborator Author

YOCKOW commented Dec 8, 2019

It is desirable to resolve this along with SR-11926.

@YOCKOW
Copy link
Collaborator Author

YOCKOW commented Dec 9, 2019

#2582

@YOCKOW
Copy link
Collaborator Author

YOCKOW commented Dec 12, 2019

Merged into master: 52e5404

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant