Stream: helpdesk (published)

Topic: How to suppress warning messages


view this post on Zulip Kwaku Oskin (Sep 25 2021 at 10:26):

Does anyone know, how to make silent messages " incremental compilation may be fatally broken for this module "?

The problem is that I have a module, which pirates function from the Base. And each time I make changes to this module I see this warning message.

WARNING: Method definition show(IO, Base.CoreLogging.LogLevel) in module CoreLogging at logging.jl:142 overwritten in module BIBO at /home/skoffer/.julia/dev/FOO/src/custom_logging.jl:47.
incremental compilation may be fatally broken for this module

For some reason, this message is not affected by julia --warn-overwrite=no, so I am at loss here.

view this post on Zulip Sundar R (Sep 25 2021 at 11:34):

Looking at the source (src/gf.c), it looks like that warning is on when --output-incrementalis on, so --output-incremental=no should do it. I'm not clear on what that option does though, tbh (as opposed to --compiled-modules which is documented )

view this post on Zulip Mark Kittisopikul (Sep 25 2021 at 11:54):

It sounds like you are overwriting a method exactly. You could avoid the piracy by boxing a type. That would help.

view this post on Zulip Kwaku Oskin (Sep 25 2021 at 12:58):

This is weird, but for some reason --output-incremental=no does not help. But looking through the source code I see no reason why :-( Mysterious.

view this post on Zulip Kwaku Oskin (Sep 25 2021 at 13:00):

Mark Kittisopikul said:

It sounds like you are overwriting a method exactly. You could avoid the piracy by boxing a type. That would help.

Unfortunately I can not avoid it, since I need to change default output of log levels (e.g., INFO instead of Info). Of course, I can write my own logger, but then the code will be incompatible with all other loggers.

This is one of the cases, when piracy is necessary.


Last updated: Nov 22 2024 at 04:41 UTC