Skip to content

Give SwiftValue a tailored description property similar to Darwin's #2699

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
Mar 12, 2020

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Feb 25, 2020

In particular, printing a SwiftValue on Darwin will print the
contained value, not the generic type + address dump that
is implemented by NSObject.

This brings that same behavior to non-Apple platforms.

@millenomi
Copy link
Contributor

@swift-ci please test

@millenomi
Copy link
Contributor

@tbkka should tests be added?

@tbkka
Copy link
Contributor Author

tbkka commented Feb 25, 2020

I put together a very basic test to verify this functionality. I think I connected the test to all the right places: CMakeLists.txt, main.swift, and both Xcode projects.

@tbkka
Copy link
Contributor Author

tbkka commented Feb 25, 2020

@swift-ci Please test

@millenomi
Copy link
Contributor

All good beside the comment.

@millenomi
Copy link
Contributor

@swift-ci please test

@millenomi
Copy link
Contributor

@swift-ci please test and merge

1 similar comment
@millenomi
Copy link
Contributor

@swift-ci please test and merge

@tbkka
Copy link
Contributor Author

tbkka commented Feb 28, 2020

@swift-ci Please test

@tbkka
Copy link
Contributor Author

tbkka commented Mar 5, 2020

@swift-ci Please test macOS

1 similar comment
@tbkka
Copy link
Contributor Author

tbkka commented Mar 6, 2020

@swift-ci Please test macOS

@spevans
Copy link
Contributor

spevans commented Mar 10, 2020

@tbkka Could you rebase this to remove the merge commit and then it can be merged. Ignore the macOS failures, thats a separate issue.

In particular, printing a SwiftValue on Darwin will print the
contained value.  This brings that same behavior to non-Apple platforms.
@tbkka tbkka force-pushed the tbkka-swiftValue-description branch from 53905e5 to d62a826 Compare March 10, 2020 16:28
@tbkka
Copy link
Contributor Author

tbkka commented Mar 10, 2020

@spevans -- I rebased this on top of up-to-date master. It should be a trivial merge now.

@tbkka
Copy link
Contributor Author

tbkka commented Mar 10, 2020

@swift-ci Please test and merge

@tbkka
Copy link
Contributor Author

tbkka commented Mar 11, 2020

@swift-ci Please test Linux

@tbkka
Copy link
Contributor Author

tbkka commented Mar 11, 2020

@spevans -- I don't seem to be able to trigger CI test and merge. Can you help?

@spevans
Copy link
Contributor

spevans commented Mar 11, 2020

@swift-ci test linux

@spevans spevans merged commit 90d19f1 into swiftlang:master Mar 12, 2020
@spevans
Copy link
Contributor

spevans commented Mar 16, 2020

This testBridgedDescription test fails on macOS - both running against corelibs-foundation and Darwin Foundation.
I have added a PR #2732 to remove the force-unwrap that was crashing the tests but a proper solution will need to be found to make the test pass - or disabled is its not meant to work with an ObjC runtime present.

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.

3 participants