简体   繁体   English

Elixir依赖关系不会生成应用程序文件

[英]Elixir dependency does not generate app file

I am about to release 0.2.0 of my myhtmlex library. 我即将发布myhtmlex库的0.2.0 But I am having trouble testing my new package release, as the test application does not generate an app file. 但是我在测试新的程序包版本时遇到了麻烦,因为测试应用程序不会生成应用程序文件。

And to test my integration, I wrote a script to test my hex releases in test-applications. 为了测试集成,我编写了一个脚本来测试测试应用程序中的十六进制版本。

You can check the source here: https://github.com/Overbryd/myhtmlex/tree/package-test 您可以在此处查看源代码: https : //github.com/Overbryd/myhtmlex/tree/package-test

The steps to reproduce this are: 重现此步骤是:

  1. Build the hex package mix hex.build 构建十六进制包mix hex.build
  2. Unpack the resulting tar-archive 解压生成的tar归档文件
  3. Create a new test-application depending on that hex package with {:myhtmlex, path: "../local-tar-archive"} 使用{:myhtmlex, path: "../local-tar-archive"}根据该十六进制包创建一个新的测试应用程序
  4. Build the test-application mix compile but it fails with: 构建测试应用程序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 

Cross-post from: https://elixirforum.com/t/dependency-does-not-generate-app-file/12703 交叉发布自: https : //elixirforum.com/t/dependency-does-not-generate-app-file/12703

Starting with hex >= 0.17.3 and using mix hex.build --unpack -o package-test directly solved this for me. hex >= 0.17.3并使用mix hex.build --unpack -o package-test直接为我解决了这个问题。

If you want to read up on the details of this, the issue was resolved here: https://github.com/hexpm/hex/issues/515 如果您想阅读有关此内容的详细信息,请在此处解决问题: https : //github.com/hexpm/hex/issues/515

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM