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

Working with MiniTest and RSpec? #291

Closed
nomasprime opened this issue Feb 1, 2020 · 16 comments
Closed

Working with MiniTest and RSpec? #291

nomasprime opened this issue Feb 1, 2020 · 16 comments

Comments

@nomasprime
Copy link

Raised an issue over here because that's the wrapper I'm using for Neomake and Dispatch.

Have a feeling the problem lies with Dispatch though because when I use directly the error messages still don't get picked up.

@nomasprime
Copy link
Author

🎉 this fixed part of the issue.

@nomasprime
Copy link
Author

nomasprime commented Feb 1, 2020

Last problem I'm having is with output: ^[[1A^[[2K^MStarting euclid_neo4j_1 ... ^[[32mdone^[[0m^M^[[1B/usr/local/bundle/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/stack.rb

There's also a problem with the inline output in Neomake, lots of ^@, so hopefully if I can fix in Dispatch, it will fix that too.

@tpope
Copy link
Owner

tpope commented Feb 1, 2020

If the issue is happening with tmux, :set shellpipe=2>&1\|tee might fix it, because that tells Dispatch to use that pipe construction to capture output rather than use tmux pipe-pane. If it's happening with any other adapter, then it's the fault of the command you're running. It shouldn't try to write escape codes to something that isn't a tty.

@nomasprime
Copy link
Author

Thanks @tpope.

I've already tried that and some of the other shellpipe settings I found in the issues but couldn't get it to work.

If I run directly with Dispatch I see some of the same escape codes, could be a problem with the way I'm running Dip/Docker? I'll look into that.

Also raised an issue with Neomake see if they can help.

@nomasprime
Copy link
Author

Tried running directly with Docker, without Dip, with both interactive and non-interactive. I get the same result.

@tpope
Copy link
Owner

tpope commented Feb 1, 2020

I don't know what any of that means.

@nomasprime
Copy link
Author

Essentially I get the same output with/without Docker.

The problem's most visible when Neomake displays errors so hoping they can get to the bottom of it.

In the meantime I'll educate myself around shells, escape codes, etc. Any recommended resources?

@nomasprime
Copy link
Author

Got working in Docker but now trying locally to compare performance.

Unfortunately with pretty standard install it's not working again with MiniTest and RSpec. I'm calling Dispatch directly.

@nomasprime
Copy link
Author

Tried setting compiler to ruby and rubyunit.

Tried with both ruby -Itest % and ruby -I test %.

Test results come up with errors but nothing's matched.

@nomasprime
Copy link
Author

Maybe not compatible with NeoVim?

@nomasprime
Copy link
Author

Tried in unmodified Vim, even jumping into unmodified Bash shell, and the same. Just trying to eliminate things best I can.

@tpope
Copy link
Owner

tpope commented Feb 3, 2020

You can use :Dispatch -compiler=rubyunit to force a particular Vim compiler plugin. Make sure you're not using a custom Minitest formatter, as that could potentially format the errors in a away the compiler plugin won't recognize.

@nomasprime
Copy link
Author

nomasprime commented Feb 3, 2020

@tpope thanks. I'm not using any custom formatter, deliberately gone vanilla, even switched to default Bash and Vim.

Aren't there some bugs here?

Even if I force the compiler I don't get any joy with Minitest.

Rspec I can get to work if I don't use bundle exec.

@tpope
Copy link
Owner

tpope commented Feb 3, 2020

It's been years since I've had the occasion to use Minitest. It's plausible the default output format changed to the point the rubyunit compiler plugin can no longer recognize it.

@nomasprime
Copy link
Author

@tpope is this a Dispatch bug? How can I fix this?

@tpope
Copy link
Owner

tpope commented Jun 2, 2020

Highly unlikely that this is a Dispatch bug. Try :compiler ruby and :make % to see if you get the same result with Dispatch removed from the equation.

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

No branches or pull requests

2 participants