elixir-makeup / makeup_erlang

Erlang lexer for Makeup
3 stars 6 forks source link

Switch to Application.compile_env/3 #21

Closed denizenging closed 1 year ago

denizenging commented 1 year ago

Gets rid of this warning:

==> makeup_erlang
Compiling 3 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/makeup/lexers/erlang_lexer.ex:250: Makeup.Lexers.ErlangLexer

This change requires the minimum-required Elixir version to be bumped to 1.10. So, It's up to the maintainers to whether to accept this maybe significant change.

josevalim commented 1 year ago

I think we can just do @inline false? I don't think anyone is using this configuration for now.

denizenging commented 1 year ago

I think we can just do @inline false? I don't think anyone is using this configuration for now.

The docs of NimbleParser mention that the option was set to false by default due to a bug in Elixir v1.5 and v1.6. We require ~> 1.6. If we want to inline, we can set to true and require Elixir ~> 1.7, otherwise false is sensible, I think.

josevalim commented 1 year ago

I see. Let's go with false and we revisit if someone ever wants to set it to true.

denizenging commented 1 year ago

Closing in favor of https://github.com/elixir-makeup/makeup_erlang/pull/22.