You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-1503 Can't test module under linux that has main.swift in it
Issue Description:
Currently SwiftPM forces all code to be put into a separate module in order to be testable. This is extra work and really isn't necessary for CLI tools.
At the very least, the result error is non-obvious.
{{
10:15:58 › swift test
Compile Swift Module 'clitestTests' (1 sources)
Linking ./.build/debug/clitestPackageTests.xctest/Contents/MacOS/clitestPackageTests
Undefined symbols for architecture x86_64:
"__TF7clitest5addmeFT1xSi1ySi_Si", referenced from:
__TFFC12clitestTests13UtilitiesTest7testAddFT_T_u0_KzT_Si in UtilitiesTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
}}
For instance, the attached project, I would need to move Utilities.swift out into a module to test it.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Additional Detail from JIRA
md5: 8fccbe2d18ec1c0fca9f3f68e40552d2
duplicates:
Issue Description:
Currently SwiftPM forces all code to be put into a separate module in order to be testable. This is extra work and really isn't necessary for CLI tools.
At the very least, the result error is non-obvious.
{{
10:15:58 › swift test
Compile Swift Module 'clitestTests' (1 sources)
Linking ./.build/debug/clitestPackageTests.xctest/Contents/MacOS/clitestPackageTests
Undefined symbols for architecture x86_64:
"__TF7clitest5addmeFT1xSi1ySi_Si", referenced from:
__TFFC12clitestTests13UtilitiesTest7testAddFT_T_u0_KzT_Si in UtilitiesTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
}}
For instance, the attached project, I would need to move Utilities.swift out into a module to test it.
The text was updated successfully, but these errors were encountered: