MarcWeber / hasktags

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

openFile: resource busy (file is locked) on Windows #38

Closed ezyang closed 6 years ago

ezyang commented 7 years ago

I believe this is because Windows has a case-insensitive file system, and hasktags writes out both TAGS and tags, which are the same file.

jhenahan commented 7 years ago

I haven't had this problem on OS X with a case-insensitive filesystem, but I'll spin up a Windows VM and see what I can do about this. Thanks for the report.

bonds commented 7 years ago

I get this on OpenBSD as well. I thought I was going crazy.

~ ❯❯❯ hasktags -b -a -x -R -o /home/scott/.vim/tags/haskell /home/scott/bin/play.hs
hasktags: /home/scott/.vim/tags/haskell: openFile: resource busy (file is locked)
~  [1] ❯❯❯
bonds commented 7 years ago

If I replace the -b with -c so its generating just ctag format, it works without error. Is it trying to write both ctags and etags at the same time if I use -b?

jhenahan commented 7 years ago

As that's explicitly what the -b flag does, yes, it is. I'll see what I can dig up.

ezyang commented 6 years ago

I managed to repro this on OS X, interestingly enough:

MacBook-Pro-97:cabal ezyang$ hasktags .
hasktags: tags: openFile: resource busy (file is locked)
jhenahan commented 6 years ago

When generating both files, hasktags will now explicitly name tag files ctags for the CTags and the TAGS file will remain for the ETags format. I've updated the documentation to mention this, as well. I realize this is a potential hassle for Vim users, and I'm happy to look into better solutions. This new version has been pushed to Hackage as 0.69.4.