Some time ago Julia introduced warnings for re-defining methods. This kind of created havoc in my work because what I do all day is
- Edit Julia file.
- GOTO 1.
So every time I edit my file I’d get a page of warnings. Being informed that my methods have been redefined is not helpful, since that is exactly what I am trying to do. I’m developing + testing. At the time a kind soul produced a module called ClobberingReload that allowed me to get back to work. The big downside of that module is that it suppresses legitimate warnings too.
Over time I changed the way I write my Julia scripts to avoid using functions at all, so I could get real errors without the noise from the “method overwritten” warnings. Of course, this is a horrible solution. The idea of being pushed by the language warnings to avoid using functions is slightly horrifying.
In some cases it just wasn’t viable to avoid functions. So I was forced to change my workflow to:
- Edit file.
- Exit Julia.
- Start Julia. …
- GOTO 1
This of course created a big delay in my workflow, but some times it was better than not using functions at all, or using functions but suppressing all errors.
Anyway, that was some time ago. I am now writing with the hope that a better solution has appeared. I have searched through the forums and I have found this package:
This might be a bit more elegant than ClobberingReload, but it doesn’t help with the underlying issue that it suppresses everything to STDOUT, and not just the “method overwritten” warnings.
Is anyone aware of a more recent alternative that would allow me to suppress the “method overwritten” without suppressing other errors? I would really like to go back to coding sensibly. I want to use functions to organize my code, and I want to be informed about syntax errors and the like, without having to reload Julia after every edit, or having Julia complain about every function in my file.
Thank you for your help.