Skip to content

Comments

Feature/fix deprecations#3

Open
hez wants to merge 3 commits intogniquil:masterfrom
hez:feature/fix-deprecations
Open

Feature/fix deprecations#3
hez wants to merge 3 commits intogniquil:masterfrom
hez:feature/fix-deprecations

Conversation

@hez
Copy link

@hez hez commented Aug 11, 2020

Fixes a bunch of deprecation warnings with newer Elixir. Tested with OTP 22 and Elixir 1.10.2.

The largest of the changes is moving from Dict.merge/2 to Map.merge/2. I believe this should work, the same tests are failing in this branch as master.

Copy of the deprecations fixed:

warning: parentheses are required when piping into a function call. For example:

    foo 1 |> bar 2 |> baz 3

is ambiguous and should be written as

    foo(1) |> bar(2) |> baz(3)

Ambiguous pipe found at:
  lib/ex_minimatch/compiler.ex:163

warning: module attribute @re_specials was set but never used
  lib/ex_minimatch/matcher.ex:10

warning: module attribute @two_star_no_dot was set but never used
  lib/ex_minimatch/matcher.ex:9

warning: module attribute @two_star_dot was set but never used
  lib/ex_minimatch/matcher.ex:8

warning: module attribute @star was set but never used
  lib/ex_minimatch/matcher.ex:7

warning: module attribute @qmark was set but never used
  lib/ex_minimatch/matcher.ex:5

warning: module attribute @two_star_no_dot was set but never used
  lib/ex_minimatch/compiler.ex:10

warning: module attribute @two_star_dot was set but never used
  lib/ex_minimatch/compiler.ex:9

warning: Dict.merge/2 is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists
  lib/ex_minimatch.ex:134: ExMinimatch.compile/2

warning: Dict.merge/2 is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists
  lib/ex_minimatch/matcher.ex:ExMinimatch.Matcher.match_regex_parts/1

warning: Dict.merge/2 is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists
Found at 7 locations:
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.clear_state_char/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.handle_dot_start/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.handle_open_class/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.handle_trailing_things/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.handle_weird_end/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.move_to_next/1
  lib/ex_minimatch/compiler.ex:ExMinimatch.Compiler.parse/1

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.

1 participant