Skip to content

Prevent "current application does not depend on" compile warnings#13

Open
pzingg wants to merge 1 commit into
boydm:masterfrom
pzingg:otp-23-dependencies
Open

Prevent "current application does not depend on" compile warnings#13
pzingg wants to merge 1 commit into
boydm:masterfrom
pzingg:otp-23-dependencies

Conversation

@pzingg

@pzingg pzingg commented Feb 22, 2022

Copy link
Copy Markdown

Uses the :extra_applications key in mix.exs
Exposes dependencies correctly in mix.exs to prevent these warnings:

warning: Earmark.as_html!/2 defined in application :earmark is used by the current application but the current application does not depend on :earmark. To fix this, you must do one of:

  1. If :earmark is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :earmark 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 :earmark, you may optionally skip this warning by adding [xref: [exclude: [Earmark]]] to your "def project" in mix.exs

  lib/phoenix_markdown/engine.ex:35: PhoenixMarkdown.Engine.compile/2

warning: HtmlEntities.decode/1 defined in application :html_entities is used by the current application but the current application does not depend on :html_entities. To fix this, you must do one of:

  1. If :html_entities is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :html_entities 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 :html_entities, you may optionally skip this warning by adding [xref: [exclude: [HtmlEntities]]] to your "def project" in mix.exs

  lib/phoenix_markdown/engine.ex:58: PhoenixMarkdown.Engine.do_restore_smart_tags/2

This will expose required deps, such as :earmark.
@altdsoy

altdsoy commented Apr 25, 2022

Copy link
Copy Markdown

Hello 👋🏼,
Is there a plan to merge that PR?

@altdsoy

altdsoy commented May 9, 2022

Copy link
Copy Markdown

Little up..
I hope OP @pzingg and author @boydm you are all good...

@thbar

thbar commented Oct 16, 2023

Copy link
Copy Markdown

I think we even got compilation failures at times (but not always), most likely linked to out upgrade to Elixir 1.15.

See:

It would be nice to merge this PR for continued use of the library on Elixir 1.15+!

@thbar

thbar commented Oct 16, 2023

Copy link
Copy Markdown

/cc @boydm @WalkerMills - unsure if this project is still maintained, and/or if you need extra people?

@jaimeiniesta

Copy link
Copy Markdown

Hi, there are new compilation warnings on Elixir 1.17:

==> phoenix_markdown
Compiling 2 files (.ex)
    warning: Regex.regex?/1 is deprecated. Use Kernel.is_struct(term, Regex) or pattern match on %Regex{} instead
    │
 82 │     if Regex.regex?(regex) do
    │              ~
    │
    └─ lib/phoenix_markdown/engine.ex:82:14: PhoenixMarkdown.Engine.only?/3
    └─ lib/phoenix_markdown/engine.ex:106:14: PhoenixMarkdown.Engine.except?/3

@WalkerMills WalkerMills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good but I don't have write access here. You get an approval from me fwiw 🤷

@WalkerMills

WalkerMills commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

I actually don't use the fork I made of this project any more, I use this instead: https://gitlab.com/WalkerMills/phoenix_pandoc ETA: deleted the fork for clarity

It is similar, but I have some documents in latex and rst so I needed more than just markdown. I'm using it with Elixir 1.17

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.

5 participants