<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Siri,<br>
      <br>
      Thanks for determining this.  I am not sure how the dependencies
      are used, it is possible syntax_tools wasn't being used where it
      is mentioned.  However, it really seems like this should be a bug
      simply due to the Erlang application startup.  I know the release
      (script/boot files) generated by this particular reltool file
      doesn't start these applications (with the problematic
      dependencies), but anything else that starts the applications
      would do so by the dependencies mentioned.  So, I don't see how
      this can't be a bug.  If xref determined that the dependencies
      were not called, it could remove the application dependencies from
      the .app file dependencies list, but having dependencies culled
      should be an option that you can turn off like it can be with
      modules selected with reltool.  I think culling the dependencies
      is a bit dangerous (especially by default) because it should be
      possible to have dependencies xref is unable to see (though I
      don't have a good example of this).<br>
      <br>
      Thanks,<br>
      Michael<br>
      <br>
      On 05/08/2014 08:20 AM, Siri Hansen wrote:<br>
    </div>
    <blockquote
cite="mid:CAGqERUFHDZRvqNTuLt-F1yx-NVRp3zwaWmjhBFi3RXSWpC=16w@mail.gmail.com"
      type="cite">Michael, it looks like reltool only follows the
      dependencies in the .app file (applications tag) for applications
      that are included in a release in the reltool config. For other
      applications that are mentioned in the config reltool only follows
      dependencies found with xref. I can not see that any of the
      applications that mention syntax_tools in their .app actually call
      any of the modules in this application from the erlang code. How
      is syntax_tools used?
      <div>
        <br>
      </div>
      <div>I'm not sure why reltool behaves this way, so I have to
        investigate a bit further to find out if it is a bug or not.</div>
      <div><br>
      </div>
      <div>Regards</div>
      <div>/siri<br>
        <div><br>
          torsdagen den 8:e maj 2014 skrev Siri Hansen <<a
            moz-do-not-send="true" href="mailto:erlangsiri@gmail.com">erlangsiri@gmail.com</a>>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">ok, thanks! I will try this and continue
              digging :)
              <div>/siri</div>
            </div>
            <div class="gmail_extra"><br>
              <br>
              <div class="gmail_quote">2014-05-08 10:41 GMT+02:00
                Michael Truog <span dir="ltr"><<a
                    moz-do-not-send="true"
                    href="javascript:_e(%7B%7D,'cvml','mjtruog@gmail.com');"
                    target="_blank">mjtruog@gmail.com</a>></span>:<br>
                <blockquote style="margin:0 0 0 .8ex;border-left:1px
                  #ccc solid;padding-left:1ex">
                  <div text="#000000" bgcolor="#FFFFFF">
                    <div>Hi Siri,<br>
                      <br>
                      I know the situation there is a bit unusual.  The
                      external CloudI dependencies are moved so that the
                      "cloudi_x_" prefix is added to all the external
                      Erlang application names, their modules, and their
                      header files.  The external dependency directory
                      names already have the "cloudi_x_" prefix to
                      satisfy include_lib usage within the modules (so
                      that means external CloudI dependencies that
                      depend on each other, in a way that uses a header
                      file with -include_lib).  This is all done with
                      the script at <a moz-do-not-send="true"
                        href="https://github.com/okeuday/reltool_util/blob/master/scope"
                        target="_blank">https://github.com/okeuday/reltool_util/blob/master/scope</a>
                      with the command line at <a
                        moz-do-not-send="true"
href="https://github.com/CloudI/CloudI/blob/develop/src/Makefile.am#L7-L66"
                        target="_blank">https://github.com/CloudI/CloudI/blob/develop/src/Makefile.am#L7-L66</a>
                      (i.e., atoms are selectively changed within the
                      source code, along with the files being moved). 
                      However, that process doesn't impact how the
                      external CloudI dependencies work.  The prefix is
                      added to simulate a namespace concept which
                      doesn't exist in Erlang to avoid any potential
                      conflicts when CloudI shares the Erlang VM with
                      other Erlang applications.<br>
                      <br>
                      That is unusual, but the reltool usage is the same
                      either way, its just an addition of a prefix for
                      referencing the names, as they are now.  The
                      compilation process makes sure the prefix is
                      added, so the external dependency files do change
                      to satisfy the compilation, testing and release
                      requirements.  While it would be natural to assume
                      this process is at fault for the reltool issue, I
                      am sure that is not the case.  You should be able
                      to see this if you do a "./configure &&
                      make" of the root src directory, since that will
                      make sure the files are as expected.<br>
                      <br>
                      Thanks,<br>
                      Michael
                      <div>
                        <div><br>
                          <br>
                          On 05/08/2014 01:05 AM, Siri Hansen wrote:<br>
                        </div>
                      </div>
                    </div>
                    <div>
                      <div>
                        <blockquote type="cite">
                          <div dir="ltr">Hi Michael!
                            <div><br>
                            </div>
                            <div>I haven't spent a lot of time on this
                              yet, but I was just trying to find the
                              chain of dependencies that lead to
                              syntax_tools, but I find it a bit hard I
                              would appreciate some help... </div>
                            <div><br>
                            </div>
                            <div>I found one way but it didn't really
                              make sense: </div>
                            <div><br>
                            </div>
                            <div>reltool.config includes application
                              'cloudi_service_db_cassandra', and in <a
                                moz-do-not-send="true"
                                href="http://cloudi_service_db_cassandra.app.src.in"
                                target="_blank">cloudi_service_db_cassandra.app.src.in</a>
                              you have
                              {applications,[...,cloudi_x_erlang_cassandra,...]}</div>
                            <div><br>
                            </div>
                            <div>Under the directory
                              external/cloudi_x_erlang_cassandra/src/ I
                              then find erlang_cassandra.app.src, which
                              indeed has
                              {applications,[...,syntax_tools,...]} -
                              but this is obviously an application named
                              'erlang_cassandra' and not
                              'cloudi_x_erlang_cassandra' as listed
                              above... so how does this work?</div>
                            <div><br>
                            </div>
                            <div>Regards</div>
                            <div>/siri</div>
                          </div>
                          <div><br>
                            <br>
                            <div>2014-05-01 19:42 GMT+02:00 Michael
                              Truog <span dir="ltr"><<a
                                  moz-do-not-send="true">mjtruog@gmail.com</a>></span>:<br>
                              <blockquote style="margin:0 0 0
                                .8ex;border-left:1px #ccc
                                solid;padding-left:1ex">Hi,<br>
                                <br>
                                I believe I found a bug that causes
                                reltool to ignore dependencies when
                                generating a release.  I am not sure
                                where the problem is within reltool, but
                                I at least have a way to demonstrate it.
                                <a moz-do-not-send="true"
href="https://github.com/CloudI/CloudI/blob/develop/src/reltool.config.in#L78-L89"
                                  target="_blank">https://github.com/CloudI/CloudI/blob/develop/src/reltool.config.in#L78-L89</a>
                                shows lines that are unnecessary within
                                the reltool.config file. The
                                dependencies mentioned there should be
                                found automatically by reltool.  If you
                                remove those lines and do a make install
                                (after the autogen.sh and configure
                                steps) you will see the dependencies
                                mentioned in these lines are not there.<br>
                                <br>
                                Thanks,<br>
                                Michael<br>
_______________________________________________<br>
                                erlang-bugs mailing list<br>
                              </blockquote>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>