1

I am about to release 0.2.0 of my myhtmlex library. 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

The steps to reproduce this are:

  1. Build the hex package mix hex.build
  2. Unpack the resulting tar-archive
  3. Create a new test-application depending on that hex package with {:myhtmlex, path: "../local-tar-archive"}
  4. Build the test-application mix compile but it fails with:

    ==> 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

Overbryd
  • 4,612
  • 2
  • 33
  • 33
  • 1
    The branch no longer exists. Could it be a timestamp issue? Mix is thinking that the project is already compiled and it is trying to read the .app file, which is not there. – José Valim Feb 26 '18 at 11:01
  • 1
    Also, is there any reason why you are not using elixir_make for handling the makefile bits? – José Valim Feb 26 '18 at 11:02
  • 1
    I could nail down a "bug" or timestamp issue, that was resolved here: https://github.com/hexpm/hex/issues/515 – Overbryd Feb 27 '18 at 11:19
  • 1
    `elixir_make` sounds great :) Thank you José for pointing that out. – Overbryd Feb 27 '18 at 11:22

1 Answers1

2

Starting with hex >= 0.17.3 and using mix hex.build --unpack -o package-test directly solved this for me.

If you want to read up on the details of this, the issue was resolved here: https://github.com/hexpm/hex/issues/515

Overbryd
  • 4,612
  • 2
  • 33
  • 33