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

Be explicit about steps to avoid warnings #1085

Closed
wants to merge 1 commit into from

Conversation

PragTob
Copy link
Contributor

@PragTob PragTob commented Nov 8, 2023

Lots of warnings like this one on elixir 1.16.0-rc.0:

warning: negative steps are not supported in Enum.slice/2, pass 0..-2//1 instead
  (elixir 1.16.0-rc.0) lib/enum.ex:2994: Enum.slice/2
  (credo 1.7.0) lib/credo/check/consistency/multi_alias_import_require_use/collector.ex:27: Credo.Check.Consistency.MultiAliasImportRequireUse.Collector.traverse/2
  (elixir 1.16.0-rc.0) lib/macro.ex:637: anonymous fn/4 in Macro.do_traverse_args/4
  (stdlib 5.1.1) lists.erl:1706: :lists.mapfoldl_1/3
  (stdlib 5.1.1) lists.erl:1707: :lists.mapfoldl_1/3

Thanks for all the great work! :green-heart:

IMG_20220901_174517

Lots of warnings like this one on elixir 1.16.0-rc.0:

```
warning: negative steps are not supported in Enum.slice/2, pass 0..-2//1 instead
  (elixir 1.16.0-rc.0) lib/enum.ex:2994: Enum.slice/2
  (credo 1.7.0) lib/credo/check/consistency/multi_alias_import_require_use/collector.ex:27: Credo.Check.Consistency.MultiAliasImportRequireUse.Collector.traverse/2
  (elixir 1.16.0-rc.0) lib/macro.ex:637: anonymous fn/4 in Macro.do_traverse_args/4
  (stdlib 5.1.1) lists.erl:1706: :lists.mapfoldl_1/3
  (stdlib 5.1.1) lists.erl:1707: :lists.mapfoldl_1/3
```

Thanks for all the great work! :green-heart:
@PragTob
Copy link
Contributor Author

PragTob commented Nov 8, 2023

aight yeah that's what I feared..old elixir versions don't support the syntax and so the proper workaround would be to extract helpers that are compiled differently based on what elixir version is in use... fun :|

rrrene added a commit that referenced this pull request Nov 13, 2023
@rrrene
Copy link
Owner

rrrene commented Nov 16, 2023

v1.7.2-rc.0 should account for this. I implemented the backport based on your branch, but somehow lost your commits (probably a "fat finger rebase").

Could you have a look if it solves your issue? 😄

@PragTob
Copy link
Contributor Author

PragTob commented Nov 17, 2023

@rrrene ah good to see you 💚 Yes, warnings are gone, there's one more, right now, I'll MR it :)

tobi@qiqi:~/github/benchee$ mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.04s
Unchanged:
  bunt 0.2.1
  deep_merge 1.0.0
  dialyxir 1.4.2
  earmark_parser 1.4.37
  erlex 0.2.6
  ex_doc 0.30.9
  ex_guard 1.6.1
  excoveralls 0.18.0
  file_system 0.2.10
  fs 8.6.1
  jason 1.4.1
  makeup 1.1.0
  makeup_elixir 0.16.1
  makeup_erlang 0.1.2
  nimble_parsec 1.3.1
  statistex 1.0.0
  table 0.1.2
Upgraded:
  credo 1.7.1 => 1.7.2-rc.0
* Updating credo (Hex package)
tobi@qiqi:~/github/benchee$ mix credo
==> credo
Compiling 252 files (.ex)
    warning: function traverse/4 is unused
    │
 56 │     defp traverse({unquote(op), _, nil} = ast, issues, _issue_meta, _parens?) do
    │          ~
    │
    └─ lib/credo/check/warning/mix_env.ex:56:10: Credo.Check.Warning.MixEnv (module)

Thanks for your work!

IMG_20220601_080610

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