tinylib / msgp

A Go code generator for MessagePack / msgpack.org[Go]
MIT License
1.8k stars 192 forks source link

Best effort warnings re: external types #128

Open ttacon opened 9 years ago

ttacon commented 9 years ago

How do you feel about improving the warnings we give users regarding types that are external to the package a given file is in? More simply:

Should we warn users if we can track down an external type and we know it doesn't implement the necessary interfaces we'd like it to? This implies a little extra work on our part but I think it might help the user experience? What do you think? This is more aimed at command line usage.

philhofer commented 9 years ago

Sounds reasonable. If you decide you want to implement this, I have a design request: start the search as early as possible (hopefully right after the first file is parsed) and don't wait for the results until after the rest of the output has been written. This way, we can even bound the search time to some reasonable number of milliseconds (say, 150ms). I'd like this tool to be fast enough that people feel comfortable using it as part of their build process (e.g. make) if they want to.