cmake4vim icon indicating copy to clipboard operation
cmake4vim copied to clipboard

Remove ninja targets starting with '/'

Open mark2185 opened this issue 3 years ago • 6 comments

At some point ninja --target help started printing absolute paths to targets, so this filters out such targets.

Also I used printf because it was more readable.

mark2185 avatar Jun 02 '22 18:06 mark2185

Codecov Report

Merging #160 (e82a466) into master (24c5d6e) will decrease coverage by 0.07%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #160      +/-   ##
==========================================
- Coverage   98.55%   98.47%   -0.08%     
==========================================
  Files          19       19              
  Lines        1244     1246       +2     
==========================================
+ Hits         1226     1227       +1     
- Misses         18       19       +1     
Impacted Files Coverage Δ
autoload/utils/gen/ninja.vim 96.29% <75.00%> (-3.71%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 24c5d6e...e82a466. Read the comment docs.

codecov[bot] avatar Jun 02 '22 20:06 codecov[bot]

I don't think I'll be able to reproduce this in tests.

mark2185 avatar Jun 02 '22 20:06 mark2185

I don't think I'll be able to reproduce this in tests.

@mark2185 Why cannot you add necessary targets in the test project?

ilyachur avatar Jun 11 '22 19:06 ilyachur

Because those were bugged, it wasn't consistent, but when the targets did appear, the easiest solution was to filter out the ones that were the absolute path, i.e. starting with /.

mark2185 avatar Jun 11 '22 20:06 mark2185

Because those were bugged, it wasn't consistent, but when the targets did appear, the easiest solution was to filter out the ones that were the absolute path, i.e. starting with /.

Am I right that it works only for Unix? What is about Windows? Should it be fixed for Windows too?

ilyachur avatar Jun 14 '22 19:06 ilyachur

Am I right that it works only for Unix? What is about Windows? Should it be fixed for Windows too?

To be honest I have no idea what caused the issue, why did it happen, nor what fixed it (sometimes trying to select the target again worked okay). It just happened every other week, and this was an easy fix. It was on linux, I couldn't reproduce it so I can't say if the same happens on macOS or on windows.

This bug maybe isn't with cmake4vim itself, but due to my setup, so it doesn't have to be merged :) If you never had this happen, likely others haven't either, so feel free to close this.

mark2185 avatar Jun 14 '22 19:06 mark2185

This PR looks abandoned and issue is not reproduced on CI. So I am closing this PR.

ilyachur avatar Jul 27 '23 06:07 ilyachur