'철근 생성'은 생성 된 릴리스의 일부 종속성을 포함하지 않습니다.

StackOverflow https://stackoverflow.com/questions/9433316

  •  12-11-2019
  •  | 
  •  

문제

Rebar를 사용하여 작업하고있는 Erlang 응용 프로그램의 릴리스를 릴리스하는 데 이상적인 문제가 있습니다.본질적으로 시스템에 설치된 Erlang Thrift Client를 찾을 수 없습니다.erlang 프롬프트에서 중고 응용 프로그램을로드 하여이 문제를 확인할 수 있습니다.

$ erl
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]

Eshell V5.8.5  (abort with ^G)
1> application:load(thrift).
ok
2> application:loaded_applications().
[{kernel,"ERTS  CXC 138 10","2.14.5"},
 {thrift,"Thrift bindings","0.9.0-dev"},
 {stdlib,"ERTS  CXC 138 10","1.17.5"}]
3> 
.

그러나 '철근 생성'을 실행하려고 시도하면 내 응용 프로그램의 릴리스를 빌드하면 실패합니다.

$ rebar generate
==> rel (generate)
{"init terminating in do_boot","Release fern uses non existing application thrift"}

Crash dump was written to: erl_crash.dump
init terminating in do_boot (Release fern uses non existing application thrift)
.

여기에 내 응용 프로그램 파일, fern.app.src :

{application, fern, [
  {description, "elided"},
  {vsn, "0.5.0"},
  {modules, [
    fern_app,
    fern_sup,
    accounts_repository,
    fern_http_request,
    fern_system_api,
    metadata_fetcher,
    metadata_process,
    repository,
    repository_server,
    timestamps_repository,
    hbase_thrift,
    hbase_types,
    utils
  ]},
  {registered, [
    fern_sup
  ]},
  {applications, [
    kernel,
    stdlib,
    inets,
    ssl 
  ]},
  {mod, { fern_app, []}},
  {env, []},
  {agner, [
    {requires, ["jiffy", "meck", "mochiweb"]}
  ]}
]}.
.

... 및 내 Reltool.config :

{sys, [
       {lib_dirs, ["../apps", "../deps"]},
       {erts, [{mod_cond, derived}, {app_file, strip}]},
       {app_file, strip},
       {rel, "fern", "1",
        [
         kernel,
         stdlib,
         sasl,
         ssl,
         inets,
         thrift,
         fern
        ]},
       {rel, "start_clean", "",
        [
         kernel,
         stdlib
        ]},
       {boot_rel, "fern"},
       {profile, embedded},
       {incl_cond, exclude},
       {excl_archive_filters, [".*"]}, %% Do not archive built libs
       {excl_sys_filters, ["^bin/.*", "^erts.*/doc", "^erts.*/src",
                           "^erts.*/info", "^erts.*/man",
                           "^erts.*/lib", "^erts.*/include",
                           "^erts.*/bin/(dialyzer|typer)"]},
       {excl_app_filters, ["\.gitignore"]},
       {app, sasl,   [{incl_cond, include}]},
       {app, stdlib, [{incl_cond, include}]},
       {app, kernel, [{incl_cond, include}]},
       {app, inets,  [{incl_cond, include}]},
       {app, crypto, [{incl_cond, include}]},
       {app, public_key, [{incl_cond, include}]},
       {app, ssl,    [{incl_cond, include}]},
       {app, thrift, [{incl_cond, include}]},
       {app, fern, [{incl_cond, include}]}
      ]}.

{target_dir, "fern"}.

{overlay, [
           {mkdir, "log/sasl"},
           {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
           {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
           {copy, "files/fern", "bin/fern"},
           {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"},
           {copy, "files/fern.cmd", "bin/fern.cmd"},
           {copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
           {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"}
          ]}.
.

두 번째로 응용 프로그램 목록에서 thrift를 제거하면 릴리스가 생성되지만 중고 라이브러리를 포함하지 않으므로 런타임에 실패합니다.누구든지 여기서 뭘 잘못하고 있는지에 대한 지침을 제공 할 수 있습니까?

많은 감사,

TIM

도움이 되었습니까?

해결책

이 일을 가로 지르는 다른 사람을 위해서 - 나는 결국 문제를 해결했습니다.어떤 이유로, 철근은 'Thrift'응용 프로그램을 릴리스 내부에서 'Thrift-0.9.0-dev'로 변경합니다.위의 구성에서 Atom 'Thrift'의 모든 인스턴스를 'Thrift-0.9.0-dev'로 변경합니다 (참고 이것은 문자열 사용이 아닌 원자입니다).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top