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

XML Coverage file not found #154

Closed
zgoda-mobica opened this issue Aug 2, 2018 · 7 comments
Closed

XML Coverage file not found #154

zgoda-mobica opened this issue Aug 2, 2018 · 7 comments
Labels
Milestone

Comments

@zgoda-mobica
Copy link

zgoda-mobica commented Aug 2, 2018

My test run produces xml output in the file cov.xml and places it in workspace folder but I keep getting this error:

[gutters]: Stacktrace Error: Could not find a Coverage file!
	at FilesLoader.<anonymous> (/Users/jzgoda/.vscode/extensions/ryanluker.vscode-coverage-gutters-2.1.0/out/src/filesloader.js:29:23)
	at Generator.next (<anonymous>)
	at fulfilled (/Users/jzgoda/.vscode/extensions/ryanluker.vscode-coverage-gutters-2.1.0/out/src/filesloader.js:4:58)
	at <anonymous>

Before I installed this extension the name of a file was coverage.xml. Got the above error, changed "coverage-gutters.xmlname" value to coverage.xml, reloaded VSCode and tried to add watch, same error. Changed name of coverage results file, removed config, reloaded VSCode, enabled watch - same error. Now the fun part begins: uninstalled extension and installed it again, enabled watch and boom, everything works.

@ryanluker
Copy link
Owner

@zgoda-mobica thanks for opening an issue. This is an interesting one, when you mentioned the second time around you changed name of coverage file, removed config, reloaded IDE, enabled watch did you also change the the value of xmlname to cov.xml? Good to see that it works now but definitely there is an issue here with the config loading (currently it caches the settings on load and then on some settings never refreshes the in memory ones until the IDE or extension reloads).

@ryanluker ryanluker added the bug label Aug 2, 2018
@ryanluker ryanluker added this to the 2.1.1 milestone Aug 2, 2018
@zgoda-mobica
Copy link
Author

No, I just removed configuration entry in workspace settings to use default.

@davidbrownell
Copy link

davidbrownell commented Aug 4, 2018

I am running into the same issue (without the part about things working after an uninstall/reinstall). In my case, I was able to root cause the problem to the glob expression on line 87 in fileLoader.js. If I change the expression from **/${fileName} to **${fileName}, things work as expected (no error message and I can see the coverage info displayed based on information in the file).

I don't know much about the glob implementation, but my guess is that this may not be the right fix as it looks like the glob docs suggest that globstar patterns represent 0 or more dirs. That pattern should should resolve to 0 dirs in this particular use case.

@ryanluker
Copy link
Owner

@davidbrownell thanks for the extra info, is the fix you mentioned also fixing the issue you raised #156 ? I will look into this bug for the 2.1.1 release anyways but any extra info helps 😄

@davidbrownell
Copy link

Thanks for taking a look, @ryanluker. Unfortunately, this work around doesn't fix #156.

@ryanluker
Copy link
Owner

ryanluker commented Aug 5, 2018

@zgoda-mobica going to close this issue unless it comes up again with you or someone else, thanks for submitting it though!

@davidbrownell
Copy link

I am still experiencing this issue with 2.1.1. Changing **/${fileName} to **${fileName} addresses the issue for me.

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

No branches or pull requests

3 participants