Skip to content
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

Fix deprecation warnings in Elixir 1.11 #980

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

hoyon
Copy link
Contributor

@hoyon hoyon commented Oct 16, 2020

When compiling with Elixir 1.11, you get the following deprecation warnings which I've fixed:


warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/absinthe/pipeline/batch_resolver.ex:96

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/absinthe/subscription/local.ex:73

warning: :crypto.hash/2 defined in application :crypto is used by the current application but the current application does not directly depend on :crypto. To fix this, you must do one of:

  1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: :crypto]] to your "def project" in mix.exs

  lib/absinthe/phase/subscription/subscribe_self.ex:159: Absinthe.Phase.Subscription.SubscribeSelf.get_document_id/3

warning: :httpd_util.hexlist_to_integer/1 defined in application :inets is used by the current application but the current application does not directly depend on :inets. To fix this, you must do one of:

  1. If :inets is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :inets is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :inets, you may optionally skip this warning by adding [xref: [exclude: :httpd_util]] to your "def project" in mix.exs

  lib/absinthe/lexer.ex:282: Absinthe.Lexer.unescape_unicode/5

warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/absinthe/blueprint.ex:215
    module.__absinthe_blueprint__

where "module" was given the type atom() in:

    # lib/absinthe/blueprint.ex:214
    is_atom(module)

where "module" was given the type map() (due to calling var.field) in:

    # lib/absinthe/blueprint.ex:215
    module.__absinthe_blueprint__

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/absinthe/blueprint.ex:215: Absinthe.Blueprint.types_by_name/1

warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/absinthe/blueprint.ex:178
    ext_blueprint.__absinthe_blueprint__

where "ext_blueprint" was given the type atom() in:

    # lib/absinthe/blueprint.ex:177
    is_atom(ext_blueprint)

where "ext_blueprint" was given the type map() (due to calling var.field) in:

    # lib/absinthe/blueprint.ex:178
    ext_blueprint.__absinthe_blueprint__

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/absinthe/blueprint.ex:178: Absinthe.Blueprint.extend_fields/2

warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/absinthe/type.ex:56
    module.functions

where "module" was given the type atom() in:

    # lib/absinthe/type.ex:55
    %module{}

where "module" was given the type map() (due to calling var.field) in:

    # lib/absinthe/type.ex:56
    module.functions

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/absinthe/type.ex:56: Absinthe.Type.expand/1

warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
  lib/mix/tasks/absinthe.schema.json.ex:81: Mix.Tasks.Absinthe.Schema.Json.run/1

warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
  lib/mix/tasks/absinthe.schema.sdl.ex:50: Mix.Tasks.Absinthe.Schema.Sdl.run/1

@benwilson512 benwilson512 merged commit 85739ec into absinthe-graphql:master Oct 16, 2020
@benwilson512
Copy link
Contributor

Thank you!

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.

None yet

2 participants