swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.42k stars 10.34k forks source link

[SR-14489] ModuleInterface/BadStdlib.swiftinterface disabled on Windows #56844

Open beccadax opened 3 years ago

beccadax commented 3 years ago
Previous ID SR-14489
Radar None
Original Reporter @beccadax
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: d2bfaa9939f9dc4c0c79823d9d8b4d4d

Issue Description:

In apple/swift#36594, I extended -verify mode to work better with ModuleInterfaceBuilder. However, this doesn't seem to work properly on Windows for some reason:

FAIL: Swift(windows-x86_64) :: ModuleInterface/BadStdlib.swiftinterface (2818 of 7473)
******************** TEST 'Swift(windows-x86_64) :: ModuleInterface/BadStdlib.swiftinterface' FAILED ********************
Script:
--
: 'RUN: at line 11';   rm -rf "T:\swift\test-windows-x86_64\ModuleInterface\Output\BadStdlib.swiftinterface.tmp" && mkdir -p "T:\swift\test-windows-x86_64\ModuleInterface\Output\BadStdlib.swiftinterface.tmp"
: 'RUN: at line 12';   't:\\swift\\bin\\swift-frontend.exe' -target x86_64-unknown-windows-msvc  -module-cache-path T:\swift\swift-test-results\x86_64-unknown-windows-msvc\clang-module-cache -swift-version 4  -ignore-module-source-info -typo-correction-limit 10   -sdk S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk -module-cache-path T:/swift/test-windows-x86_64/ModuleInterface/Output/BadStdlib.swiftinterface.tmp/module-cache -resource-dir S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk  -compile-module-from-interface -o T:/swift/test-windows-x86_64/ModuleInterface/Output/BadStdlib.swiftinterface.tmp/BadStdlib.swiftmodule S:\jenkins\workspace\swift-PR-windows\swift\test\ModuleInterface\BadStdlib.swiftinterface -verify -verify-additional-file S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 11"
$ "rm" "-rf" "T:\swift\test-windows-x86_64\ModuleInterface\Output\BadStdlib.swiftinterface.tmp"
$ "mkdir" "-p" "T:\swift\test-windows-x86_64\ModuleInterface\Output\BadStdlib.swiftinterface.tmp"
$ ":" "RUN: at line 12"
$ "t:\\swift\\bin\\swift-frontend.exe" "-target" "x86_64-unknown-windows-msvc" "-module-cache-path" "T:\swift\swift-test-results\x86_64-unknown-windows-msvc\clang-module-cache" "-swift-version" "4" "-ignore-module-source-info" "-typo-correction-limit" "10" "-sdk" "S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk" "-module-cache-path" "T:/swift/test-windows-x86_64/ModuleInterface/Output/BadStdlib.swiftinterface.tmp/module-cache" "-resource-dir" "S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk" "-compile-module-from-interface" "-o" "T:/swift/test-windows-x86_64/ModuleInterface/Output/BadStdlib.swiftinterface.tmp/BadStdlib.swiftmodule" "S:\jenkins\workspace\swift-PR-windows\swift\test\ModuleInterface\BadStdlib.swiftinterface" "-verify" "-verify-additional-file" "S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface"
# command stderr:
S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface:5:4: error: expected error not produced

// expected-error@-4 {{failed to build module 'Swift' for importation due to the errors above}}

~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

S:/jenkins/workspace/swift-PR-windows/swift/test/ModuleInterface/Inputs/BadStdlib.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface:8:54: error: expected error not produced

  public var property: UndeclaredType { get set } // expected-error {{cannot find type 'UndeclaredType' in scope}}

                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: command failed with exit status: 1

I'm not in a position to debug this test and the change is needed on other platforms, so I'll disable the test on Windows until someone can figure out what's going wrong.

davezarzycki commented 3 years ago

For whatever it may be worth, this line might be too specific:

// expected-error@-4 failed to build module 'Swift' for importation due to the errors above

It might need to change to this to catch more scenarios:

// expected-error@-4 failed to build module 'Swift'