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

Fix CYaml/module.modulemap using relative path #41

Merged
merged 1 commit into from
Feb 18, 2018

Conversation

takasek
Copy link
Contributor

@takasek takasek commented Feb 13, 2018

With absolute path I cannot build the project.

@ikesyo
Copy link
Contributor

ikesyo commented Feb 13, 2018

This is a result of swift package generate-xcodeproj so automating the replacement in Makefile would be great I think.

@ikesyo
Copy link
Contributor

ikesyo commented Feb 13, 2018

@ishkawa
Copy link
Owner

ishkawa commented Feb 13, 2018

🙈

+1 for automating the replacement!

@takasek
Copy link
Contributor Author

takasek commented Feb 13, 2018

@ikesyo Oh, thank you for your advice, but it is too tough for me...
Could anyone fix the problem instead of me?

@ikesyo
Copy link
Contributor

ikesyo commented Feb 14, 2018

How about something like this:

diff --git a/Makefile b/Makefile
index ae3da88..7fecc79 100644
--- a/Makefile
+++ b/Makefile
@@ -15,3 +15,4 @@ set_version:
 
 generate_xcodeproj:
 	swift package generate-xcodeproj --xcconfig-overrides ${XCCONFIG_PATH}
+	perl -pe 's|".+/(\.build/checkouts/Yams\.git.+)"|"../../../$1"|' -i DIKit.xcodeproj/GeneratedModuleMap/CYaml/module.modulemap

@takasek
Copy link
Contributor Author

takasek commented Feb 15, 2018

In my environment, it works with duplicating $.

perl -pe 's|".+/(\.build/checkouts/Yams\.git.+)"|"../../../$$1"|' -i DIKit.xcodeproj/GeneratedModuleMap/CYaml/module.modulemap

However, running make generate_xcodeproj extraordinary affects existing files.
Especially it changes the versions from 0.3.0 to 1.0.0.
Any advice to fix it?

@ishkawa
Copy link
Owner

ishkawa commented Feb 18, 2018

Okay, we found it's not so easy to automate xcodeproj generation now. Let's separate the task into 2 peaces, fixing current modulemap and automating xcodeproj generation. This PR does the former task, and I will tackle to the latter task later.

I'm going to merge this PR, thank you @takasek!

@ishkawa ishkawa merged commit a8037c9 into ishkawa:master Feb 18, 2018
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.

3 participants