-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lager parse transforms produce warnings with the latest Erlang 24 compiler #546
Comments
I should mention that this is with Lager |
Thanks, @michaelklishin. I've seen |
No, Since it's not practical for even a moderately sized codebase to explicitly ignore the value returned by the transform-generated code, I'm afraid this has to be addressed in either Lager or |
Most logging function calls out there probably do not check the returned value. So Lager could assume the value should be ignored by default and introduce another set of functions that do return a value, for those who care enough to check it. I can't think of any other solution right now. |
I think we should wait for the next RC before trying to address this. Chasing master is not interesting as a bunch of stuff seems to still be in flux there. |
That said, this is caused by lager returning ok or an error if lager is not running. That error is probably not useful (I don't know if anyone has ever checked that result) so we could have lager calls always return ok even if lager is down. |
Well, I can say that all our code does |
When you Do note it's "a term is constructed, but never used" which I've only seen before when we actually have a term that's not matched or returned. |
@Vagabond that's my point. The returned value is never checked and the scenario seems to be only likely early on application boot. As for "chasing master", that's the only way our team knows with major OTP releases, begin chasing master a couple of months before the release. If we are a couple of weeks late, there will be users who will install the new release and then claim that RabbitMQ is "totally broken". This is not currently blocking for RabbitMQ because we are switching to OTP logger in master (only to have one less dependency, we generally have been very happy with Lager). It would be great to address this and support OTP 24 in Lager for RabbitMQ 3.8 releases going forward, though :) |
Do you think it acceptable to have an option for this? I'd hate to break previous behaviour. |
As @Vagabond stated, this is solved (I tested it in |
To work around erlang-lager/lager#546 which blocks OTP 24 compatibility work in projects that use Lager. For Cuttlefish, explicitly ignoring return values is a practical option.
To work around erlang-lager/lager#546. The flag was introduced in erlang/otp#4598, which is more recent than 24-rc.1.
To work around erlang-lager/lager#546. The flag was introduced in erlang/otp#4598, which is more recent than 24-rc.1.
To work around erlang-lager/lager#546. The flag was introduced in erlang/otp#4598, which is more recent than 24-rc.1.
Filing here per suggestion from @paulo-ferraz-oliveira. @lhoguin suggested this is not really a novel problem for Lager.
See erlang/otp#4576 for the background. The below is true with a very recent Erlang 24 build (I built master with
kerl
a day ago, for example).I don't have a way to reproduce this besides this:
It will eventually produce warnings such as
rabbit_log
is a module which is replaced by Lager parse transforms. Our best lead is that this code produces an expressionwhich causes the cutting edge Erlang 24 compiler to emit warnings. With
-Werror
that means things no longer compile.The text was updated successfully, but these errors were encountered: