ExDef tag not found #54
Comments
Hmm It might be because the Can you try to run That's known issue(not an issue really) because auto complete uses alchemist-server and if there is no beam file for |
It still doesn't work after mix compile. I was running it with mix On Wednesday, August 24, 2016, Milad notifications@github.com wrote:
|
you can enable
then you can run alchemist client directly and execute the command directly:
If it didn't return the file name, check
After running alchemist server, it's waiting for a command to be entered in STDIN . Past the Let me know if you get file path back from |
That is indeed strange. Both of them works for me:
Is it possible for you to do more debugging in |
So am I. I also cannot jumping with |
I followed the steps, and found out that at least Notice: I replaced the module name in the following snippets with $ elixir alchemist-server/run.exs --env=dev
DEFL { "Sample.TestModule,nil", [ context: Elixir, imports: [Sample.TestModule], aliases: [{Sample, Sample.}]] }
15:22:12.411 [error] GenServer #PID<0.117.0> terminating
** (SyntaxError) nofile:1: syntax error before: '}'
(elixir) src/elixir.erl:184: :elixir.eval/3
(elixir) lib/code.ex:168: Code.eval_string/3
alchemist-server/lib/api/defl.exs:83: Alchemist.API.Defl.normalize/1
alchemist-server/lib/api/defl.exs:13: Alchemist.API.Defl.request/1
alchemist-server/lib/helpers/process_commands.exs:20: Alchemist.Helpers.ProcessCommands.process/2
alchemist-server/lib/server/io.exs:21: Alchemist.Server.IO.handle_info/2
(stdlib) gen_server.erl:615: :gen_server.try_dispatch/4
Last message: :timeout
State: "dev"
** (EXIT from #PID<0.47.0>) an exception was raised:
** (SyntaxError) nofile:1: syntax error before: '}'
(elixir) src/elixir.erl:184: :elixir.eval/3
(elixir) lib/code.ex:168: Code.eval_string/3
alchemist-server/lib/api/defl.exs:83: Alchemist.API.Defl.normalize/1
alchemist-server/lib/api/defl.exs:13: Alchemist.API.Defl.request/1
alchemist-server/lib/helpers/process_commands.exs:20: Alchemist.Helpers.ProcessCommands.process/2
alchemist-server/lib/server/io.exs:21: Alchemist.Server.IO.handle_info/2
(stdlib) gen_server.erl:615: :gen_server.try_dispatch/4 It works to be cut in aliases, but it cannot find the file. $ elixir alchemist-server/run.exs --env=dev
DEFL { "Sample.TestModule,nil", [ context: Elixir, imports: [Sample.TestModule], aliases: []] }
END-OF-DEFL Also I found that it correctly finds and jumps to the definitions, when called in routes.ex. In the snippets, pipeline :browser_session do
plug Guardian.Plug.VerifySession
plug Guardian.Plug.LoadResource
plug Sample.Plug.ConnAssigns
end |
Hey @hykw thanks for the details. I'll come back to you later :) |
@hykw So there are few points:
and before completing the syntax you tried to run ExDef (or maybe you have auto save on or ...). As I mentioned I'll send a patch to not include unfinished like this into alias list Let me know if my assumptions are correct |
I've prepared a sample project, which reproduces the issue. Doesn't it occure in your environment? The issue occures in my environment with the following steps: $ cd src
$ mix phoenix.new Confirmed the beam files are in _build/dev/lib/sample/ebin/ (I've checked in the files into GitHub, just in case) $ vi web/router.ex
c.f.
|
@hykw thanks a lot for spending time on debugging the issue. This case is a bit different! which I didn't cover :( The reason that you can use |
I've found the correct/wrong case. It fails if alias is set in a module. It doesn't matter called with absoletely(Foo.Bar.foo()) or relatively(Bar.foo()). Sample code: The difference beetween Sample.WrongCase and Sample.CorrectCase are |
Correct it doesn't work in |
Oops, as you mentioned it worked with one line alias.
|
@slashmili sorry for being MIA (busy month!). For some reason, ExDef is working as expected now. I'm guessing the bug was caused by an issue with my system state rather than alchemist itself. I'll close the issue for now and reopen if it reoccurs in the future. |
Great 👍 Sorry I couldn't help much |
I'm trying to use the jump to tag definition in alchemist, but when I run
:ExDef
I get a tag not found error on every tag that I try. Here is my alchemist config and a gif of the error:The text was updated successfully, but these errors were encountered: