MarcWeber / hasktags

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

Regression with emacs on 0.70.0 #47

Closed k-bx closed 6 years ago

k-bx commented 6 years ago

Hi. The TAGS file generated by the 0.70.0 gives an error message TAGS file out of date ... stopping at closest match in my Emacs on a simple jump to a datatype. I've made a repo where you can reproduce this, I've added both 0.69.5 and a 0.70.0 tags-files, and the source is as simple as this:

module Main where

-- Foo

data Foo = Foo
  { barField :: Int
  }

main :: IO ()
main = do
  putStrLn "hello world"

https://github.com/k-bx/hasktags-regression

Emacs version is 25.2.2 (Ubuntu 18.04)

jhenahan commented 6 years ago

Thanks very much for the report, and the regression repo! I'll have a look at what's going on. I suspect it's due to the formatting of that record. Record handling is pretty brittle in the face of formatting quirks, so that's my immediate guess.

k-bx commented 6 years ago

What fixes the behavior is adding the data in the tag-file, previously you've had:

data Foo ^?Foo^A4,5                                                                                                                                                                                                                                                                                                  
data Foo = Foo^?Foo^A4,5                                                                                                                                                                                                                                                                                             

and the new version generates:

Foo^?Foo^A4,5                                                                                                                                                                                                                                                                                                        
Foo^?Foo^A4,5                                                                                                                                                                                                                                                                                                        

adding data at the beginning fixes the problem, probably emacs matches the whole line from its beginning.

jhenahan commented 6 years ago

Oh, yup, I see what I did. Woof. That's quite the regression. I'll get a fix together and get a point release out. Thanks again for the report.

jhenahan commented 6 years ago

I put the old logic back. It means that operator tag selectors are gonna look weird until I figure out a cleaner way to deal with that, but it least it won't break nearly all Emacs tags. Fixed in 0.70.1.