Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to find source location of the standard modules. #27

Closed
define-null opened this issue Nov 12, 2012 · 9 comments
Closed

Fail to find source location of the standard modules. #27

define-null opened this issue Nov 12, 2012 · 9 comments
Assignees

Comments

@define-null
Copy link

Faced with the problem trying to open source of the standard module "proplists" with "M-." command. The path of the src is supposed to be the one which is stored in beam. But on my pc erlang is not build from src, but is installed from the packages instead. And so the source code is located not in the place where edts is looking for.

Maybe it's better to look for src in otp dir if "otp-path" variable is set?

@tjarvstrand
Copy link
Collaborator

Good idea! I will add it to my todo. Hopefully I'll be able to get it done before the end of the week.

@define-null
Copy link
Author

Thank you for reply, just switched to edts from distel and it looks great!

@tjarvstrand
Copy link
Collaborator

Thanks, I appreciate it :)

@ghost ghost assigned tjarvstrand Nov 12, 2012
@tjarvstrand
Copy link
Collaborator

Still a WIP, but if you like you can try the branch better-otp-support. It should be mostly functional apart from a lack of testing ;)

@define-null
Copy link
Author

Tried new branch and faced with the problem with autocomplition (it's not working at all) and autorelocation of M-. for non standart modules. With standart modules it works quite well instead. =) Autotesting would help a lot, but right now have no idea how to do this.

@tjarvstrand
Copy link
Collaborator

Hm, I don't experience the same problems. I take it you did rebuilt the project and restarted your emacs? Also note that the latest commit was only about an hour ago :)

BTW, by 'standard' modules, do you mean standard library modules (as in otp)?

@define-null
Copy link
Author

Yes, I rebuilded the project and restarted emacs. By 'standard modules' I ment standard library modules which came with erlang)

Just saw your comment and tried to use it, of course it's better to wait a little bit for changes to be merged in master branch =)) What a pity don't know elisp well to figure out where is the problem.

@tjarvstrand
Copy link
Collaborator

Hehe. You can try M-x eval-expression RET (setq edts-log-level 3) and check the output in the message-buffer.

My guess though is that it fails somewhere in the erlang code. Probably because your setup looks different than mine somehow.

I recommend using eper's redbug (it's a good general tool for debugging erlang)
git clone git://github.com/massemanet/eper.git
cd eper
make

then add the following to ~/.erlang:
case code:where_is_file("redbug.beam") of
non_existing -> code:add_path("path/to/eper/repo/ebin");
_ -> ok
end.`

Restart your project-node and call eg. redbug:start("edts_code:get_function_info->return", [{msgs, 10000}, {time, 10000}]) in its erlang-shell buffer

try jumping and look at the output in the project-node shell

@tjarvstrand
Copy link
Collaborator

Found a small issue that may have caused your problems. Apart from that, I have asked 4 colleagues of mine to try out the branch and unfortunately none of us experience the errors you report.

If your problem isn't solved and you don't have the opportunity to debug would it be possible for you to post a detailed description of how to reproduce the error? preferably with your entire erlang setup (version, installation-method and any related .emacs configuration)

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

No branches or pull requests

2 participants