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

Failed to parse warning #462

Open
frahugo opened this issue Jul 12, 2022 · 2 comments
Open

Failed to parse warning #462

frahugo opened this issue Jul 12, 2022 · 2 comments

Comments

@frahugo
Copy link

frahugo commented Jul 12, 2022

Precheck

  • Take a look at the open issues and be sure that your issue is not already covered.
  • Be sure your versions of Dialyxir and Erlex are up to date.

Environment

  • Elixir & Erlang/OTP versions (elixir --version): Elixir 1.12.3 (compiled with Erlang/OTP 24)

  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}

Current behavior

After upgrading puid package, dialyxir is having issues with the macro:

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Failed to parse warning:
[{:<, 1}, {:<, 1}, {:<, 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 5}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 6}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 7}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 8}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 9}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 10}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 11}, {:":", 1}, {:int, 1, 12}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, ...}, {:":", ...}, {...}, ...]


Legacy warning:
lib/platform/access_code.ex:7: The pattern <<<_@5:12,_@6:12,_@7:12,_@8:12,_@9:12,_@10:12,_@11:12,_@12:12,_/binary-unit:1>>, _> can never match the type <<<>>,<<>>>
________________________________________________________________________________
Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Failed to parse warning:
[{:<, 1}, {:<, 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 14}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 15}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 16}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 17}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 18}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 19}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 20}, {:":", 1}, {:int, 1, 6}, {:",", 1}, {:_, 1}, {:atom_part, 1, '@'}, {:int, 1, 21}, {:":", 1}, {:int, ...}, {...}, ...]


Legacy warning:
lib/platform/access_code.ex:7: The pattern <<_@14:6,_@15:6,_@16:6,_@17:6,_@18:6,_@19:6,_@20:6,_@21:6>> can never match the type <<>>

This is the module using the macro from puid:

defmodule Platform.AccessCode do
  @moduledoc """
  doc 
  removed
  """

  use Puid, bits: 32, chars: "ABCDEFGHJKMNPQRSTWYZabcdefghijkmnpqrstwyz23456789"
end

Expected behavior

Parse source code.

@tomtaylor
Copy link

Can we help move this forward at all? We use Dialyxir as part of our CI workflow and we can't upgrade Puid because of this issue.

@jeremyjh
Copy link
Owner

PRs are always welcome. Most likely this needs to be fixed in erlex.

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

No branches or pull requests

3 participants