Skip to content

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 29, 2023

rdar://108525615

@rintaro rintaro marked this pull request as draft March 29, 2023 16:46
fileSystem.exists(xcodePluginPath)
{
commandLine.appendFlag(.externalPluginPath)
commandLine.appendFlag(xcodePluginPath.pathString + "#" + xcodePluginPath.pathString)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not safe because xcodePluginServerPath can contain #.
@artemcm I want to pass a pair of /path/to/usr/bin/swift-plugin-server and /path/to/usr/lib/swift/host/plugins paths.
Is squashedArgumentList usable for this purpose? Does swift-frontend have a way to correctly "unpack" those values?

@rintaro rintaro force-pushed the macros-external-plugin-path branch from faa70f5 to 7c0946f Compare March 29, 2023 20:50
// default toolchain.
if
isFrontendArgSupported(.externalPluginPath),
let darwinToolchain = toolchain as? DarwinToolchain,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead move this to addPlatformSpecificCommonFrontendOptions, please?

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please add a macOS-only test for this?
Other than that and moving to code to a toolchain-specific place, LGTM!

@rintaro rintaro force-pushed the macros-external-plugin-path branch from 7c0946f to 168d09b Compare April 25, 2023 21:29
@rintaro rintaro force-pushed the macros-external-plugin-path branch from 168d09b to 53ad3a9 Compare April 25, 2023 22:04
@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2023

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants