Skip to content

Conversation

@britto
Copy link
Collaborator

@britto britto commented Jun 8, 2021

That warning no longer shows up in Elixir 1.12, but still does in 1.11 and lower. Adding generated: true in a few places fixes it.

warning: the result of the expression is ignored (suppress the warning by assigning the expression to the _ variable)
  lib/protobuf/decoder.ex:103

@britto
Copy link
Collaborator Author

britto commented Jun 8, 2021

Oddly enough, the warnings are gone in 1.10 and 1.11 but still show up in 1.8 and 1.9 🤔

@ericmj
Copy link
Collaborator

ericmj commented Jun 8, 2021

Can you add a comment to the file explaining why the generated: true were added and that they can be removed when we only support 1.12+?

If possible please see if you can narrow down which quotes cause the warnings on 1.8 and 1.9 and add the generated: true for them in separate commit. This will help us investigate the underlying issue in the Elixir compiler. Even though it seems to be fixed in 1.12 we don't know why and there's probably no test for it so we can easily have a regression.

@britto
Copy link
Collaborator Author

britto commented Jun 8, 2021

@ericmj that's a good idea! I will install 1.8 and 1.9 locally tomorrow and try to further narrow it down 🔍

    warning: the result of the expression is ignored (suppress the warning by
    assigning the expression to the _ variable)
      lib/protobuf/decoder.ex:103
@britto britto force-pushed the fix-elixir-1-11-compiler-warnings branch from 788b0f5 to faad7a9 Compare June 9, 2021 17:13
@britto
Copy link
Collaborator Author

britto commented Jun 9, 2021

@ericmj here's a breakdown of my findings per version:

  • 1.12: no warnings, no changes required.
  • 1.11 and 1.10 behave the same: this is the minimal set of generated: true required to silence the warnings.
  • 1.9 and 1.8 also behave the same: unable to fix even when adding generated: true to all quote calls.

@whatyouhide whatyouhide merged commit 4e39ed2 into elixir-protobuf:master Jun 10, 2021
@britto britto deleted the fix-elixir-1-11-compiler-warnings branch June 10, 2021 14:31
This was referenced Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants