Steps to reproduce:
- Run
mkdir SomeToolName cd SomeToolName swift package init --type executable
- Open the
SomeToolName/Package.swift
file with Xcode - Add
after theproducts: [ .executable( name: "stn", targets: ["SomeToolName"] ), ],
name
parameter - Try to build the project
Current behaviour:
- The line
@testable import SomeToolName
fails to build with the error/Users/revolt/SomeToolName/Tests/SomeToolNameTests/SomeToolNameTests.swift:2:18 No such module 'SomeToolName'
Expected behaviour:
- The project should build.
Fixing attempts:
- I noticed that
stn
gets autocompleted on that line, but in that case, it fails to build with the errorUndefined symbol: _$s3stn12SomeToolNameVACycfC
Am I doing something wrong, or is this (executable name customization and testing) not supported (yet)?