Biohazrd
Biohazrd copied to clipboard
Fix Source Link issues caused by `#` usage in paths
Turns out the #
's we use for organizational folders break Source Link in many contexts, seemingly because the #
is not being escaped as %23
.
Ideally this should just be fixed externally, I've reported the issue to the relevant parties here:
- Visual Studio: https://developercommunity.visualstudio.com/t/-symbol-in-file-path-breaks-NET-Sour/10080583
- VSCode: https://github.com/OmniSharp/omnisharp-vscode/issues/5290
- Rider: https://youtrack.jetbrains.com/issue/RIDER-79266/-symbol-in-file-path-breaks-Source-Link
If this doesn't get fixed upstream, I think we could potentially fix this by generating our own sourcelink.json
which has the #
pre-escaped. IE:
{
"documents": {
"/_/*": "https://raw.githubusercontent.com/MochiLibraries/Biohazrd/f888ef20336e649f9cbc1fe0aeb4aae6b29d70db/*",
"/_/external/assert.xunit/*": "https://raw.githubusercontent.com/xunit/assert.xunit/f1d3aeb9999a7c64a1bd7b3f513dbba6f76beba7/*",
"/_/Biohazrd/#Declarations/*": "https://raw.githubusercontent.com/MochiLibraries/Biohazrd/f888ef20336e649f9cbc1fe0aeb4aae6b29d70db/Biohazrd/%23Declarations/*"
}
}
However I'd definitely rather not deal with that.
(Thanks to @js6pak for bringing this to my attention.)