Skip to content

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

@newmanjeff

Description

@newmanjeff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions