Closed TheDudeFromCI closed 4 years ago
Any chance I can get the lcov file? It could help me investigate. Also, the actual full path to TextureAtlas.cs, just to understand the real hierarchy versus the explorer hierarchy. Last question, are you using it in macos or windows? Because for now I tested it only on macOS.
FYI, to easily handle the multi-folder workspaces, I had to open the files using their full paths. I can have a look at changing that but first, I would rather fix it using full paths which will probably be quicker.
Sure, here you go.
The absolute path of the file is:
/home/thedudefromci/Documents/workspace/Bones3-Core/Core/Source/Textures/TextureAtlas.cs
My operating system is actually Linux. (Specifically Fedora 32)
I see what's happening, don't know how to fix that yet. In my test environment (Flutter/Dart) the lcov had relative path while in your lcov, the paths are absolute. I will have a look soon on how to fix this. (It it going to be easy to fix it for full paths, but I'm seeing another potential bug for relative paths, they could be different according to the environment/tech used, could be relative to the workspace, to the source root... Maybe it should just be a configuration)
Could you truncate the paths when loading them? Absolute paths always start with a prefix, c:/
(or any other letter) on Windows or /
on Mac and Linux. When loading the file, if the paths don't have that prefix, simply manually append the file path to the root folder. Either that or clip off the absolute paths to turn them into relative ones.
Actually, there is an easy way to check if the path is relative or absolute.
But it is probably easier to just truncate the path of the workspace from the file path (The file path is used to build the hierarchy, and that explains why the tree is broken).
The thing is for the lcov
with relative paths, I don't know right now if they always start at the workspace folder root. I will consider it is the case until proved proved otherwise.
As far as I know, LCov is allowed to use either option. While extremely uncommon, it's also technically possible to use both in the same file.
It's working now, yes. Everything appears to be working as expected. I can also open files and all that, now. Success!
Fixed by aacbeb751b7e4efafebbdeb4e0ed6f037b2aed3e
It seems for some reason the explorer is showing my entire file path in the explorer instead of just the relative. It also fails to open them as a result. (i.e.
`cannot open '/home/thedudefromci/workspace//home/thedudefromci/workspace/file'
)My settings, defined in .code-workspace file:
Also worth noting that coverage.info is an
lcov
file type.