Add completion support for dependencies #15

Closed
aberman opened this Issue Apr 26, 2012 · 11 comments

2 participants

@aberman

Right now, the dependencies in the directory specified by the lib_dirs are not factored into the code completion. It would be great to add support for dependencies.

@ostinelli
Owner

they should be, see #12

have you tried latest version?

r.

@ostinelli ostinelli closed this Apr 26, 2012
@ostinelli ostinelli reopened this Apr 26, 2012
@aberman

I have the latest version and it's definitely not working. I have the lib_dirs set to deps in my rebar.config file and none of those dependencies are showing up in the autocomplete.

@ostinelli
Owner

rebar.config's contents are ignored. every .beam file under the project root get parsed.

if you'd like me to fix the issue you are experiencing, please put together some code that i can download to reproduce this error, and state the exact steps needed to do so.

thank you,

r.

@ostinelli
Owner

this project works perfectly with sublimerl:
https://github.com/esl/ejabberd

so for example if you open the file ejabberd/apps/ejabberd/src/ejabberd.erl, when you can type code in it you'll see that the autocomplete suggestions will include the module cuesport.erl which is located into /ejabberd/deps/cuesport/src/ (a dependency).

can you tell me which differences there are in comparison to yours?

@aberman

Here you go: https://github.com/aberman/sublimerl_test

  1. Run rebar get-deps
  2. Run rebar compile
  3. Start Sublime
  4. Open sublimerl_test.erl
  5. Try typing jiffy or jiffy: and nothing shows up for completion.
@ostinelli
Owner

working on it, should probably have a solution within days.

@ostinelli
Owner

Hi @aberman, can you check if 09788fa fixes it?

thanks,

r.

@aberman

Hey @ostinelli, it's still not working.

@ostinelli
Owner

it is working here, using your code, following your instructions.

Jiffy screenshot

unfortunately, unless we can identify what is not running for you, i don't have anything to try (since it's working).

  • do you have the compiled .beam files in deps/jiffy/ebin and deps/proper/ebin (which come after the manual step you've defined here above rebar get-deps)?
  • do you have the compiled project files in ebin? (if not, please try 59d98e6 which fixes an issue with rebar needing to know where git is)
  • what is the content of the Current-Project.disasm and Current-Project.completions files in the plugin's directory? (try deleting them and reopening Sublime Text)

the completions are built when a file gets 'activated' in the project window. try clicking on another tab then back to the project's file (i.e. sublimerl_test.erl)

otherwise please explain in a very detailed way what you are doing (i.e. which file you open up and so) so that i can try to reproduce, or shoot a brief video ^^_

r.

@ostinelli ostinelli referenced this issue Apr 30, 2012
Closed

Project dir #12

@aberman

I nuked my SublimErl installation and redownloaded it and made sure all Erlang processes were killed and it appears to be working now. Awesome stuff, Roberto!

@aberman aberman closed this Apr 30, 2012
@ostinelli
Owner

thank you @aberman :)

r.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment