Optionally, fetch source code information from a definitive source#91
Optionally, fetch source code information from a definitive source#91SteveGilham wants to merge 10 commits intoejball:masterfrom
Conversation
…ather than fixing up post hoc
…"make no fallback if SourceLink cannot be matched" -- also allow for partial classes in this case.
|
Ive developed two tools which combined allow extraction of exact information of the assembly, from the compilation image or pdb. This works with embedded sources and any sourcelink. For example, in the following project https://github.com/ProphetLamb/Surreal.Net/tree/master/src/Abstractions [
{
"type": "SurrealDB.Abstractions.IDatabase\u00601",
"link": "https://raw.githubusercontent.com/ProphetLamb/Surreal.Net/9050c906117c795ca385fd52b75062771a2a8816/src/Abstractions/Database.cs",
"path": "src/Abstractions/Database.cs",
"start": 6,
"end": 141
},
{
"type": "SurrealDB.Abstractions.IDatabase",
"link": "https://raw.githubusercontent.com/ProphetLamb/Surreal.Net/9050c906117c795ca385fd52b75062771a2a8816/src/Abstractions/Database.cs",
"path": "src/Abstractions/Database.cs",
"start": 141,
"end": 295
}
]
For each file, a I am going to fork and modify XmlDocMarkdown to accept the above I intend the tools for CI, so I was very uncreative with the naming ^^: dotnet tool install --global SourceLinkExtract
dotnet tool install --global SourceSymbolMapper
extract test.pdb meta.json out
mapper meta.json out symbols.json (Note: there will be messages about CompilationUnit being an unknown type, for constructing a typename, but that is ok, since it doesn't influence the logic) The issue with using debug symbols for instructions ( See: |
Allow an opt in
--source-styleto permit linking to a selection of (in preference order).cssource name, for all typesTesting is the obvious generalization of that for the existing
--sourceoption.