Bug 22555 - Sort "children" sections in Xcode project files
Summary: Sort "children" sections in Xcode project files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks: 188755
  Show dependency treegraph
 
Reported: 2008-11-29 05:29 PST by David Kilzer (:ddkilzer)
Modified: 2018-08-20 12:24 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (4.27 KB, patch)
2008-11-29 05:35 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Sort "children" and "files" sections of Xcode project files (402.10 KB, patch)
2008-12-05 15:40 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch remove WebCore duplicates after sorting (29.32 KB, patch)
2008-12-05 15:41 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Don't sort mainGroup (2.76 KB, patch)
2008-12-08 15:32 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2008-11-29 05:29:08 PST
*SUMMARY
The sort-Xcode-project-file script currently only sorts "files" sections of an Xcode project file.  It would be nice if it also sorted the "children" sections (leaving groups or folders at the top) to provide more alphabetic goodness when using Xcode.
Comment 1 David Kilzer (:ddkilzer) 2008-11-29 05:35:50 PST
Created attachment 25596 [details]
Patch v1

Proposed patch.

Note that I found some duplicate header files listed in WebCore's Xcode project after running this script on it.
Comment 2 Darin Adler 2008-12-04 09:33:32 PST
Comment on attachment 25596 [details]
Patch v1

r=me
Comment 3 David Kilzer (:ddkilzer) 2008-12-05 14:55:23 PST
Comment on attachment 25596 [details]
Patch v1

Clearing Darin Adler's review+ flag after landing the patch.

$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/sort-Xcode-project-file
Committed r39045

http://trac.webkit.org/changeset/39045

I want individual Xcode project updates reviewed before landing them in case there are objections.
Comment 4 David Kilzer (:ddkilzer) 2008-12-05 15:40:29 PST
Created attachment 25794 [details]
Sort "children" and "files" sections of Xcode project files

Posting this for review in case there are any red flags.

The only section that people may have issues with is the "main" section immediately under the project itself.  I can back out changes to those sections in each Xcode project file if needed.  (I just want the rest resorted.)

Will commit individual changes for each project file when landing this (with a ChangeLog entry).

Also, the duplicates in WebCore's project file will be resolved after sorting.
Comment 5 David Kilzer (:ddkilzer) 2008-12-05 15:41:50 PST
Created attachment 25795 [details]
Patch remove WebCore duplicates after sorting

Patch to remove duplicate entries from WebCore's Xcode project file after sorting.

Will add ChangeLog entry when committing this.
Comment 6 Eric Seidel (no email) 2008-12-08 12:38:54 PST
Comment on attachment 25794 [details]
Sort "children" and "files" sections of Xcode project files

This looks fine.  rubber-stamp = me.  Regarding the "main" section, I think that we should match whatever the sort order is for default XCode projects that people (especially apple-ites) are used to.  But I don't really have a very strong opinion on that.

Thanks for doing this!
Comment 7 Eric Seidel (no email) 2008-12-08 12:39:28 PST
Comment on attachment 25795 [details]
Patch remove WebCore duplicates after sorting

So hot.  Like butter.  ChangeLog please.
Comment 8 David Kilzer (:ddkilzer) 2008-12-08 13:36:16 PST
(In reply to comment #6)
> (From update of attachment 25794 [details] [review])
> This looks fine.  rubber-stamp = me.  Regarding the "main" section, I think
> that we should match whatever the sort order is for default XCode projects that
> people (especially apple-ites) are used to.  But I don't really have a very
> strong opinion on that.

xenon, bdash and smfr didn't want the main section sorted (the one immediately below the top-level project), so I will back out those changes before I land any patches.

I may endeavor to update the script to ignore that section as well, if I can figure out how to identify it generically.

Comment 9 David Kilzer (:ddkilzer) 2008-12-08 15:32:49 PST
Created attachment 25858 [details]
Don't sort mainGroup

Don't sort the mainGroup in a project file (the top-level group under the project file).
Comment 10 David Kilzer (:ddkilzer) 2008-12-08 15:46:05 PST
Comment on attachment 25858 [details]
Don't sort mainGroup

Clearing Timothy Hatcher's reivew+ flag:

$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/sort-Xcode-project-file
Committed r39107

http://trac.webkit.org/changeset/39107
Comment 11 David Kilzer (:ddkilzer) 2008-12-08 16:03:23 PST
Comment on attachment 25794 [details]
Sort "children" and "files" sections of Xcode project files

Clearing Eric Seidel's review+ on this attachment.  Note that this patch wasn't landed; I reran the script after adding code to ignore the mainGroup children section.

$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
	M	JavaScriptGlue/ChangeLog
	M	JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
	M	WebCore/ChangeLog
	M	WebCore/WebCore.xcodeproj/project.pbxproj
	M	WebCore/manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj
	M	WebKit/ChangeLog
	M	WebKit/WebKit.xcodeproj/project.pbxproj
	M	WebKitExamplePlugins/ChangeLog
	M	WebKitExamplePlugins/NetscapeCocoaPlugin/NetscapeCocoaPlugin.xcodeproj/project.pbxproj
	M	WebKitTools/ChangeLog
	M	WebKitTools/DrawTest/DrawTest.xcodeproj/project.pbxproj
	M	WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
	M	WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
Committed r39109

http://trac.webkit.org/changeset/39109
Comment 12 David Kilzer (:ddkilzer) 2008-12-08 16:14:09 PST
Comment on attachment 25795 [details]
Patch remove WebCore duplicates after sorting

Clearing Eric Seidel's review+ flag on this patch.  Landed as:

$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/WebCore.xcodeproj/project.pbxproj
Committed r39112

http://trac.webkit.org/changeset/39112
Comment 13 David Kilzer (:ddkilzer) 2008-12-08 16:14:20 PST
This bug is now fixed.