Skip to content

suggestedFilename always returns a valid filename #2643

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

Closed
wants to merge 1 commit into from

Conversation

Coeur
Copy link
Contributor

@Coeur Coeur commented Feb 3, 2020

The property suggestedFilename is documented with:

This method always returns a valid filename.

The default initializer init(url:mimeType:expectedContentLength:textEncodingName:) had a correct implementation, but the required init?(coder:) was unsafe.

@compnerd
Copy link
Member

compnerd commented Feb 3, 2020

Could you please add a test case for this?

@Coeur
Copy link
Contributor Author

Coeur commented Feb 3, 2020

I'll need some time to see how test cases are done.

@compnerd
Copy link
Member

compnerd commented Feb 3, 2020

They are just XCTest based tests in Tests/

@spevans
Copy link
Contributor

spevans commented Feb 3, 2020

TestFoundation not Tests :)

@Coeur

This comment has been minimized.

@compnerd
Copy link
Member

compnerd commented Feb 4, 2020

@Coeur I would recommend building on Windows or Linux. I suspect that you will need to adjust the Xcode build some since I imagine that the tests haven't been built with that for a while (normally the compatibility test suite is run on macOS).

@spevans
Copy link
Contributor

spevans commented Feb 4, 2020

It should build fine on macOS in Xcode as that is how I develop on it. Use the default Xcode 11.3.1 toolchain and delete DerivedData.

Ensure swift-corelibs-xctest is checked out and open the Foundation.xcworkspace not Foundation.xcodeproj. Lastly just run the TestFoundation target, that should build everything correctly.

Ive just double-checked master builds and runs ok and I dont see any issues.

@Coeur
Copy link
Contributor Author

Coeur commented Feb 4, 2020

Oh, thank you @spevans, I forgot swift-corelibs-xctest. It was documented in Docs/GettingStarted.md and Docs/Testing.md. I missed this folder somehow.

@Coeur
Copy link
Contributor Author

Coeur commented Feb 5, 2020

@compnerd @spevans test added.

@Coeur Coeur force-pushed the patch-2 branch 2 times, most recently from 37229e8 to 6f551ae Compare February 5, 2020 03:43
@spevans
Copy link
Contributor

spevans commented Feb 7, 2020

@swift-ci test

@Coeur

This comment has been minimized.

@spevans
Copy link
Contributor

spevans commented Feb 12, 2020

Sometimes the messages between github and swift-ci get lost, i'll start another test

@spevans
Copy link
Contributor

spevans commented Feb 12, 2020

@swift-ci test

@Coeur
Copy link
Contributor Author

Coeur commented Mar 23, 2020

@spevans @millenomi can we get it merged? Thank you.

@shahmishal shahmishal closed this Oct 6, 2020
@shahmishal
Copy link
Member

The Swift project moved the default branch to main and deleted master branch, so GitHub automatically closed the PR. Please re-create pull request with main branch.

More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412

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.

4 participants