magefile / mage

a Make/rake-like dev tool using Go
https://magefile.org
Apache License 2.0
4.05k stars 249 forks source link

Improve panic reporting #333

Open flowchartsman opened 3 years ago

flowchartsman commented 3 years ago

From a UX perspective, "Error: runtime error: invalid memory address or nil pointer dereference" is not particularly helpful if I've made a mistake in my magefile that causes a panic, since there's zero context to localize it. Though I appreciate the desire to keep error message parsimonious in a build tool, it would be super helpful if I could get a full stacktrace when running with -debug or at least the relevant location of the panic without -debug

natefinch commented 3 years ago

yeah 100%. I think this is just not a flow I have spent a lot of time on. Just dumping the regular panic message shouldn't be too hard.