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

Remove end of line comments from xcconfig build settings #602

Closed
damirdavletov opened this issue Jan 8, 2021 · 0 comments · Fixed by #604
Closed

Remove end of line comments from xcconfig build settings #602

damirdavletov opened this issue Jan 8, 2021 · 0 comments · Fixed by #604

Comments

@damirdavletov
Copy link
Contributor

Context 🕵️‍♀️

In our projects we use xcconfig files for project configuration and in some cases we use in-line comments like:
PRODUCT_NAME = $(TARGET_NAME) // FIXME: ideally, should probably be $(TARGET_NAME:rfc1034identifier), but some of our existing names will change

What 🌱

Retrieving the above settings with the code like
let productName = target.buildConfigurationList?.configuration(name: "Release")?.buildSettings["PRODUCT_NAME"]
Will produce result:
"$(TARGET_NAME) // FIXME: ideally, should probably be $(TARGET_NAME:rfc1034identifier), but some of our existing names will change"
Expected result:
"$(TARGET_NAME)"

Proposal 🎉

Improve XCConfigParser.settingRegex to cut off end of line comments

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 a pull request may close this issue.

1 participant