Closed lostintangent closed 6 years ago
Thank you!
Version 1.12.0 was just published, thanks again!
@kisstkondoros Awesome!
Hi @lostintangent,
could you please check the change in https://github.com/kisstkondoros/codemetrics/commit/fd1212f3ce0358d68a952b596f1c451eaaf89dcd wether it is still suitable for vsls? I couldn't find any hint for what kind of scheme should I specify in order to avoid the warning log at runtime but still be compatible with vsls.
Extension 'kisstkondoros.vscode-codemetrics' uses a document selector without scheme. Learn more about this: https://go.microsoft.com/fwlink/?linkid=872305
Thanks in advance!
@kisstkondoros The downside of that change is that if a Live Share guest has CodeMetrics installed, then they wouldn't see the CodeMetrics code lenses anymore. That's because documents on their end use the vsls
file scheme as opposed to file
. If you'd like, you could simply add vsls
to that scheme array and that would fix it.
That said, we're about to do the work to share code lenses from the Live Share host->guest, at which point, guests would see CodeMetrics as long as the host had that extension installed (even if they didn't have it installed!). So, I'd recommend just leaving things for now, and we'll resolve this by "remoting" the code lenses all-up.
Thanks @lostintangent for taking time answering this. I'll leave it as it is for now then.
This PR adds support for Visual Studio Live Share, which allows developers who have this extension installed, to continue seeing code complexity metrics while collaborating on someone else's project. On the guest's side, files use the
vsls
scheme, which prevents this extension from displaying metrics, despite the fact that it would otherwise work. Note that the green/yellow/red decorator already displays in all scheme types, so this change simply allows the CodeLens to show as well. For example, this is what the experience looks like for a Live Share guest before this PR:And this is what the experience looks like after the PR. Notice that both the guest and the host of the collaboration session are able to view metrics, which is awesome, since the "guest" might want to see this metadata and recommend some refactoring to the developer he/she is helping:
As a side effect of removing the scheme in general, the complexity metrics would also begin showing up in "untitled" files (e.g. unsaved/in-memory documents), which seems reasonable to me, since the red/green/yellow decorator would already show up, and the CodeLens is already filtered by supported languages.
// CC @kisstkondoros