Skip to content
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

[SR-14405] Windows compile error: "default argument 1 of … is in generated IR file, but not in TBD file" #56762

Closed
swift-ci opened this issue Mar 25, 2021 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Windows Platform: Windows

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14405
Radar None
Original Reporter marcprux (JIRA User)
Type Bug
Status Closed
Resolution Cannot Reproduce
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Windows
Assignee None
Priority Medium

md5: adecf66886be22ebfe9dd4b40faf4169

Issue Description:

My project MemoZ (which does a lot of funky stuff with keypaths) build and tests OK on Linux & Apple platforms, but fails on Windows. You can see the build matrix result at:

https://github.com/marcprux/MemoZ/actions/runs/687030056

The exact same GH build Action is being used successfully in my other projects, like https://github.com/glimpseio/BricBrac/actions/runs/686915677

The build error is:

C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe -frontend -c -primary-file D:\a\MemoZ\MemoZ\Tests\MemoZTests\MemoZTests.swift -emit-module-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests~partial.swiftmodule -emit-module-doc-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests~partial.swiftdoc -emit-module-source-info-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests~partial.swiftsourceinfo -emit-dependencies-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests.d -emit-reference-dependencies-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests.swiftdeps -target x86_64-unknown-windows-msvc -disable-objc-interop -sdk C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk -I D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug -I C:\Library\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\lib\swift\windows\x86_64 -enable-testing -g -module-cache-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -enable-anonymous-context-mangled-names -autolink-library oldnames -autolink-library msvcrt -Xcc -D_MT -Xcc -D_DLL -parse-as-library -module-name MemoZTests -o D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\MemoZTests.build\MemoZTests.swift.o -index-store-path D:\a\MemoZ\MemoZ\.build\x86_64-unknown-windows-msvc\debug\index\store -index-system-modules 
[65](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:65)<unknown>:0: error: symbol '$sSE10MemoZTestsE13JSONFormatted6sorted7noslashs6ResultOy10Foundation4DataVs5Error_pGSb_SbSgSbtcipfA0_' (default argument 1 of (extension in MemoZTests):Swift.Encodable.subscript(JSONFormatted: Swift.Bool, sorted: Swift.Optional<Swift.Bool>, noslash: Swift.Bool) -> Swift.Result<Foundation.Data, Swift.Error>) is in generated IR file, but not in TBD file 
[66](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:66)
[67](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:67)<unknown>:0: error: symbol '$sSE10MemoZTestsE13JSONFormatted6sorted7noslashs6ResultOy10Foundation4DataVs5Error_pGSb_SbSgSbtcipfA1_' (default argument 2 of (extension in MemoZTests):Swift.Encodable.subscript(JSONFormatted: Swift.Bool, sorted: Swift.Optional<Swift.Bool>, noslash: Swift.Bool) -> Swift.Result<Foundation.Data, Swift.Error>) is in generated IR file, but not in TBD file 
[68](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:68)
[69](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:69)<unknown>:0: error: please submit a bug report (<https://swift.org/contributing/#reporting-bugs>) and include the project, and add '-Xfrontend -validate-tbd-against-ir=none' to squash the errors 
[70](https://github.com/marcprux/MemoZ/runs/2194263205?check_suite_focus=true#step:11:70)
error: fatalError 
Error: Process completed with exit code 1. 
Test (Release)

I suspect the problem comes from the following line from https://github.com/marcprux/MemoZ/blob/main/Tests/MemoZTests/MemoZTests.swift#L245 :

xyz.memoz[JSONFormatted: true, sorted: true]
@swift-ci
Copy link
Collaborator Author

Comment by Marc Prud'hommeaux (JIRA)

This looks like https://bugs.swift.org/browse/SR-12821 , which is marked as "Resolved".

@typesanitizer
Copy link

Which version of Swift are you using?

@compnerd
Copy link
Collaborator

I believe that this has been fixed, I cannot reproduce it with the current toolchain. Please reopen with instructions on how to reproduce it if it is still a problem.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants