commure / sourcegen

🐠Like procedural macro, but generates sources! 🐡
Apache License 2.0
30 stars 4 forks source link

🌈Colorful output #22

Open idubrov opened 4 years ago

idubrov commented 4 years ago

Sourcegen could really use some help from colors on terminal and, maybe, add some smiley faces, too!

P.S. At very least, error messages should be clean and clear -- currently, when tool fails, it is not obvious that it did so.

idubrov commented 4 years ago

Another potential improvement: print list of modules / some basic stats where #[sourcegen] attributes were found, to help troubleshooting cases when module is not included by mistake -- which is a common thing when you are setting up new code!

idubrov commented 4 years ago

Also: when it cannot process item (for example, was placed in front of invalid item type), should report it as well.

idubrov commented 4 years ago

Another thing: if it fails to produce code because generated code is invalid (could happen when generation is driven off other files; for example, generated field name might be invalid Rust identifier), it reports an error in the file that doesn't yet exist.