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

[SR-1304] Handle spaces in path when parsing flags from pkgconfig #5300

Closed
ankitspd opened this issue Apr 23, 2016 · 2 comments
Closed

[SR-1304] Handle spaces in path when parsing flags from pkgconfig #5300

ankitspd opened this issue Apr 23, 2016 · 2 comments
Assignees
Labels

Comments

@ankitspd
Copy link
Member

Previous ID SR-1304
Radar None
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug, StarterBug
Assignee @aciidb0mb3r
Priority Medium

md5: 4ba240b5b9d4db4d0b2875872541296e

Issue Description:

cflags and libs obtained by parsing .pc are space separated files but paths can also contain spaces in them. Right now they're being split blindly on encounter of a space, this should be handled. For eg: a flag might be :
"-I/usr/local/Cellar/gtk+3/3.18.9/include/gtk-3.0 -I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/" which is converted into string array :
["-I/usr/local/Cellar/gtk+3/3.18.9/include/gtk-3.0", "-I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/"]
If the flag is:
"-I/usr/local/Cel\ lar/gtk+3/3.18.9/include/gtk-3.0 -I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/"
it would be converted to:
["-I/usr/local/Cel", "lar/gtk+3/3.18.9/include/gtk-3.0", "-I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/"]
The correct output should be :
["-I/usr/local/Cel\ lar/gtk+3/3.18.9/include/gtk-3.0", "-I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/"]

Related FIXME in code: https://github.com/apple/swift-package-manager/blob/master/Sources/Build/PkgConfig.swift#L40

What you'll learn:
The problem is pretty easy to solve but it'll get one started on setting up the swiftpm development environment as well writing and running swiftpm tests.

@swift-ci
Copy link
Contributor

swift-ci commented May 7, 2016

Comment by Quinn McHenry (JIRA)

#326

@ddunbar
Copy link
Member

ddunbar commented May 9, 2016

Merged

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants