heywhy / ex_elasticlunr

Elasticlunr is a small, full-text search library for use in the Elixir environment. It indexes JSON documents and provides a friendly search interface to retrieve documents.
https://hexdocs.pm/elasticlunr
MIT License
189 stars 9 forks source link

Warning message on compile #15

Closed fceruti closed 2 years ago

fceruti commented 2 years ago

After every compile I get the message at the end of this post. Maybe I'm a little OCD, but I can't stand this kind of messages :P

The way I see it, there are 3 possible solutions:

1) Document in the installation process that crypto should be added to extra_applications. 2) Add crypto as a dep of ex_elasticlunr. 2) Modify the code so that crypto is not required.

The preferred scenario to me would be #3, which begs the question: Where is it being used?

Is it here? https://github.com/heywhy/ex_elasticlunr/blob/204827a4f2e440dcdc1cbe5eb3b32ea56a9fbae7/lib/elasticlunr/core/index.ex#L49

warning: :crypto.hash/2 defined in application :crypto is used by the current application but the current application does not 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

Invalid call found at 2 locations:
  lib/uuid.ex:498: UUID.namebased_uuid/2
  lib/uuid.ex:502: UUID.namebased_uuid/2

warning: :crypto.strong_rand_bytes/1 defined in application :crypto is used by the current application but the current application does not 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

Invalid call found at 3 locations:
  lib/uuid.ex:340: UUID.uuid4/1
  lib/uuid.ex:469: UUID.uuid1_clockseq/0
  lib/uuid.ex:492: UUID.uuid1_node/1
heywhy commented 2 years ago

I will take a look at this, hoping to clear the warnings.