lfe-rebar3 / repl

rebar3 Plugin for the LFE REPL
Other
1 stars 5 forks source link

Only plugin libs are getting added to the path #4

Closed oubiwann closed 8 years ago

oubiwann commented 8 years ago

The dependency libs aren't getting added. For ltool, this means the following are not accessible in the REPL:

$ ls -l _build/default/lib/
drwxr-xr-x  14 oubiwann  wheel  476 Nov 21 22:00 clj
drwxr-xr-x  12 oubiwann  wheel  408 Nov 21 22:00 color
drwxr-xr-x  13 oubiwann  wheel  442 Nov 21 22:00 kla
drwxr-xr-x  26 oubiwann  wheel  884 Nov 21 22:00 lfe
drwxr-xr-x  15 oubiwann  wheel  510 Nov 21 22:00 ltest
drwxr-xr-x   6 oubiwann  staff  204 Nov 21 22:00 ltool
drwxr-xr-x  14 oubiwann  wheel  476 Nov 21 22:00 lutil

This can be seen by examining the paths:

> (lists:foreach (lambda (x) (io:format "~p~n" `(,x))) (code:get_path))
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/lfe-clean/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/clj/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/lfe/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/kla/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/lfe-compile/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/lfe-repl/ebin"
"/Users/oubiwann/lab/lfe/rebar3/ltool/_build/default/plugins/lfe-version/ebin"
"/usr/local/bin/rebar3/ssl_verify_hostname/ebin"
"/usr/local/bin/rebar3/relx/ebin"
"/usr/local/bin/rebar3/rebar/ebin"
"/usr/local/bin/rebar3/providers/ebin"
"/usr/local/bin/rebar3/getopt/ebin"
"/usr/local/bin/rebar3/eunit_formatters/ebin"
"/usr/local/bin/rebar3/erlware_commons/ebin"
"/usr/local/bin/rebar3/cth_readable/ebin"
"/usr/local/bin/rebar3/cf/ebin"
"/usr/local/bin/rebar3/certifi/ebin"
"/usr/local/bin/rebar3/bbmustache/ebin"
"/usr/local/bin/rebar3"
"."
"/opt/erlang/18.0/lib/kernel-4.0/ebin"
"/opt/erlang/18.0/lib/stdlib-2.5/ebin"
"/opt/erlang/18.0/lib/xmerl-1.3.8/ebin"
"/opt/erlang/18.0/lib/wx-1.4/ebin"
"/opt/erlang/18.0/lib/webtool-0.9/ebin"
"/opt/erlang/18.0/lib/typer-0.9.9/ebin"
"/opt/erlang/18.0/lib/tools-2.8/ebin"
"/opt/erlang/18.0/lib/test_server-3.9/ebin"
"/opt/erlang/18.0/lib/syntax_tools-1.7/ebin"
"/opt/erlang/18.0/lib/ssl-7.0/ebin"
"/opt/erlang/18.0/lib/ssh-4.0/ebin"
"/opt/erlang/18.0/lib/snmp-5.2/ebin"
"/opt/erlang/18.0/lib/sasl-2.5/ebin"
"/opt/erlang/18.0/lib/runtime_tools-1.9/ebin"
"/opt/erlang/18.0/lib/reltool-0.7/ebin"
"/opt/erlang/18.0/lib/public_key-1.0/ebin"
"/opt/erlang/18.0/lib/percept-0.8.11/ebin"
"/opt/erlang/18.0/lib/parsetools-2.1/ebin"
"/opt/erlang/18.0/lib/otp_mibs-1.1/ebin"
"/opt/erlang/18.0/lib/ose-1.1/ebin"
"/opt/erlang/18.0/lib/os_mon-2.4/ebin"
"/opt/erlang/18.0/lib/orber-3.8/ebin"
"/opt/erlang/18.0/lib/observer-2.1/ebin"
"/opt/erlang/18.0/lib/mnesia-4.13/ebin"
"/opt/erlang/18.0/lib/megaco-3.18/ebin"
"/opt/erlang/18.0/lib/jinterface-1.6/ebin"
"/opt/erlang/18.0/lib/inets-6.0/ebin"
"/opt/erlang/18.0/lib/ic-4.4/ebin"
"/opt/erlang/18.0/lib/hipe-3.12/ebin"
"/opt/erlang/18.0/lib/gs-1.6/ebin"
"/opt/erlang/18.0/lib/eunit-2.2.10/ebin"
"/opt/erlang/18.0/lib/et-1.5.1/ebin"
"/opt/erlang/18.0/lib/erts-7.0/ebin"
"/opt/erlang/18.0/lib/erl_interface-3.8/ebin"
"/opt/erlang/18.0/lib/erl_docgen-0.4/ebin"
"/opt/erlang/18.0/lib/eldap-1.2/ebin"
"/opt/erlang/18.0/lib/edoc-0.7.17/ebin"
"/opt/erlang/18.0/lib/diameter-1.10/ebin"
"/opt/erlang/18.0/lib/dialyzer-2.8/ebin"
"/opt/erlang/18.0/lib/debugger-4.1/ebin"
"/opt/erlang/18.0/lib/crypto-3.6/ebin"
"/opt/erlang/18.0/lib/cosTransactions-1.3/ebin"
"/opt/erlang/18.0/lib/cosTime-1.2/ebin"
"/opt/erlang/18.0/lib/cosProperty-1.2/ebin"
"/opt/erlang/18.0/lib/cosNotification-1.2/ebin"
"/opt/erlang/18.0/lib/cosFileTransfer-1.2/ebin"
"/opt/erlang/18.0/lib/cosEventDomain-1.2/ebin"
"/opt/erlang/18.0/lib/cosEvent-2.2/ebin"
"/opt/erlang/18.0/lib/compiler-6.0/ebin"
"/opt/erlang/18.0/lib/common_test-1.11/ebin"
"/opt/erlang/18.0/lib/asn1-4.0/ebin"
ok
oubiwann commented 8 years ago

Okay, I think I got this. There was a bunch of stuff wrong with the lfe-repl plugin, but it seems like the key thing was setting the deps to include compile, since the compile plugin sets up the paths. Will test some more -- it this works out, I'll close the ticket.

oubiwann commented 8 years ago

Yup, this is working now. I also manually added the top-level project ebin dir to the path.