Git Product home page Git Product logo

Comments (11)

nivertech avatar nivertech commented on July 19, 2024

In case of node_package app, it does have a ebin/node_package.app file, which specifies empty modules list.
So it implicitly indicates thata there are no .beam files to look for.

{application,node_package,
             [{description,"RPM/Debian/Solaris packaging templates for Erlang Nodes"},
              {vsn,"1.2.1"},
              {modules,[]},
              {registered,[]},
              {applications,[]}]}.

from relx.

nivertech avatar nivertech commented on July 19, 2024

Adding dummy beam file solves this problem. This is just a workaround - not perfect.

$ cd deps/node_package/ebin/
[ebin ((1.2.1))]$ touch dummy.beam
[ebin ((1.2.1))]$ cd ../../..
$ ./relx
Starting relx build process ...
Resolving OTP Applications from directories:
    /home/me/ws/myproject/lib
    /home/me/ws/myproject/deps
    /usr/local/lib/erlang/lib

Resolving available releases from directories:
    /home/me/ws/myproject/lib
    /home/me/ws/myproject/deps
    /usr/local/lib/erlang/lib

Resolved myproject-0.0.1
release successfully created!
$

from relx.

tsloughter avatar tsloughter commented on July 19, 2024

Hmm, this will actually conflict with a problem someone had where they wanted it to skip "apps" that didn't have beam files. But I am blanking though, @ericbmerritt do you remember? And relcool repo issues are gone.

Maybe that was why we added the skip_apps option... You can add these which have no beam files to your relx.config file under {skip_apps, []}.

from relx.

tsloughter avatar tsloughter commented on July 19, 2024

Ah, I remember a little more now, we don't want to skip apps with no beam files because that should mean the app is not compiled and something went wrong. So we added skip_apps.

from relx.

ericbmerritt avatar ericbmerritt commented on July 19, 2024

Actually #7 should solve this problem. We just need to finish it up, the original submitter never came back.

from relx.

nivertech avatar nivertech commented on July 19, 2024

skip_apps doesn't work for me - using relx master

My relx.config file:

{
    release, {myapp, "0.0.1"},
    [myapp]
}.

{sys_config, "./bin/sys.config"}.

% skip OTP apps without .beam files
{skip_apps, [node_package]}.

Fails on:

$ ./relx 
Starting relx build process ...
Resolving OTP Applications from directories:
    /home/me/ws/myapp/lib
    /home/me/ws/myapp/deps
    /usr/local/lib/erlang/lib

no beam files found in directory /home/me/ws/myapp/deps/node_package/ebin

Usage: relx [-n <relname>] [-v <relvsn>] [-g <goal>] [-u <upfrom>]
            [-o <output_dir>] [-l <lib_dir>]
            [--disable-default-libs [<disable_default_libs>]]
            [-V [<log_level>]] [-a <override_app>] [-c [<config>]]
            [-r <root_dir>] [*release-specification-file*]

  -n, --relname           Specify the name for the release that will be 
                          generated
  -v, --relvsn            Specify the version for the release
  -g, --goal              Specify a target constraint on the system. These 
                          are usually the OTP
  -u, --upfrom            Only valid with relup target, specify the 
                          release to upgrade from
  -o, --output-dir        The output directory for the release. This is 
                          `./` by default.
  -l, --lib-dir           Additional dirs that should be searched for OTP 
                          Apps
  --disable-default-libs  Disable the default system added lib dirs (means 
                          you must add them all manually [default: false]
  -V, --verbose           Verbosity level, maybe between 0 and 2 [default: 
                          1]
  -a, --override_app      Provide an app name and a directory to override 
                          in the form <appname>:<app directory>
  -c, --config            The path to a config file [default: ]
  -r, --root              The project root directory

$

from relx.

tsloughter avatar tsloughter commented on July 19, 2024

Hm, that's no good. I'll look into this. As well as I'll try to get #7 done so skip_apps isn't needed either.

from relx.

tsloughter avatar tsloughter commented on July 19, 2024

@nivertech can you give master a try? We just merged a fix in #42

from relx.

nivertech avatar nivertech commented on July 19, 2024

It works now, even without {skip_apps, [...]}.
Is this OK?

from relx.

jwilberding avatar jwilberding commented on July 19, 2024

@nivertech I believe that is supposed to be the correct behavior.

from relx.

tsloughter avatar tsloughter commented on July 19, 2024

Oops, replied in the wrong place. '@nivertech Yup, now it checks that it has a beam file for all modules listed in the applications .app file. So if there are none listed it is still considered valid if there are no beam files.'

from relx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.