[TxMt] Tracking and resolving dependencies

Allan Odgaard throw-away-1 at macromates.com
Thu Mar 9 15:00:38 UTC 2006


On 8/3/2006, at 3:26, Eric O'Brien wrote:

> I'm interested if there is a way or technique (or even "trick")  
> that will allow me to track and resolve naming dependencies in a  
> TextMate project.

I don’t think this has come up yet. So no public tricks for that.

> [...] I'm not programming in C or the like, but it seems to me that  
> a similar situation could occur there:  Say that for some reason  
> you change the name of an include or header file... you'll be into  
> a real mess if you don't detect all the locations in the code where  
> that file is referenced and change it!  OR... if you change a  
> variable name for some reason, references to that name will need to  
> be changed (even though we aren't changing a FILE name in that case).

Changing the name of an include happens close to never for me. When  
it does, a find in project is just as fast (if not faster) as  
invocating some custom UI for this (having it auto do it would  
trigger a lot of false positives).

As for renaming variables and stuff, that’s called refactoring, and  
various Java IDEs are known for their good refactoring support. But  
this requires a language parser, and I have never heard of  
refactoring tools for e.g. C++, likely because it is anything but  
trivial. I think Ruby developers comming from Java initially ask for  
refactoring tools, and then they later realize that they do not need  
them, now that they have escaped the boilerplate and manifest typing  
of Java ;)


Without knowing what and how you develop, but renaming files often  
and linking to them from many places, sounds like a bad idea,  
especially if this is for the web (and you are not using some URL- 
rewriting scheme). I have written lots of things in the past which  
link to articles and documentation at developer.apple.com, today  
majority of these links are broken (and so I would assume is a lot of  
bookmarks) because Apple apparently didn’t read “Cool URIs don’t  
change” [1].


[1] http://www.w3.org/Provider/Style/URI





More information about the textmate mailing list