ClojureScript Analyzer/Compiler should have extensible hooks to handle warnings

Description

To make the build process more configurable and stricter/less strict as needed by various projects, the cljs compiler should provide hooks that're invoked whenever a warning is emitted. Eventually these should be exposed through something like cljsbuild.

The attached patch changes the analyzer to emit warnings and emit dynamic warning handlers.

Note sure where the test for this could go though, it doesn't look like there's any infrastructure for the clj side.

Environment

None

Activity

Show:
Sean Grove
October 28, 2013, 3:50 PM

Will take a look and add some clj tests to confirm the behavior.

Sean Grove
November 2, 2013, 8:46 PM

Made sure all references to cljs-warnings were updated appropriately with the new warning types, added some basic tests, changed confirm-var-exists behavior to only call warning if a warning case has been triggered.

Sean Grove
November 2, 2013, 8:53 PM

There are some bigger-than-expected changes in here, and it'd be nice to get some extra eyes on it to make sure warnings are triggered where expected. I tested a lot of it out in the repl and added some tests, but don't have enough code to exercise all of the paths.

David Nolen
November 4, 2013, 2:02 PM

Patch looks good to me and it appears to work as advertised

David Nolen
November 4, 2013, 2:05 PM
Completed

Assignee

Unassigned

Reporter

Sean Grove

Labels

Approval

None

Patch

Code

Priority

Minor