Skip to content

Mix Docs Build faill #1797

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

Closed
DesmondLouis opened this issue Oct 26, 2023 · 16 comments
Closed

Mix Docs Build faill #1797

DesmondLouis opened this issue Oct 26, 2023 · 16 comments

Comments

@DesmondLouis
Copy link

DesmondLouis commented Oct 26, 2023

Proceed? [Yn]
Building docs...

12:25:45.799 [notice] Application makeup exited: exited in: Makeup.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function Makeup.Application.start/2 is undefined (module Makeup.Application is not available)
(makeup 1.1.0) Makeup.Application.start(:normal, [])
(kernel 9.0.2) application_master.erl:293: :application_master.start_it_old/4

12:25:45.806 [notice] Application nimble_parsec exited: :stopped

12:25:45.806 [notice] Application earmark_parser exited: :stopped

12:25:45.806 [notice] Application eex exited: :stopped
** (MatchError) no match of right hand side value: {:error, {:makeup, {:bad_return, {{Makeup.Application, :start, [:normal, []]}, {:EXIT, {:undef, [{Makeup.Application, :start, [:normal, []], []}, {:application_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
(ex_doc 0.30.9) lib/mix/tasks/docs.ex:337: Mix.Tasks.Docs.run/3
(mix 1.15.7) lib/mix/task.ex:455: anonymous fn/3 in Mix.Task.run_task/5
(hex 2.0.6) lib/mix/tasks/hex.publish.ex:191: Mix.Tasks.Hex.Publish.docs_task/0
(hex 2.0.6) lib/mix/tasks/hex.publish.ex:146: Mix.Tasks.Hex.Publish.create/3
(mix 1.15.7) lib/mix/task.ex:455: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.15.7) lib/mix/cli.ex:92: Mix.CLI.run_task/2
/Users/*****/.asdf/installs/elixir/1.15.7/bin/mix:2: (file)

@josevalim
Copy link
Member

Can you please provide an application that reproduces the error? And can you provide your mix.exs?

@DesmondLouis
Copy link
Author

Hello @josevalim

defmodule DemoApp.MixProject do
  use Mix.Project

  def project do
    [
      app: :demo_app,
      version: "0.2.2",
      elixir: "~> 1.14",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      description: description(),
      package: package(),
      deps: deps(),
      name: "Firebase Elixir API Library",
      source_url: "https://github.com/xx/demo_app",
      docs: [
        main: "Demo Elixir API Library",
        #        logo: "",
        extras: ["README.md"]
      ]
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      extra_applications: [:logger],
      mod: {DemoApp.Application, []},
      applications: [:jose]
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:joken, "~> 2.6"},
      {:jose, "~> 1.11"},
      {:plug, "~> 1.15"},
      {:plug_cowboy, "~> 2.0"},
      {:ex_firebase_auth, "~> 0.5.1"},
      {:ex_doc, ">= 0.0.0", runtime: false},
      {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
      {:versioce, "~> 0.2.1"}
    ]
  end

  defp description() do
    "xx firebase authentication library."
  end

  defp package() do
    [
      # This option is only needed when you don't want to use the OTP application name
      name: "demo_app",
      organization: "xx",
      # These are the default files included in the package
      files: ~w(lib .formatter.exs mix.exs README*),
      licenses: ["Proprietary"],
      links: %{"GitHub" => "https://github.com/xx/demo_app"}
    ]
  end
end

@josevalim
Copy link
Member

Remove applications: [:jose]. This makes it so your dependencies do not start. :)

@DesmondLouis
Copy link
Author

@josevalim That doesn't seem to be the root cause of the issue. I have removed applications: [:jose] from my mix.exs file deleted the _build folder and compiled the project, but when i run mix docs I get the same error log

@josevalim
Copy link
Member

I see, so can you please provide an application that reproduces the error?

@DesmondLouis
Copy link
Author

actually for context I am building a library aimed at authenticate users with firebase tokens

@josevalim
Copy link
Member

If it is public, then I can take a look. Otherwise a mix.exs to reproduce it is necessary.

@DesmondLouis
Copy link
Author

It is a private remix of the mix.The example I sent earlier is the actual mix.examples of the project

@josevalim
Copy link
Member

The mix.exs file fails for me, but it works if I remove the line with applications: [:jose], which I suggested.

@DesmondLouis
Copy link
Author

I also removed the application. For further information, I am using a Mac Sillicon Is there any sort of correlation?

@josevalim
Copy link
Member

Me too, that should not make a difference here. :)

@DesmondLouis
Copy link
Author

@josevalim what else could be the cause of this then

@josevalim
Copy link
Member

It is hard for me to say if I cannot reproduce it. If you can push a way to reproduce to Github, then I can take a look. Removing applications: [:jose] work for me, so i would double check it was indeed removed from your project.

@DesmondLouis
Copy link
Author

I have even completely removed the jose dependency still have the same errors

defmodule ExFirebaseAuthPlug.MixProject do
  use Mix.Project

  def project do
    [
      app: :ex_firebase_auth_plug,
      version: "0.2.2",
      elixir: "~> 1.14",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      description: description(),
      package: package(),
      deps: deps(),
      name: "Ex Firebase Elixir API Library",
      source_url: "https://github.com/stagedates/ex_firebase_auth_plug",
      docs: [
        main: "Ex Firebase Elixir API Library",
        #        logo: "",
        extras: ["README.md"]
      ]
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      extra_applications: [:logger],
      mod: {ExFirebaseAuthPlug.Application, []},
      applications: []
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:joken, "~> 2.6"},
      # {:jose, "~> 1.11"},
      {:plug, "~> 1.15"},
      {:plug_cowboy, "~> 2.0"},
      {:ex_firebase_auth, "~> 0.5.1"},
      {:ex_doc, ">= 0.0.0", runtime: false},
      {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
      {:versioce, "~> 0.2.1"}
    ]
  end

  defp description() do
    "Stagedates firebase authentication library."
  end

  defp package() do
    [
      # This option is only needed when you don't want to use the OTP application name
      name: "ex_firebase_auth_plug",
      organization: "stagedates",
      # These are the default files included in the package
      files: ~w(lib .formatter.exs mix.exs README*),
      licenses: ["Proprietary"],
      links: %{"GitHub" => "https://github.com/stagedates/ex_firebase_auth_plug"}
    ]
  end
end


@josevalim
Copy link
Member

As I said above, you have to remove the whole line.

@josevalim
Copy link
Member

  def application do
    [
      extra_applications: [:logger],
      mod: {ExFirebaseAuthPlug.Application, []}
    ]
  end

joshnuss added a commit to joshnuss/xml_builder that referenced this issue Apr 23, 2024
evuez added a commit to evuez/geohax that referenced this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants