Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
[X] Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.
Description
The createBuildParametersFile() in XcodeBuildSystem.swift escapes build settings incorrectly. It's using spm_shellEscaped(), which is primarily intended for escaping strings for use in a command shell, but the build settings grammar is different, and escaping should be applied accordingly.
The current method will not handle characters such as \ and $ properly, which need to be -escaped, and escaping is also tricky in general because it depends on the type that the macro will ultimately be evaluated as (strings and string lists should be quoted differently).
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version ; uname -a)
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
The createBuildParametersFile() in XcodeBuildSystem.swift escapes build settings incorrectly. It's using
spm_shellEscaped()
, which is primarily intended for escaping strings for use in a command shell, but the build settings grammar is different, and escaping should be applied accordingly.The current method will not handle characters such as \ and $ properly, which need to be -escaped, and escaping is also tricky in general because it depends on the type that the macro will ultimately be evaluated as (strings and string lists should be quoted differently).
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version ; uname -a
)No response