Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: inject the appropriate include paths #33

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

compnerd
Copy link
Collaborator

This avoids the need for computing the actual path to the Swift includes and instead will find swiftc from the path and use that to compute the include path. This allows swift build to work again.

This avoids the need for computing the actual path to the Swift includes
and instead will find `swiftc` from the path and use that to compute the
include path. This allows `swift build` to work again.
Copy link

@darinf darinf left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

let include = URL(fileURLWithPath: swiftc).deletingLastPathComponent()
.deletingLastPathComponent()
.appendingPathComponent("include")
.withUnsafeFileSystemRepresentation {
Copy link

Choose a reason for hiding this comment

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

I think there can be some edge cases with trying to convert a Windows file path to UTF-8, but probably not something we will run into.

@compnerd compnerd merged commit 04853e1 into main Feb 16, 2024
1 check passed
@compnerd compnerd deleted the compnerd/include branch February 16, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants