Skip to content

Revert "Implement FileManager.url{s,}(for:…) and NSSearchPathForDirectoriesInDomains." #1596

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
Jun 12, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jun 12, 2018

Reverts #1456

@rudkx
Copy link
Contributor Author

rudkx commented Jun 12, 2018

@swift-ci Please test

@millenomi
Copy link
Contributor

Let's revert for now. I guess we need to conditionalize the use of @testable import to debug configurations only.

@millenomi
Copy link
Contributor

millenomi commented Jun 12, 2018

My aim is, whenever a revert is generated, to write a postmortem to show what occurred.

A while ago in the discussion for #1456 we asked @shahmishal to change our build process on CI to build Foundation in the debug configuration (build-script --debug-foundation ), and we made conditional to that configuration the use of -enable-testing during the Foundation build. This enables the use of @testable import.

Unfortunately, this change is set up only on the Foundation PR CI testing and not on other CI setups. This made it fail when running tests as part of other CI configurations. This is correct as we would like validation testing to run on the binary that's actually built the way we would like to distribute it (that is, a Release binary).

I think the long-term solution here is to have a --build-foundation-testable-import flag in build-script, and that all CI configurations that run tests do so with that flag set to true, whether Foundation is built debug or release. That is:

Command line invocation Optimization settings @testable import available
--foundation Release No
--debug-foundation Debug Yes
--foundation --build-foundation-testable-import true Release Yes
--debug-foundation --build-foundation-testable-import false Debug No

For now, I'm going to pipe down to the Swift build whether @testable import is available or not, and keep its enabledness as it is (on for Debug, off for Release), and we can tackle adding the flag and changing CI later in the game so that all tests are run on CI regardless of Debug-ness.

@rudkx
Copy link
Contributor Author

rudkx commented Jun 12, 2018

Thanks so much for the write-up. I think that's an excellent process to follow and appreciate the explanation.

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.

2 participants