exprotobuf icon indicating copy to clipboard operation
exprotobuf copied to clipboard

Broken on Elixir 1.17 with --warnings-as-errors

Open newmanjeff opened this issue 1 year ago • 0 comments

When compiling a project under Elixir 1.17, a warning is produced from use Protobuf:

warning: using map.field notation (without parentheses) to invoke function Protobuf.Field.record() is deprecated, you must add parentheses instead: remote.function()
  (exprotobuf 1.2.17) lib/exprotobuf/utils.ex:100: Protobuf.Utils.convert_from_record/2
  (exprotobuf 1.2.17) lib/exprotobuf.ex:226: Protobuf.namespace_fields/3
  (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
  (exprotobuf 1.2.17) lib/exprotobuf.ex:207: anonymous fn/5 in Protobuf.namespace_types/3
  (elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
...
Compilation failed due to warnings while using the --warnings-as-errors option

Since the warning comes from a macro, mix treats the warning as part of the main project and not the dependency. Therefore compilation fails.

newmanjeff avatar Nov 19 '24 22:11 newmanjeff