Code Monkey home page Code Monkey logo

Comments (9)

rbong avatar rbong commented on June 11, 2024

I just saw the :Debug command, I thought I would use it to provide more insight. Apparently the error does not occur when using fugitive#Command() directly:

runtime! plugin/fugitive.vim

describe 'vspec'
  it 'test'
    edit README.md
    Debug fugitive#Command(1, 1, +"0", 0, "", "status")
  end
end
#
 call fugitive#Resume()|silent checktime
ok 1 - vspec test
1..1

So maybe the error has to do with command definitions. I will keep trying to narrow this down further so this issue is not quite as gargantuan.

Edit: Debug execute('Git status') results in:

...
Completed.
#

No further output.

from vim-vspec.

rbong avatar rbong commented on June 11, 2024

I am working around this for now with a combination of using different commands and using SKIP. The error probably has something to do with nvim job control, but fugitive job control is complex so reducing this issue further is difficult.

from vim-vspec.

kana avatar kana commented on June 11, 2024

I am assuming Neovim is partially supported because this issue was resolved, let me know if that's incorrect.

It should work unless there are tricky stuffs within your plugin or its dependency.

  • I only get the error running tests using GitHub Actions
  • I don't get the error:
    • [...]
    • Running nvim tests on my local environment
    • [...]

That's strange. I think the same error should happen on your local environment.

I'm running the tests with

bundle exec vim-flavor install
~/.vim-flavor/repos/kana_vim-vspec/bin/vspec ~/.vim-flavor/repos/tpope_vim-fugitive t/flog.vim

That is not the right way to run tests.
That command replaces ~/.vim/pack/flavors, so that it affects further (non-test) Vim invocations.

You should use the following command instead:

bundle exec vim-flavor test

This will install dependencies into ./.vim-flavor and they will be used only for tests.

If you don't get the error on your local environment even if you use the above command, the problem might be caused by environments rather than Vim plugins.

If you want to investigate raw output from a test, use the following command:

./.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/vspec . ./.vim-flavor/pack/flavors/start/tpope_vim-fugitive t/flog.vim

from vim-vspec.

rbong avatar rbong commented on June 11, 2024

That is not the right way to run tests.
bundle exec vim-flavor test

Running bundle exec vim-flavor test is how I normally execute tests:

Since this gives no output, I also get Parse errors: No plan found in TAP output when running vim-flavor test

In the related issue you also asked for the output of vspec t/test.vim so I just wanted to give you the output of both.

If you don't get the error on your local environment even if you use the above command, the problem might be caused by environments rather than Vim plugins.

I don't get the error locally when using bundle exec vim-flavor test. I do still get it in the other environment.

I figure it's environmental at this point, but I am at a loss as to how to debug further since the output is empty.

If you want to investigate raw output from a test, use the following command:

Is this command different than the one I'm using? There is no .vim-flavor directory when I install using bundle exe vim-flavor install in this environment.

from vim-vspec.

rbong avatar rbong commented on June 11, 2024

It should work unless there are tricky stuffs within your plugin or its dependency.

Does "tricky stuff" include job control? Since Fugitive uses a lot of job control.

from vim-vspec.

kana avatar kana commented on June 11, 2024

Does "tricky stuff" include job control? Since Fugitive uses a lot of job control.

Perhaps. The problem might be caused by that job control, and only on specific environments. But I'm not sure.

I'll try look into the problem later.

from vim-vspec.

kana avatar kana commented on June 11, 2024

Is this command different than the one I'm using?

It depends on the context. If you always run the two commands:

bundle exec vim-flavor install
~/.vim-flavor/repos/kana_vim-vspec/bin/vspec ~/.vim-flavor/repos/tpope_vim-fugitive t/flog.vim

Fortunately, there is no difference.

But ~/.vim-flavor is not intended to be directly used. It's a directory to cache local clones of plugins, and its contents might be changed whenever vim-flavor is executed in different context.

There is no .vim-flavor directory when I install using bundle exe vim-flavor install in this environment.

Ah, sorry. I assumed that you did run bundle exec vim-flavor test at least once.

from vim-vspec.

rbong avatar rbong commented on June 11, 2024

This issue is fixed for me now.

I was installing neovim previously with the following steps in GitHub Actions:

    - name: "add neovim repository"
      shell: "bash"
      run: |
        sudo add-apt-repository -y ppa:neovim-ppa/stable
    - name: "install neovim"
      shell: "bash"
      run: |
        sudo apt-get -y update
        sudo apt-get -y install neovim

I have switched to thinca/action-setup-vim and now nvim tests work fine.

I don't know what environmental factors could have been causing this issue but they seem to be resolved now.

Apologies for not following the CI guide, I was migrating from an old CI setup and not from scratch.

from vim-vspec.

kana avatar kana commented on June 11, 2024

I tried reproducing the problem on my local environment, but I couldn't. I also tried narrowing down the problem by deleting unrelated code from the plugin and running the test on GitHub Actions based on your setup, but it's hard to do so because of the large amount of job control code. Therefore I failed to take a good guess about what code causes the problem.

Anyway, I'm glad to hear that the problem doesn't happen by using thinca/action-setup-vim. In addition to resolving the problem, it's faster than the old setup because its result is cached by default.

from vim-vspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.