Skip to content

🛑 DON'T MERGE [test] Fix source-stability test and revert #18793 #18794

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

Conversation

lorentey
Copy link
Member

rdar://problem/43425867

@lorentey lorentey requested a review from aschwaighofer August 17, 2018 17:05
@lorentey
Copy link
Member Author

@swift-ci please test

@@ -1,4 +1,6 @@
/* FIXME: Bogus */
Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Element>
Struct SetIterator has generic signature change from <Element where Element : Hashable> to <Key, Value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, this seems backwards? Why would they switch like this?

Copy link
Member Author

Choose a reason for hiding this comment

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

They didn't -- these became typealiases to Dictionary.Iterator and Set.Iterator, respectively, but they kept the same generic signatures.

@nkcsgexi Is this right?

Copy link
Contributor

Choose a reason for hiding this comment

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

The correct diags are actually like these:
-Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to
-Struct SetIterator has generic signature change from to <Key, Value>
+Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Key, Value>
+Struct SetIterator has generic signature change from to

Copy link
Member Author

Choose a reason for hiding this comment

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

I copy & pasted the ones in this PR from my own test logs, with no edits -- is it possible the api-digester output is somehow nondeterministic?

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 15e368e

@lorentey
Copy link
Member Author

12:44:31 -Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Element>
12:44:31 -Struct SetIterator has generic signature change from <Element where Element : Hashable> to <Key, Value>
12:44:31 +Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Key, Value>
12:44:31 +Struct SetIterator has generic signature change from <Element where Element : Hashable> to <Element>

Interesting -- in this build, it reverted to a less surprising (although still spurious) change.

@lorentey
Copy link
Member Author

@swift-ci test

@nkcsgexi
Copy link
Contributor

hmm, that'll be a bug of the tool. nondeterministic outputs will manifest as a flaky test. could we run the CI multiple times and see?

@lorentey
Copy link
Member Author

We'll see a second run soon; the new CI build is almost done compiling.

@lorentey
Copy link
Member Author

It looks like api-digester definitely has nondeterministic output -- I've seen four different variants in six local test runs:

+Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Element where Element : Hashable>
+Struct SetIterator has generic signature change from <Element where Element : Hashable> to <Key, Value>
---
+Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Element where Element : Hashable>
+Struct SetIterator has generic signature change from <Element where Element : Hashable>
---
+Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Element where Element : Hashable>
+Struct SetIterator has generic signature change from <Element where Element : Hashable> to <Key, Value>
---
+Struct DictionaryIterator has generic signature change from <Key, Value where Key : Hashable> to <Key, Value>
(note missing SetIterator)

@lorentey
Copy link
Member Author

Yep, the test has passed in the current build, despite the earlier failure:

PASS: Swift(macosx-x86_64) :: api-digester/source-stability.swift (7913 of 11307)

@lorentey lorentey changed the title [test] Fix source-stability test and revert #18793 🛑 DON'T MERGE [test] Fix source-stability test and revert #18793 Aug 17, 2018
@nkcsgexi
Copy link
Contributor

Thanks, I'll investigate what's going on.

@nkcsgexi
Copy link
Contributor

hmm, i cannot reproduce the nondeterministic output issue locally. We should run the swift-ci multiple times here to see if it reproduces.

@nkcsgexi
Copy link
Contributor

oh, i can reproduce this issue with more runs. It seems SetIterator and DictionaryIterator have been changed from a type decl to a typealias decl, thus the tool is confused with mapping. I'll investigate the fix.

@lorentey
Copy link
Member Author

See #18811 for the correct fix.

@lorentey lorentey closed this Aug 18, 2018
@lorentey lorentey deleted the reenable-source-stability-test branch August 18, 2018 15:15
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