Skip to content

test: improve SILGen coverage on Windows #21371

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

compnerd
Copy link
Member

Make these SILGen tests pass on windows too

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Make these SILGen tests pass on windows too
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Dec 17, 2018

CC: @gottesmm, @eeckstein

@compnerd
Copy link
Member Author

CC: @slavapestov @jrose-apple - at the suggestion of @gottesmm

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Mostly seems reasonable to me.

@@ -1,9 +1,9 @@

// RUN: %target-swift-emit-silgen -module-name witness_tables -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop > %t.sil
// RUN: %target-swift-emit-silgen -emit-sorted-sil -module-name witness_tables -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop > %t.sil
Copy link
Contributor

@jrose-apple jrose-apple Dec 18, 2018

Choose a reason for hiding this comment

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

Why the change to sorting here? (and elsewhere, but especially this file)

Copy link
Member Author

Choose a reason for hiding this comment

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

The order differs between Linux/Darwin and Windows. I don't think that there is a way to get both sides to work without the sorting. Perhaps there is some other approach that I didn't consider.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm. I'm pretty sure the order is supposed to be based on source, so that's a little suspicious.

Copy link
Contributor

Choose a reason for hiding this comment

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

My fear about this is that the need for it could show a source of non-determinism.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jrose-apple, empirical observation indicates that this is not the case. There is certainly a possibility of there being a bug in SILGen.

@gottesmm
Copy link
Contributor

I want this to land. @compnerd can you split out the -emit-sorted-sil changes. I do think it is important to figure out /why/ this is happening. I talked with Jordan and we think the rest of it is ok.

@compnerd
Copy link
Member Author

Splintered the unsorted bits into #21493

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2019

Going to close this, however, this is still unfixed. The change in #22308 fixes the sorting issue.

@compnerd compnerd closed this Feb 7, 2019
@compnerd compnerd deleted the i-hate-silgen branch February 7, 2019 17:56
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