首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >rebar3无法获取和复制依赖项(LFE )

rebar3无法获取和复制依赖项(LFE )
EN

Stack Overflow用户
提问于 2019-12-22 15:14:00
回答 1查看 2K关注 0票数 1

几年后,我想回到Erlang/LFE的工作中去。我做了一个小工程来学习这门语言。我无法使用rebar3 get-deps命令获取依赖项。

它遵循rebar.config,也是可用的这里

代码语言:javascript
复制
{erl_opts, [debug_info, {src_dirs, ["test"]}]}.
{lfe_first_files, []}.
{deps_dir, ["deps"]}.
{eunit_compile_opts, [
   {src_dirs, ["test"]}
  ]}.
{deps, [
   {lfe, "0.9.0", {git, "git://github.com/rvirding/lfe.git", {tag, "v0.9.0"}}},
   {clj, ".*", {git, "git://github.com/lfex/clj.git"}},
   {lhc, ".*", {git, "git://github.com/lfex/lhc.git"}},
   {ljson, ".*", {git, "git@github.com:lfex/ljson.git", "master"}}, 
   {ltest, ".*", {git, "git://github.com/lfex/ltest.git", {tag, "0.4.1"}}}
  ]}.

我知道我引用了LFE的一个旧版本..。但是如果我删除所有的dep并再次添加它们:第一个失败的是clj。但是,在rebar.config处于原始状态时,我在rebar3 get-deps之后得到了以下输出。完全输出这里

代码语言:javascript
复制
===> Verifying dependencies...
===> Fetching clj (from {git,"git://github.com/lfex/clj.git"})
===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.
===> Fetching lfe-compile (from {git,"https://github.com/lfe-rebar3/compile.git",
                       {tag,"0.5.0"}})
===> Fetching lfe (from {git,"https://github.com/rvirding/lfe.git",
               {ref,"697e9b4996fa843f4c6a9edea25005d30a9b8a14"}})
===> Compiling lfe
...
===> Compiling ltest
 ~~>    Finding .lfe files ...
 ~~>    Compiling ./_build/default/plugins/ltest/src/ltest.lfe ...
 ~~>    Compiling ./_build/default/plugins/ltest/src/ltest-const.lfe ...
 ~~>    Compiling ./_build/default/plugins/ltest/src/ltest-formatter.lfe ...
 ~~>    Compiling ./_build/default/plugins/ltest/src/ltest-unit.lfe ...
 ~~>    Compiling ./_build/default/plugins/ltest/src/ltest-runner.lfe ...
===> Plugin {'lfe-test',{git,"https://github.com/lfe-rebar3/test.git",
                                    {tag,"0.4.0-rc2"}}} not available. It will not be used.
===> Fetching lfe-clean (from {git,"https://github.com/lfe-rebar3/clean.git",
                     {tag,"0.4.0-rc2"}})
===> Compiling lfe-clean
 ~~>    Finding .lfe files ...
 ~~>    Compiling ./_build/default/plugins/lfe-clean/src/lr3-cln-util.lfe ...
===> Plugin {'lfe-clean',{git,"https://github.com/lfe-rebar3/clean.git",
                                     {tag,"0.4.0-rc2"}}} not available. It will not be used.
===> Fetching ljson (from {git,"git@github.com:lfex/ljson.git","master"})
===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.
===> Failed to fetch and copy dep: {git,"git@github.com:lfex/ljson.git","master"}

我检查了一个相似问题文档,但是我仍然无法修复这个问题。

我的系统是macOS Catalina。它遵循Erlang环境版本:ERLANG 22.2.1、LFE 1.3、REBAR3 3.12.0。

全部安装有brew。如果需要更多的细节,请告诉我。

我真的很感谢你的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-12-27 14:21:58

我最终发现引用lfe/cljlfe/lhc是红色的,因为这些包是间接和正确地从其他包中隐式引用的。

我已经将它们从rebar.config中删除,更新为最新的语法,并在可能的情况下使用tag (否则是master)。我将所有URL转换为使用https://,而不是方案git://的SSH。

现在,我可以使用rebar3 get-deps获得依赖项,并使用rebar3 compile进行编译。

更新的rebar.config

代码语言:javascript
复制
{erl_opts, [debug_info, {src_dirs, ["test"]}]}.
{lfe_first_files, []}.
{deps_dir, ["deps"]}.
{eunit_compile_opts, [
   {src_dirs, ["test"]}
  ]}.
{deps, [
   {lfe, {git, "https://github.com/rvirding/lfe.git", {"tag", "v1.3"}}},
   {ljson, {git, "https://github.com/lfex/ljson.git", "master"}},
   {ltest, {git, "https://github.com/lfex/ltest.git", {tag, "0.9.0"}}}
  ]}.
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59445450

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档