Erlang rebar3无法获取和复制依赖项(LFE项目)
几年后,我想回到Erlang/LFE的工作岗位。我为学习这门语言做了很多努力。我无法使用Erlang rebar3无法获取和复制依赖项(LFE项目),erlang,rebar3,lfe,Erlang,Rebar3,Lfe,几年后,我想回到Erlang/LFE的工作岗位。我为学习这门语言做了很多努力。我无法使用rebar3 get deps命令获取依赖项 它遵循钢筋.config,也可用 我知道我引用了一个旧版本的LFE。。。但是,如果我删除所有dep并再次尝试添加它们:第一个失败的是clj。然而,当rebar.config处于其原始状态时,我在rebar3 get deps之后获得了以下输出。完成输出 我检查了a和,但仍然无法解决问题 我的系统是macOSCatalina。它遵循的是Erlang环境版本: ERL
rebar3 get deps
命令获取依赖项
它遵循钢筋.config,也可用
我知道我引用了一个旧版本的LFE。。。但是,如果我删除所有dep并再次尝试添加它们:第一个失败的是clj
。然而,当rebar.config
处于其原始状态时,我在rebar3 get deps
之后获得了以下输出。完成输出
我检查了a和,但仍然无法解决问题
我的系统是macOSCatalina。它遵循的是Erlang环境版本:
ERLANG22.2.1,LFE1.3,REBAR33.12.0
所有设备均安装有brew
。如果需要更多细节,请告诉我
我非常感谢您的帮助。我终于发现引用
lfe/clj
和lfe/lhc
是多余的,因为这些包是以隐式方式从其他包间接正确引用的
我已经从rebar.config中删除了这些内容,更新到最新语法,并在可能的情况下使用tag
(否则master
)。我将所有URL切换为使用https://
而不是带有schemegit://
的SSH
现在我可以使用rebar3 get deps
获取依赖项,并使用rebar3 compile
进行编译
更新的钢筋.config:
{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"}}}
]}.
我敢肯定,这是由于您到处使用未标记的
master
git源而导致的问题。首先,我将逐个显式地将所有版本设置为last值<代码>钢筋不是魔术师,帮帮它。@AlekseiMatiushkin谢谢你的建议,但我已经试过了。。。不管怎样,我又试了一次,没有成功。我已经删除了master
和其他tag
s。但是rebar3
仍然抱怨ljson
:无法获取和复制…
。还尝试了rebar3清洁
。还有别的我可以试试吗?
===> 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"}
{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"}}}
]}.