MarcWeber / hasktags

Produces ctags "tags" and etags "TAGS" files for Haskell programs
Other
131 stars 33 forks source link

Skip symbolic links on POSIX platforms #1

Closed liyang closed 11 years ago

liyang commented 11 years ago

I have a fairly deep source tree and I leave symlinks around pointing to the top of the tree for convenience. Unfortunately this means dirToFiles never terminates, and I don't see a workaround.

System.Directory.doesDirectoryExist cannot discriminate between symlinks and real directories, so on non-Windows platforms we use System.Posix.Files.getSymbolicLinkStatus instead.

Bonus commits to fix upstream repository URL and a minor refactor of dirToFiles.

liyang commented 11 years ago

Also, hasktags does not build with haskell-platform 2013.2.0.0 due to overly-restrictive version dependencies.

Time for a release soon?

MarcWeber commented 11 years ago

find has a -L option to enable/disable following symlinks. Do we need such, too ? Disabling symlinks may fix it for you, but cause issues to others (without proof yet).

liyang commented 11 years ago

I've rewritten the pull request. Now it's always possible to make hasktags follow a symlink by explicitly naming it on the command line, so I'm inclined to avoid adding another flag. (Note that find does not follow symlinks by default.)

MarcWeber commented 11 years ago

I've cherry picked most changes, but wanted -L and the new -S option. Reasons: You renaming the descriptive "hsExtOnly" to "named" which is harder to understand made me aware that hsExtOnly is still not descriptive enough. I didn't see any reason why the option exists, so I gave it one. Please note that I also added the STDIN hack so that new requirements can be scripted easily.

Feel free to comment on that version. Yes, I think a release makes sense. Thanks for telling me.

I've also added you to the list of contributors

liyang commented 11 years ago

I negated the hsExtOnly/named parameter because it was used negated in the body of dirToFiles and I found the negation more confusing... but I'm happy enough with your changes, so closing. :)