Skip to content

Conversation

cmcgee1024
Copy link
Member

@cmcgee1024 cmcgee1024 commented Apr 8, 2025

Retaining swiftly in the path increases the probability that a tool might run the proxy again, resulting in circularities. Also, tools will locate programs in the path to try and find adjacent toolchain files that cannot be discovered in the swiftly bin directory.

Remove the swiftly bin directory from the path when proxying to help improve the experience with other tools.

Use fully-qualified paths to the command where possible when proxying so that drivers can find their location via argv[0].

Retaining swiftly in the path increases the probability that
a tool might run the proxy again, resulting in circularities.
Also, tools will locate programs in the path to try and find
adjacent toolchain files that cannot be discovered in the swiftly
bin directory.

Remove the swiftly bin directory from the path when proxying
to help improve the experience with other tools.
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024 cmcgee1024 added the release candidate This issue is a candidate for the next release label Apr 9, 2025
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

var newPath = newEnv["PATH"] ?? ""
if !newPath.hasPrefix(tcPath.path + ":") {
newPath = "\(tcPath.path):\(newPath)"
if pathComponents.first ?? "" != tcPath.path {
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably doesn't matter but do you want to remove tcPath from the path components before prepending it, so that we're guaranteed one instance of it and its always the first entry?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I will make this change. There's two paths that we're managing here, so there might as well be only one and zero of them.

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024 cmcgee1024 merged commit 63cb10f into swiftlang:main Apr 14, 2025
22 checks passed
cmcgee1024 added a commit to cmcgee1024/swiftly that referenced this pull request Apr 14, 2025
Retaining swiftly in the path increases the probability that
a tool might run the proxy again, resulting in circularities.
Also, tools will locate programs in the path to try and find
adjacent toolchain files that cannot be discovered in the swiftly
bin directory.

Remove the swiftly bin directory from the path when proxying
to help improve the experience with other tools.
cmcgee1024 added a commit that referenced this pull request Apr 14, 2025
Remove swiftly from the path during proxying (#311)

Retaining swiftly in the path increases the probability that
a tool might run the proxy again, resulting in circularities.
Also, tools will locate programs in the path to try and find
adjacent toolchain files that cannot be discovered in the swiftly
bin directory.

Remove the swiftly bin directory from the path when proxying
to help improve the experience with other tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release candidate This issue is a candidate for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants