-
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
Prevent "a term is constructed, but never used" warning #547
Prevent "a term is constructed, but never used" warning #547
Conversation
Hm... Edit: this is otherwise misleading at https://github.com/pulls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You no longer need to wrap the term in a fun
.
We use a construct, as suggested by @bjorng, to modify the generated marker
If I replace
|
Hm... that's odd. I guess we'll have to dig deeper into what might be causing that, now. When I did my local tests Edit: it seems like it might be complaining about a missing |
@paulo-ferraz-oliveira I think it's fair to ask for a way to disable this warning in |
@michaelklishin, maybe (?) In our 100+ lib.s I didn't see this happening yet. And many are using |
I agree. I've created erlang/otp#4598. |
Thank you @bjorng |
Cool. We'd just have to add to |
At the same, time, the pull request still seems relevant, since it removes a "hack". |
Yes, this pull request is still relevant. |
This PR looks fine to me. Is it complete? |
|
I'd be happy try it and the new flag with a slightly out of date version of RabbitMQ as we have migrated to OTP |
Cool, I mean... erlang/otp#4598 hasn't yet been merged, but if you're willing to compile/test from it, it'd be nice. I'm still wondering what's causing the new warnings, though. Any ideas? |
erlang/otp#4598 is now merged. |
I'm afraid I cannot get RabbitMQ 3.8 to compile on OTP 24 with this patch. It can be merged if there's evidence that it works for other codebases. I guess we will have to go with the new compiler flag for 3.8 and in future 3.9 Lager is no longer used. |
@michaelklishin: I haven't checked this yet (flag) since I was waiting for replies on #547 (comment). Is it possible to somehow add that flag to |
Compiler flags are controlled by the build system used. |
Yeah, I forgot you're not using Does What would be required to import |
|
@lhoguin confirmed that erlang.mk will respect |
Good news. Once you know more (or, eventually, have this working for you), let me know what I can change, in |
No matter what I tried I cannot get this PR or the flags from erlang/otp#4598 to avoid or silence the warning. I suggest that this PR is merged regardless. We will add |
It's only a matter of time for any logging library ;) |
I think I have cleared out the lager projects at appveyor's CI website. |
Yeah, I think we can kill appveyor, I don't know who even added it. |
OK, cleared out appveyor and like a bunch of b*sho and travis webhooks - so i think all of that is gone now. @paulo-ferraz-oliveira |
I'm OK to merge. As per @michaelklishin's recent comment it seems we got his go ahead. |
appveyor was added by a former member of our team after we hit a Windows-specific issue. If Windows testing is covered elsewhere, Lager can probably drop it. |
There is Windows testing (I added it) but it's now done via GitHub Actions. 👍 |
We use a construct, as suggested by @bjorng, to modify the generated marker.
This potentially closes #546, as reported by @michaelklishin, with the implementation suggested by @bjorng in erlang/otp#4576 (comment).
@Vagabond: this prevents any change to consumer code since we actually just address the issue. Lemme know if it's acceptable.
@michaelklishin, once tests are passing, if you have time, I invite you to test this version to see if the issue goes away completely, for you.