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

Add -addNewFile method to PBXGroup to support adding file reference duplicates #410

Merged
merged 3 commits into from
May 2, 2019

Conversation

mrylmz
Copy link
Contributor

@mrylmz mrylmz commented Apr 25, 2019

Short description 📝

We had an issue using -addFile(at:sourceTree:sourceRoot:) resulting in a broken file reference inside the pbx file because the old path is overridden inside, which is not the expected behaviour for out problem. For more detailed informations about the issue see here.

Solution 📦

Added a new method to PBXGroup which is not performing a lookup for an already existing file reference.

@tuistbot
Copy link

Danger has errored

[!] Invalid Dangerfile file: Error running SwiftFormat:
Error: �[0mdyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /usr/local/bin/swiftformat
Reason: image not found�[0m. Updating the Danger gem might fix the issue. Your Danger version: 5.15.0, latest Danger version: 6.0.6

 #  from Dangerfile:12
 #  -------------------------------------------
 #  swiftformat.additional_args = "--config .swiftformat"
 >  swiftformat.check_format(fail_on_error: true)
 #  swiftlint.lint_files(fail_on_error: true)
 #  -------------------------------------------

Generated by 🚫 Danger

Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

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

Hi @mrylmz. Instead of adding another method. I'd suggest modifying the existing one adding a new argument, override: Bool that changes the behavior of the method. That way we don't need to maintain two methods for the same purpose.

@mrylmz
Copy link
Contributor Author

mrylmz commented Apr 28, 2019

Thanks for the review @pepibumur

I have added an override flag to the existing addFile method now which is by default true to support backward compatibility.

pepicrft
pepicrft previously approved these changes May 2, 2019
@pepicrft
Copy link
Contributor

pepicrft commented May 2, 2019

Would you mind updating the CHANGELOG? After that, we can merge the PR.

@pepicrft pepicrft merged commit fc696b7 into tuist:master May 2, 2019
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