Open edhub opened 9 years ago
could you please provide the diff project.pbxproj before and after adding the empty group?
— Sent from my mobile phone
On Thu, Feb 12, 2015 at 11:16 AM, edhub notifications@github.com wrote:
When I use it for our project, I noticed that, it doesn't sort PBXGroup until I change something in the project file (for example, add a empty group). Otherwise, it works great so far. It happens when we first apply it for our project. I'm not sure whether it'll happen in the future.
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/17
it's a business project so I couldn't do that. But once i got some time (not sure when), I can look into it.
but I did manage to find a exercise project file with PBXGroup section not sorted correctly. It doesn't support file uploading, so I just copy & paste the PBXGroup part. If you need the whole project file, please let me know how can I send it to you.
check this line: FE01095F654E29E4669FD59051BF4A79
/* Begin PBXGroup section /
1C8BAAD40D3B5F927C6DC0A762A820BF / Supporting Files / = {
isa = PBXGroup;
children = (
7AB7B18155E2D756C57AD67E3DE5D5A7 / Info.plist /,
EBF0396F918D5ED54FC59C803080400E / main.m /,
);
name = "Supporting Files";
sourceTree = "
Hi, Could you send the problematic original project file via replying github notification email? Thanks
here it is.
On Sat, Feb 14, 2015 at 11:26 AM, Sean Wang notifications@github.com wrote:
Hi, Could you send the problematic original project file via replying github notification email? Thanks
— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/17#issuecomment-74359450.
i've replied the email with the file as attachment, but I didn't see it in the web page.
It should not display on web page. But I also did not see it in email. Did you " reply all"?
— Sent from my mobile phone
On Sun, Feb 15, 2015 at 10:32 AM, edhub notifications@github.com wrote:
i've replied the email with the file as attachment, but I didn't see it in the web page.
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/17#issuecomment-74401248
this time i reply all. Hope it's ok now.
On Sun, Feb 15, 2015 at 10:34 AM, Sean Wang notifications@github.com wrote:
It should not display on web page. But I also did not see it in email. Did you " reply all"?
— Sent from my mobile phone
On Sun, Feb 15, 2015 at 10:32 AM, edhub notifications@github.com wrote:
i've replied the email with the file as attachment, but I didn't see it
in the web page.
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/17#issuecomment-74401248
— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/17#issuecomment-74401303.
Still not got it... Could you put the project file content on somewhere public? Thanks a lot.
I've uploaded the project to git hub :) https://github.com/edhub/vcproject
@edhub Thanks a lot:) But I found the project file has already been uniquified and sorted? Could you push the problematic one?
please checkout haha branch. and it's not sorted well at this line:
B96C9F610970F8CF3E0BCCB41EFA9178 /* nav xibs */ = {
/* Begin PBXGroup section / 1C8BAAD40D3B5F927C6DC0A762A820BF / Supporting
Files / = { isa = PBXGroup; children = ( 7AB7B18155E2D756C57AD67E3DE5D5A7
/ Info.plist /, EBF0396F918D5ED54FC59C803080400E / main.m /, ); name =
"Supporting Files"; sourceTree = "
On Wed, Feb 25, 2015 at 11:47 PM, Sean Wang notifications@github.com wrote:
@edhub https://github.com/edhub Thanks a lot:) But I found the project file has already been uniquified and sorted? Could you push the problematic one?
— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/17#issuecomment-75984108.
I still not understand, there's only a haha
branch in the project file, and I used that one.
concerning "it's not sorted well", could you explain more?
Do you mean that it is not sorted by lower letters? That's the default action of str.sort
in Python. I did not change it. And I also added a rule that placing folders ( without .
in name) before any files.
If that's not you mean, I will reopen this issue.
BTW, to save both our time, you should just say what's the issue. just saying "not sort well" and pasting the long content is too confused...
sorry, i replied it in email, and the result is a mess. Here, take a look at current orders in PBXGroup: 1C8BAAD40D3B5F927C6DC0A762A820BF /* Supporting Files / 304EE41ED71EA2205AC642471F07B575 / vcproject / 38585E645596D3E1FB84EEC2D5B221CA / vcprojectTests -> B96C9F610970F8CF3E0BCCB41EFA9178 /* nav xibs / 88592D313A25A82215458E7B82554F6C / Supporting / D640E569C0F0419DD5B042F6FE2C45CE / Products */ E5EF063CFBDB072E436C9F57DCD4EA35 = {
shouldn't it be: 1C8BAAD40D3B5F927C6DC0A762A820BF /* Supporting Files / 304EE41ED71EA2205AC642471F07B575 / vcproject / 38585E645596D3E1FB84EEC2D5B221CA / vcprojectTests 88592D313A25A82215458E7B82554F6C /* Supporting / ->B96C9F610970F8CF3E0BCCB41EFA9178 / nav xibs / D640E569C0F0419DD5B042F6FE2C45CE / Products */ E5EF063CFBDB072E436C9F57DCD4EA35 = {
Still cannot understand what you say. The vcproject
PBXGroup is already in that order, see line 93
please check line 114 https://github.com/edhub/vcproject/blob/haha/vcproject.xcodeproj/project.pbxproj#L114. If you still don't think it's a problem, please just close the issue. thanks
On Sat, Feb 28, 2015 at 12:27 PM, Sean Wang notifications@github.com wrote:
Still cannot understand what you say. The vcproject PBXGroup is already in that order, see line 93 https://github.com/edhub/vcproject/blob/haha/vcproject.xcodeproj/project.pbxproj#L93
— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/17#issuecomment-76509874.
You mean the whole PBXGroup
section order in project file? I did not sort that, I just sort the parts which it will affect what it looks in xcode, e.g. children
and files
Yes, I mean the order of group section. I concern about it, because it's important: If the order is not consistent, horrible project file conflict of will happen between merges.
Then why it get sorted sometimes? Is the sort done by Xcode? Maybe Xcode will sort it according to your sort results. I made some test, and confirmed it's Xcode made the sorting. It'll sort the group section when you updated something in the project (add/remove a group/file, etc).
So, in order to keep the order consistent, I should add a empty group, run xUnique, remove the group. Anyway, the issue is addressed and I found a solution to it. Or maybe you are interested in making the sort in xUnique, later :)
Thanks for the help, and the tool, of cause.
There is very huge work to do if dealing with all types of pbx sections and sub-sections in project file unless someone got a new thought. Currently I have no plans for that.
About the order problem you concerned, in my experience, only if the content of the section is different, it will get conflicts in Git; if the order is different but the content is the same, it should not get conflicts; and that's why I made this tool:)
since Xcode can do the sort trick, maybe you can trigger the feature from xcode when you got plans for it.
On Mon, Mar 2, 2015 at 5:00 PM, Sean Wang notifications@github.com wrote:
There is very huge work to do if dealing with all types of pbx sections and sub-sections in project file unless someone got a new thought. Sorry, currently I have no plans for that.
— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/17#issuecomment-76677622.
xUnique is just a simple pure python script, trigger from Xcode is not elegant and will be very complex imho.
Hello, just wanted to confirm that the fact that PBXGroup sections are not ordered makes xUnique unable to resolve my merge conflicts.
Anyway, thanks for the work!
Sorry the inconvenience. Maybe you could run in Xcode before committing the project file? According to the discussion above, this would trigger Xcode sorting PBXGroup.
XCode did not sort the PBXGroup section... However I managed to find a script that does the job: https://github.com/neciu/SOCK
xUnique + SOCK = perfectly sorted my pbxproj :)
So you mean sorting the items under pbxgroup instead of pbxgroup themselves? If so, I could add that :)
— Sent from my mobile phone
On Sat, Jan 23, 2016 at 2:07 AM, Ouss Ghalbz notifications@github.com wrote:
XCode did not sort the PBXGroup section... However I managed to find a script that does the job: https://github.com/neciu/SOCK
xUnique + SOCK = perfectly sorted my pbxproj :)
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/17#issuecomment-173995779
Yes, I meant items them by UUID. And it was not only in pbxgroup section, but in nearly every section.
I had to add more sections into the SOCK script, because it only supported the "critical" ones according to the developer.
It would be a great feature to add to xUnique, because it helps to reduce the number of conflicts.
Could you make a list of these sections? I will look into it.
— Sent from my mobile phone
On Sat, Jan 23, 2016 at 2:24 AM, Ouss Ghalbz notifications@github.com wrote:
Yes, I meant sorting them by UUID. And it was not only in pbxgroup, but in nearly every section. I had to add more sections into the SOCK script, because it only supported the "critical" one from the develop POV.
It would be a great feature to add to xUnique, because it helps to reduce the number of conflicts.
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/17#issuecomment-174000099
It is every section except PBXBuildFile
and PBXFileReference
.
PBXBuildFile
PBXFrameworksBuildPhase
PBXGroup
PBXResourcesBuildPhase
PBXSourcesBuildPhase
PBXContainerItemProxy
PBXCopyFilesBuildPhase
PBXShellScriptBuildPhase
PBXNativeTarget
PBXProject
PBXShellScriptBuildPhase
PBXTargetDependency
PBXVariantGroup
XCBuildConfiguration
XCConfigurationList
XCVersionGroup
IMHO, the best sorting method for a .pbxproj file is:
PBXBuildFile
and PBXFileReference
objects sorted by name in commentsfiles
sorted by name in commentsPBXBuildFile
and PBXFileReference
can be sorted by its names, Actually that's what I did in the beginning, Now you could switch it on by adding -p
in command line. I turned it off because Xcode would sort them by UUID, that would cause lots of changes when you commit almost EVERYTIME. It is too annoying.
open this enhancement issue to make me not being lazy..
When I use it for our project, I noticed that, it doesn't sort PBXGroup until I change something in the project file (for example, add a empty group). Otherwise, it works great so far. It happens when we first apply it for our project. I'm not sure whether it'll happen in the future.