Skip to content

SR-11283: Amend OptionSet.remove method #28378

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 22 commits into from
Dec 11, 2019
Merged

Conversation

JacobMao
Copy link
Contributor

This PR modify OptionSet.remove method to make it conform to the description of the document.
Currently this method returns wrong result when element intersects but is not fully contained.
I also added some test cases for this.

Resolves SR-11283.

@JacobMao
Copy link
Contributor Author

JacobMao commented Nov 20, 2019

cc @lilyball @lorentey

@JacobMao
Copy link
Contributor Author

@swift-ci test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 20, 2019

@JacobMao Only those with the commit bit are allowed to trigger PR testing for security reasons.

Could you please squash the merge commits out of this pull request and just leave behind a single commit with your changes?

@CodaFi CodaFi requested a review from lorentey November 20, 2019 23:45
@JacobMao
Copy link
Contributor Author

@CodaFi
thanks for your review. sorry, I forgot to squash those commits.
I will do it immediately

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

I think it's still not quite right. You can run git rebase (I prefer an interactive one with -i) and delete these commits. If you don't want them to appear in the future, you can always use git pull --rebase <target> <branch>

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I requested a slight coding style change, but otherwise this looks ready to land.

I'll be able to squash these commits when I merge this -- don't worry too much about removing them.

@lorentey
Copy link
Member

@swift-ci test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

@lorentey
Copy link
Member

Note: To help us manage compatibility risks, we'll need to delay merging this PR until the 5.2 branch is cut. (Currently scheduled for December 9th.)

@JacobMao
Copy link
Contributor Author

@swift-ci test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

@swift-ci please test

@swiftlang swiftlang deleted a comment from swift-ci Nov 21, 2019
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d5e2533

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

This seems like an infrastructure problem. Maybe the smoke test bots are having a better time

@swift-ci please smoke test macOS platform

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

Ugh, it's still happening. Ignore the macOS build. We'll get that sorted tomorrow.

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

@swift-ci please clean test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d5e2533

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

Ah, this picked up Doug's failure from this morning. Let's try one more time.

@swift-ci please clean test macOS platform

@lorentey lorentey self-assigned this Nov 22, 2019
@lorentey
Copy link
Member

@swift-ci test

@lorentey lorentey merged commit 2e17867 into swiftlang:master Dec 11, 2019
@lorentey
Copy link
Member

Oh, alas, I forgot to squash the commits. Sorry about that!

@shahmishal
Copy link
Member

We are seeing test failure after merging this PR:

Swift(macosx-x86_64) :: stdlib/OptionSetTest.swift

@shahmishal
Copy link
Member

shahmishal commented Dec 11, 2019

https://ci.swift.org/job/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/923/consoleFull

20:36:47 ******************** TEST 'Swift(macosx-x86_64) :: stdlib/OptionSetTest.swift' FAILED ********************
20:36:47 Script:
20:36:47 --
20:36:47 : 'RUN: at line 12';   rm -rf "/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp" && mkdir -p "/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp" && xcrun --toolchain default --sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx10.9  -module-cache-path '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/swift-test-results/x86_64-apple-macosx10.9/clang-module-cache' -F '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks' -toolchain-stdlib-rpath -Xlinker -rpath -Xlinker '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks'  -swift-version 4  -Xfrontend -ignore-module-source-info  -F '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' -Xlinker -rpath -Xlinker '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' -module-cache-path '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/swift-test-results/x86_64-apple-macosx10.9/clang-module-cache' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/OptionSetTest.swift -o /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp/a.out -module-name main  && codesign -f -s - /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp/a.out &&/usr/bin/env DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' LD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx:' SIMCTL_CHILD_DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx'  /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp/a.out
20:36:47 --
20:36:47 Exit Code: 134
20:36:47 
20:36:47 Command Output (stdout):
20:36:47 --
20:36:47 [ RUN      ] OptionSet.basics
20:36:47 [       OK ] OptionSet.basics
20:36:47 [ RUN      ] OptionSet.set algebra
20:36:47 stdout>>> check failed at /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/OptionSetTest.swift, line 98
20:36:47 stdout>>> expected: Optional(main.PackagingOptions(rawValue: 4)) (of type Swift.Optional<main.PackagingOptions>)
20:36:47 stdout>>> actual: nil (of type Swift.Optional<main.PackagingOptions>)
20:36:47 [     FAIL ] OptionSet.set algebra
20:36:47 OptionSet: Some tests failed, aborting
20:36:47 UXPASS: []
20:36:47 FAIL: ["set algebra"]
20:36:47 SKIP: []
20:36:47 To debug, run:
20:36:47 $ /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp/a.out --stdlib-unittest-in-process --stdlib-unittest-filter "set algebra"
20:36:47 
20:36:47 --
20:36:47 Command Output (stderr):
20:36:47 --
20:36:47 /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.script: line 1: 55283 Abort trap: 6           /usr/bin/env DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' LD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx:' SIMCTL_CHILD_DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/OptionSetTest.swift.tmp/a.out
20:36:47 
20:36:47 --
20:36:47 
20:36:47 ********************

@lorentey
Copy link
Member

Ah, we need to add availability checks to the new tests, or they will keep failing on back deployment tests. I'll take care of it.

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.

6 participants