p00f / cphelper.nvim

Neovim helper for competitive programming. Use https://sr.ht/~p00f/cphelper.nvim instead
MIT License
130 stars 9 forks source link

How to solve this Issue #32

Closed Dimpal-Kalita closed 1 year ago

Dimpal-Kalita commented 1 year ago

image

I am Facing this while running CphTest

p00f commented 1 year ago

Which language are you using?

What happens if you add vim.print("CMD = ", cmd) just before https://github.com/p00f/cphelper.nvim/blob/ab259315496514d58b2021048ef40437ad0f5814/lua/cphelper/run_test.lua#L83?

Dimpal-Kalita commented 1 year ago

image

I am Using C++, Build: image

p00f commented 1 year ago

That screenshot shows it's working though? When does this happen

Dimpal-Kalita commented 1 year ago

Yes, It is Working .. But whenever I run CphTest it shows time out and no output.

And How do I change the directory from C to D image It is not Working

p00f commented 1 year ago

What happens if you add vim.print("CMD = ", cmd) just before

https://github.com/p00f/cphelper.nvim/blob/ab259315496514d58b2021048ef40437ad0f5814/lua/cphelper/run_test.lua#L83 ?

Dimpal-Kalita commented 1 year ago

image Command line is showing this now

p00f commented 1 year ago

Use :messages to get the full output

Dimpal-Kalita commented 1 year ago

image

p00f commented 1 year ago

can you change vim.print to just print

Dimpal-Kalita commented 1 year ago

image It is Working Now...

How do I change default Directory from C to D image This is not working

p00f commented 1 year ago

Can you try changing the slash to a backslash?

Dimpal-Kalita commented 1 year ago

image

it didn't work

p00f commented 1 year ago

It's trying to mkdir relative to C:\Users\kalit instead of using it as an absolute path

I'll need some more time to investigate this as I don't use Windows - you can try to find the problem in this function:

https://github.com/nvim-lua/plenary.nvim/blob/499e0743cf5e8075cd32af68baa3946a1c76adf1/lua/plenary/path.lua#L464

p00f commented 1 year ago

It's this issue: https://github.com/nvim-lua/plenary.nvim/issues/456 - this bug only happens on windows

p00f commented 1 year ago

What is printed if you add print(problem_dir) just before this line?

https://github.com/p00f/cphelper.nvim/blob/ab259315496514d58b2021048ef40437ad0f5814/lua/cphelper/prepare.lua#L30

Dimpal-Kalita commented 1 year ago

image

I did this and Printed it as you said.. and it worked... It parsed the proble in correct Directory.

Thank you for Replying and Solving the issue