basilisp-lang / basilisp

A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+
https://basilisp.readthedocs.io
Eclipse Public License 1.0
260 stars 7 forks source link

Consider developing a more sophisticated INFO/WARN/ERROR system for compiler issues #677

Open chrisrink10 opened 2 years ago

chrisrink10 commented 2 years ago

Currently, info messages and warnings are simply emitted by the Basilisp compiler (analyzer) logger, which is just a standard Python logger. Errors are generally exceptions which immediately stop the compilation process.

It may be worthwhile to think about collecting those errors via the Context object, rather than having them emitted simply as text warnings. As it stands, there's no easy way to (say) configure a warning as an error and stop compilation.

Also, warnings are all added relatively ad-hoc and each have their own custom flags. It may be worth considering having a standard warning/error naming system.

chrisrink10 commented 2 years ago

Thought of while working on #671