Hi. I've started having a problem with the TODO bundle, where 'Show TODO list' never completes - it just keeps processing. I assume that there's some kind of infinite loop in the regex search, but I have no idea how to find it. I stripped away the list of options (FIXME, CHANGED etc) but it hangs on all of them. Can anyone offer any advice?
Bruno
On Feb 26, 2007, at 9:53 AM, Bruno wrote:
Hi. I've started having a problem with the TODO bundle, where 'Show TODO list' never completes - it just keeps processing. I assume that there's some kind of infinite loop in the regex search, but I have no idea how to find it. I stripped away the list of options (FIXME, CHANGED etc) but it hangs on all of them. Can anyone offer any advice?
Can you provide a minimal example of a file where this happens? i.e. take the file that is causing problems, copy it out of its project if any, to make sure it is the only one being considered, and then start removing chunks of the file until the command starts working?
Bruno
Haris Skiadas Department of Mathematics and Computer Science Hanover College
Can you provide a minimal example of a file where this happens? i.e. take the file that is causing problems, copy it out of its project if any, to make sure it is the only one being considered, and then start removing chunks of the file until the command starts working?
It only happens when I run it on my 'Scripts' project. This project contains all my shell scripts - more than a hundred items. It's clearly a problem with one of the files, but I've no idea which. I guess the thing to do would be create a number of projects with parts of this folder in each, and try to narrow it down that way. I don't suppose I could enter some kind of logging line to the Show TODOs script to give me a clue?
Bruno
On Feb 27, 2007, at 8:26 AM, Bruno wrote:
Can you provide a minimal example of a file where this happens? i.e. take the file that is causing problems, copy it out of its project if any, to make sure it is the only one being considered, and then start removing chunks of the file until the command starts working?
It only happens when I run it on my 'Scripts' project. This project contains all my shell scripts - more than a hundred items. It's clearly a problem with one of the files, but I've no idea which. I guess the thing to do would be create a number of projects with parts of this folder in each, and try to narrow it down that way. I don't suppose I could enter some kind of logging line to the Show TODOs script to give me a clue?
Sure you can, you can have a very clear look of the Show TODOs script in the bundle editor. The first thing I would try is comment out each of the lines in the $tags array, starting with the RADAR one, and seeing this way which one is the problem.
I don't really see how any of those could be a problem, but it's worth a try. You can also add some print statements along the way in the script. Also, you can set TM_TODO_IGNORE to a regexp of filenames to ignore, which might allow you to narrow down the culprit, for instance filtering the scripts by the first character or something.
Bruno
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On 26.02.2007, at 15:53, Bruno wrote:
Hi. I've started having a problem with the TODO bundle, where 'Show TODO list' never completes - it just keeps processing. I assume that there's some kind of infinite loop in the regex search, but I have no idea how to find it. I stripped away the list of options (FIXME, CHANGED etc) but it hangs on all of them. Can anyone offer any advice?
Bruno
Does your project contain symbolic links? The TODO bundle uses the common path of all files in a bundle. If the project contains files in /var/logs/ and files in /Users/soryu/Projects/foo the common path is / and the TODO list will search the whole harddrive, that is /.
Maybe that helps. Even searching your complete home directory will take a long time.
Soryu
On 2007-02-28 19:26:39 +0000, Soryu Soryu@serenity.de said:
Does your project contain symbolic links? The TODO bundle uses the common path of all files in a bundle. If the project contains files in /var/logs/ and files in /Users/soryu/Projects/foo the common path is / and the TODO list will search the whole harddrive, that is /.
Maybe that helps. Even searching your complete home directory will take a long time.
Thanks for the advice, but I think the problem might be connected to my missing Textmate bundle (see separate thread). Some poking around with the Show TODO code demonstrated that it was very unhappy about the line:
TextMate.each_text_file do |file|
Basically the loop just hangs. Since my symbolic links are all internal to the main directory (/usr/local/scripts/) I don't think the cause is what you suggest. I think it is related to my missing default bundle. When I solve that problem I'll let you know what happens.
Bruno
Does your project contain symbolic links? The TODO bundle uses the common path of all files in a bundle. If the project contains files in /var/logs/ and files in /Users/soryu/Projects/foo the common path is / and the TODO list will search the whole harddrive, that is /.
Soryu - you are right, and my surmise was wrong. I had a symlink to a file that was causing the whole harddisk to be searched. I've amended that and now the search works fine.
And thank you Haris, for setting me on the debugging path.
Bruno