我已经使用 reabr3 创建了一个应用程序来练习 RabbitMQ,但是 rebar3 无法将我在src
文件夹中创建的附加文件加载到 erlang shell。
我用过rebar3 new app rabbit
。我有一个在目录中rabbit_app.erl rabbit_sup.erl and rabbit.app.src
命名的新定义文件。我运行编译并获取依赖项。hello_world.erl
src/
rebar3 compile
然后跑到rebar3 shell
能够测试hello_world.erl
. hello_world.beam
无法加载,所以我必须在 erlang shell 中手动c(hello_world)
使用。这有点不方便。
任何帮助将不胜感激。这是 和 的控制台rebar3 compile
输出rebar3 shell
。
$ rebar3 compile
===> Verifying dependencies...
===> Fetching amqp_client v3.8.14
===> Fetching rabbit_common v3.8.7
===> Fetching credentials_obfuscation v2.2.0
===> Fetching jsx v2.11.0
===> Fetching lager v3.8.0
===> Fetching ranch v1.7.1
===> Fetching recon v2.5.1
===> Fetching goldrush v0.1.9
===> Analyzing applications...
===> Compiling credentials_obfuscation
===> Compiling goldrush
===> Compiling jsx
===> Compiling lager
===> Compiling ranch
===> Compiling recon
===> Compiling rabbit_common
===> Compiling amqp_client
===> Analyzing applications...
===> Compiling rabbit
$ rebar3 shell
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling rabbit
Erlang/OTP 22 [erts-10.7.2.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe]
Eshell V10.7.2.1 (abort with ^G)
1> ===> Booted xmerl
===> Booted compiler
===> Booted sasl
===> Booted syntax_tools
===> Booted tools
===> Booted goldrush
===> Booted lager
===> Booted jsx
===> Booted ranch
===> Booted recon
===> Booted credentials_obfuscation
===> Booted rabbit_common
===> Booted amqp_client
===> Booted rabbit
[更新] 我发现新添加的文件已加载,但这些文件的自动完成功能不起作用。我必须第一次使用整个命令。