【问题标题】:Confused about compile_path in elixir's mix.exs对 elixir 的 mix.exs 中的 compile_path 感到困惑
【发布时间】:2014-02-03 19:12:58
【问题描述】:

我对 mix.exs 中的 compile_path 设置感到困惑。使用如下设置:

defmodule MyProject.Mixfile do
use Mix.Project

def project do
[ app: :my_project,
  version: "0.0.1",
  elixir: "~> 0.12.0",
  deps: deps,
  escript_main_module: MyProject,
  compile_path: "ebing/ew/ebin"]
end

# Configuration for the OTP application
def application do
  []
end

# Returns the list of dependencies in the format:
# { :foobar, git: "https://github.com/elixir-lang/foobar.git", tag: "0.1" }
#
# To specify particular versions, regardless of the tag, do:
# { :barbat, "~> 0.1", github: "elixir-lang/barbat" }
defp deps do
  []
end
end

使用 compile_path 并在运行 mix compile 之后,我仍然找不到目录 ebing/we/ebin。我也尝试先创建目录,但它仍然是空的。我还尝试了mix compile --force,它仍然构建在默认目录中。

有人可以帮助理解compile_path 设置吗?

【问题讨论】:

    标签: elixir


    【解决方案1】:

    不再支持:compile_path 选项。 Mix 将始终编译为 _build

    【讨论】:

    • 不推荐使用它有什么原因吗?我想要/需要能够指定在哪里构建。
    猜你喜欢
    • 1970-01-01
    • 2019-09-13
    • 2012-07-22
    • 2013-05-13
    • 2020-04-16
    • 2023-03-08
    • 2019-08-04
    • 2019-12-30
    • 2022-01-20
    相关资源
    最近更新 更多