首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在运行mix coveralls时会出现编译错误

为什么在运行mix coveralls时会出现编译错误
EN

Stack Overflow用户
提问于 2019-04-25 16:14:00
回答 1查看 474关注 0票数 1

当我尝试运行任务组合套装时,我得到了这个错误。

代码语言:javascript
复制
** (exit) an exception was raised:
    ** (MatchError) no match of right hand side value: :error
        cover.erl:1580: :cover.do_compile_beam2/5
        cover.erl:1480: :cover.do_compile_beam/3
        (stdlib) lists.erl:1239: :lists.map/2
        cover.erl:2795: anonymous fn/2 in :cover.pmap_spawn/4
    cover.erl:585: :cover.call/1
    lib/excoveralls/cover.ex:12: ExCoveralls.Cover.compile/1
    lib/excoveralls.ex:32: ExCoveralls.start/2
    (mix) lib/mix/tasks/test.ex:351: Mix.Tasks.Test.run/1
    (mix) lib/mix/task.ex:331: Mix.Task.run_task/3
    (mix) lib/mix/task.ex:365: Mix.Task.run_alias/3
    (mix) lib/mix/task.ex:292: Mix.Task.run/2
    lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2

10:03:50.512 [error] Process #PID<0.4329.0> raised an exception
** (MatchError) no match of right hand side value: :error
    cover.erl:1580: :cover.do_compile_beam2/5
    cover.erl:1480: :cover.do_compile_beam/3
    (stdlib) lists.erl:1239: :lists.map/2
    cover.erl:2795: anonymous fn/2 in :cover.pmap_spawn/4

我的3+应用程序对套装使用了相同的设置,并且在所有这些应用程序中都可以正常工作。其中唯一的区别是我没有HTML,因为它只是rest api,但即使我尝试删除coveralls html任务,它也不起作用。这似乎与在erlang :cover中编译有关,但我尝试进行调试,它指向正确的目录。

这是我的Mix文件:

代码语言:javascript
复制
defmodule Tow.MixProject do
  use Mix.Project

  def project do
    [
      app: :tow,
      version: "0.1.0",
      elixir: "~> 1.8",
      compilers: [:phoenix] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      test_coverage: [tool: ExCoveralls],
      preferred_cli_env: [
        coveralls: :test,
        "coveralls.detail": :test,
        "coveralls.post": :test,
        "coveralls.html": :test
      ],
      elixirc_paths: elixirc_paths(Mix.env()),
      deps: deps(),
      aliases: aliases()
    ]
  end

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

  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  defp deps do
    [
      {:phoenix, "~> 1.4"},
      {:flow, "~> 0.14"},
      {:timex, "~> 3.1"},
      {:math, "~> 0.3.0"},
      {:plug_cowboy, "~> 2.0"},
      {:poison, "~> 3.1"},
      {:ecto_sql, "~> 3.0"},
      {:mariaex, "~> 0.8"},
      {:statistics, "~> 0.5.0"},
      {:elixir_uuid, "~> 1.2"},
      {:ex_aws, "~> 2.1"},
      {:ex_aws_s3, "~> 2.0"},
      {:config_tuples, "~> 0.2.0"},
      # dev / test
      {:benchee, "~> 1.0", only: :dev},
      {:phoenix_live_reload, "~> 1.0", only: :dev},
      {:ex_machina, "~> 2.2.2", only: :test},
      {:faker, "~> 0.10", only: :test},
      {:excoveralls, "~> 0.10", only: :test}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      "ecto.setup": ["ecto.create", "ecto.load", "ecto.migrate"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate", "test"]
    ]
  end
end
EN

回答 1

Stack Overflow用户

发布于 2019-04-25 19:55:41

问题出在erlang封面库上,我的一个模块中有一个TypeSpec,由于某种原因无法编译。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55844715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档