• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Automatically Remove Unused #import Directives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically Remove Unused #import Directives


  • Subject: Re: Automatically Remove Unused #import Directives
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 27 Oct 2008 23:12:29 -0700

On Oct 27, 2008, at 22:38, Jerry Krinock wrote:

P.S.  It seems that a brute-force algorithm exists:

For each .m file in project,
  Remove all the #imports,
  Compile
  Count number of errors/warnings
  Repeat with each removed #import:
     Restore it
     Compile
     Count number of errors/warnings
     If fewer, leave this #import restored
     Else, remove it permanently
  }
}

Seems to me an accurate algorithm exists.

Starting at the *last* #import and working towards the start of the file:

	Delete the last untested #import
	Compile
	Undo if any errors or warnings


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Automatically Remove Unused #import Directives (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Automatically Remove Unused #import Directives
  • Next by Date: Re: Console littered by Xcode 3.1.1 garbage collection messages
  • Previous by thread: Automatically Remove Unused #import Directives
  • Next by thread: re: Automatically Remove Unused #import Directives
  • Index(es):
    • Date
    • Thread