absinthe-graphql / absinthe

The GraphQL toolkit for Elixir
http://absinthe-graphql.org
Other
4.28k stars 524 forks source link

Compiler warnings with Elixir v1.17.0-rc.0 #1319

Closed nathany-copia closed 4 months ago

nathany-copia commented 4 months ago

Environment

Expected behavior

No compile-time warnings

Actual behavior

When compiling a project that uses Absinthe with Elixir v1.17.0-rc.0, I see a number of warnings.

What is a little unusual to me is that these warnings are when compiling the project itself, not when compiling the Absinthe dependency. These file paths don't exist within the project itself (we have no absinthe folder under lib).

This is a heads up so that hopefully the next Absinthe version supports Elixir 1.17 when released. Has anyone else tried this and seen the same issue?

Compiling 978 files (.ex)
warning: using map.field notation (without parentheses) to invoke function Absinthe.Type.BuiltIns.Directives.__absinthe_blueprint__() is deprecated, you must add parentheses instead: remote.function()
Warning:   (absinthe 1.7.6) lib/absinthe/phase/schema/directive_imports.ex:36: Absinthe.Phase.Schema.DirectiveImports.do_imports/3
  (absinthe 1.7.6) lib/absinthe/phase/schema/directive_imports.ex:18: Absinthe.Phase.Schema.DirectiveImports.handle_imports/2
  (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:16: anonymous fn/3 in Absinthe.Blueprint.Transform.prewalk/2
  (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:117: Absinthe.Blueprint.Transform.walk/4
  (elixir 1.17.0-rc.0) lib/enum.ex:1829: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
warning: using map.field notation (without parentheses) to invoke function Absinthe.Type.BuiltIns.DeprecatedDirectiveFields.__absinthe_blueprint__() is deprecated, you must add parentheses instead: remote.function()
Warning:   (absinthe 1.7.6) lib/absinthe/phase/schema/type_extension_imports.ex:38: Absinthe.Phase.Schema.TypeExtensionImports.do_imports/3
  (absinthe 1.7.6) lib/absinthe/phase/schema/type_extension_imports.ex:18: Absinthe.Phase.Schema.TypeExtensionImports.handle_imports/2
  (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:16: anonymous fn/3 in Absinthe.Blueprint.Transform.prewalk/2
  (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:117: Absinthe.Blueprint.Transform.walk/4
  (elixir 1.17.0-rc.0) lib/enum.ex:1829: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
warning: using map.field notation (without parentheses) to invoke function Absinthe.Schema.Prototype.__absinthe_directives__() is deprecated, you must add parentheses instead: remote.function()
Warning:   (absinthe 1.7.6) lib/absinthe/schema.ex:624: Absinthe.Schema.directives/1
  (absinthe 1.7.6) lib/absinthe/phase/schema/import_prototype_directives.ex:16: Absinthe.Phase.Schema.ImportPrototypeDirectives.run/2
  (absinthe 1.7.6) lib/absinthe/pipeline.ex:408: Absinthe.Pipeline.run_phase/3
  (absinthe 1.7.6) lib/absinthe/schema.ex:386: Absinthe.Schema.__after_compile__/2
  (elixir 1.17.0-rc.0) src/elixir_module.erl:461: anonymous fn/6 in :elixir_module.expand_callback/6
warning: using map.field notation (without parentheses) to invoke function Absinthe.Schema.Prototype.Compiled.__absinthe_directives__() is deprecated, you must add parentheses instead: remote.function()
Warning:   (absinthe 1.7.6) lib/absinthe/schema/compiled.ex:27: Absinthe.Schema.Compiled.__absinthe_directives__/1
  (elixir 1.17.0-rc.0) src/elixir_erl_pass.erl:715: :elixir_erl_pass.no_parens_remote/2
  (absinthe 1.7.6) lib/absinthe/schema.ex:624: Absinthe.Schema.directives/1
  (absinthe 1.7.6) lib/absinthe/phase/schema/import_prototype_directives.ex:16: Absinthe.Phase.Schema.ImportPrototypeDirectives.run/2
  (absinthe 1.7.6) lib/absinthe/pipeline.ex:408: Absinthe.Pipeline.run_phase/3
Compilation failed due to warnings while using the --warnings-as-errors option
Error: Process completed with exit code 1.

Relevant Schema/Middleware Code

I don't currently have a stand-alone example.

nathany-copia commented 4 months ago

https://elixirforum.com/t/elixir-v1-17-0-rc-0-released/63764/34?u=nathany

benwilson512 commented 4 months ago

Should be fixed by https://github.com/absinthe-graphql/absinthe/pull/1318

nathany-copia commented 4 months ago

Thanks.

Sorry I didn't see that one when I was searching around to see if it was fixed.