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

Changed copy with move in writeXcodeProject. Resolves #1409 #1410

Closed
wants to merge 7 commits into from

Conversation

arkonxu
Copy link

@arkonxu arkonxu commented Oct 25, 2023

Just changed copy with move in FileWrite: writeXcodeProject in order to fix an issue that I opened before:

https://github.com/yonaskolb/XcodeGen/issues/1409

@@ -16,12 +16,11 @@ public class FileWriter {
let tempPath = try Path.processUniqueTemporary() + "XcodeGen"
try? tempPath.delete()
if projectPath.exists {
try projectPath.copy(tempPath)
try projectPath.move(tempPath)
Copy link
Owner

Choose a reason for hiding this comment

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

If the project is open, this would yank the project file out from underneath Xcode, which would complain no?

Copy link
Author

@arkonxu arkonxu Nov 6, 2023

Choose a reason for hiding this comment

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

Thank you for your concern! I've tested the changes multiple times, as I mentioned in the issue description, both by using the scheme preAction and from the terminal. It appears that there are no issues with the project file in my environment, and I haven't encountered any complains in Xcode. If you have specific test cases or scenarios in mind that you'd like me to investigate, please feel free to share them!

If you think it can be dangerous and you have any other idea or solution please tell me, because with this copy it also doesn't work properly

@arkonxu arkonxu closed this Feb 22, 2024
@yonaskolb
Copy link
Owner

Any luck with this one @arkonxu? I don't have any tips, but I do have the frustration of how Xcode chooses to resolve swift packages when the project changes, and have always wondered if there was a way around that.

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