alchemist-server icon indicating copy to clipboard operation
alchemist-server copied to clipboard

Incorrect completion when modules namespaced and more than one option

Open chrismcg opened this issue 7 years ago • 0 comments

Moving this from tonini/alchemist.el#272 (there's a bit more detail there)

It looks like when there are multiple options which share a prefix after a . the completion is including the shared prefix which is breaking things further up the stack.

Adding

  test "return completion candidates for 'Kernel.Para'" do
    assert run('Kernel.Para') == ['Kernel.ParallelCompiler', 'Kernel.ParallelRequire']
  end

In complete_test.exs shows the failure, there is no actual Kernel.Parallel module.

  1) test return completion candidates for 'Kernel.Para' (CompleteTest)
     test/helpers/complete_test.exs:31
     Assertion with == failed
     code: run('Kernel.Para') == ['Kernel.ParallelCompiler', 'Kernel.ParallelRequire']
     lhs:  ['Kernel.Parallel', 'ParallelCompiler', 'ParallelRequire']
     rhs:  ['Kernel.ParallelCompiler', 'Kernel.ParallelRequire']
     stacktrace:
       test/helpers/complete_test.exs:32

chrismcg avatar Dec 08 '16 12:12 chrismcg