Skip to content

Change type of the file attributes dictionary key to match the Darwin version #1100

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

Merged
merged 1 commit into from
Jul 9, 2017
Merged

Conversation

weichsel
Copy link
Contributor

@weichsel weichsel commented Jul 6, 2017

FileManager already uses FileAttributeKey instead of String as key type for attribute dictionaries for all methods except createFile. I changed it there to make the method compatible with the Darwin version.
This is a small but API breaking change. How are such cases handled usually?

@weichsel weichsel changed the title Change type of the attributes dictionary key to match the Darwin version Change type of the file attributes dictionary key to match the Darwin version Jul 7, 2017
@phausler
Copy link
Contributor

phausler commented Jul 9, 2017

We don't really have a migration strategy since there is no migrator on linux per-se... (other than the manual fix and replace).

The advantage of this version of Foundation being open source and not a system framework is that users of it can check-out to an old version and just use that for what its worth. The more important goal is to keep the swift-corelibs-foundation interface up to date with the latest and greatest version of Foundation imported from objective-c. So the change looks great to me. (as a side note it would be interesting to collect a set of project users and build a compatibility test suite for integration to other popular projects)

@swift-ci please test and merge

@swift-ci swift-ci merged commit 1b05ee5 into swiftlang:master Jul 9, 2017
@weichsel
Copy link
Contributor Author

weichsel commented Jul 9, 2017

I recently released a ZIP framework that has a comprehensive test suite. It also works on Linux.
While the framework itself already works fine on Linux, the test suite currently has some compile issues (including one that should be fixed as soon as this PR gets merged).
My goal is to get ZIP Foundation to a) compile on Linux and b) to make the test suite run through. So ZIP Foundation might be a good candidate for Darwin Foundation/Swift Foundation compatibility tests.

@parkera
Copy link
Contributor

parkera commented Jul 10, 2017

@shahmishal would be the person to talk to (I think) about adding a project to the source compatibility suite - although we don't run that against swift-corelibs-foundation yet, I think.

@shahmishal
Copy link
Member

We don’t currently support Linux, however we are planning on supporting it in the future.

@weichsel
Copy link
Contributor Author

I am currently using a custom Docker file to test Darwin/corelibs-Swift compatibility. (A similar approach as outlined here).
An automated solution similar to the source compatibility test suite, but for Darwin/corelibs-Swift compatibility would be awesome.
Let me know if I can contribute something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants