【问题标题】:Elixir dependency does not generate app fileElixir 依赖不生成应用文件
【发布时间】:2018-08-03 13:16:47
【问题描述】:

我即将发布我的 myhtmlex 库的0.2.0。 但是我在测试我的新软件包版本时遇到了问题,因为测试应用程序不会生成应用程序文件。

为了测试我的集成,我编写了一个脚本来测试我在测试应用程序中的十六进制版本。

您可以在这里查看来源:https://github.com/Overbryd/myhtmlex/tree/package-test

重现此的步骤是:

  1. 构建十六进制包mix hex.build
  2. 解压生成的 tar 存档
  3. 根据带有{:myhtmlex, path: "../local-tar-archive"} 的十六进制包创建一个新的测试应用程序
  4. 构建测试应用程序mix compile,但失败:

    ==> myhtmlex
    Compiling 3 files (.ex)
    ==> myhtmlex_pkg_test
    Unchecked dependencies for environment dev:
    * myhtmlex (../myhtmlex-local)
      could not find an app file at "_build/dev/lib/myhtmlex/ebin/myhtmlex.app". This may happen if the dependency was not yet compiled, or you specified the wrong application name in your deps, or the dependency indeed has no app file (then you can pass app: false as option)
    ** (Mix) Can't continue due to errors on dependencies
    

发帖人:https://elixirforum.com/t/dependency-does-not-generate-app-file/12703

【问题讨论】:

  • 该分支不再存在。会不会是时间戳问题? Mix 认为项目已经编译,它正在尝试读取不存在的 .app 文件。
  • 另外,你有什么理由不使用 elixir_make 来处理 makefile 位?
  • 我可以确定一个“错误”或时间戳问题,已在此处解决:github.com/hexpm/hex/issues/515
  • elixir_make 听起来很棒 :) 感谢 José 指出这一点。

标签: elixir elixir-mix hex-pm


【解决方案1】:

hex >= 0.17.3 开始并使用mix hex.build --unpack -o package-test 直接为我解决了这个问题。

如果您想了解详细信息,问题已在此处解决:https://github.com/hexpm/hex/issues/515

【讨论】:

    猜你喜欢
    • 2012-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-10
    相关资源
    最近更新 更多