Open wasabii opened 9 months ago
I think we either need to embed sources, or ask for a new input parameter containing git commit information.
Source Link is a reference to a URL on HTTP. Maven provides sources with source jars so there is no direct URL to each individual source files. Maven also does not provide commit information AFAIK so we can't infer a GitHub source content URL either.
SourceLink actually provides a number of different possibilities: https://github.com/dotnet/designs/blob/62d47b661537ed94fcbfe4909e11b5168ef669ef/accepted/2020/diagnostics/source-link.md
The /sourcelink:
compiler flag will embed a JSON configuration file in the PDB.
So, for that one, we'd need to add a new flag to ikvmc which does the same.
And then there are two flows for running ikvmc as part of the build process: 1) IKVM.NET.Sdk, the SDK tooling that builds IKVM.Java itself, and which users can use to make Java-language projects. 2) IkvmReference
The first should capitalize on the existing SourceLink support in the mIcrosoft.net.sdk. But support converted/merged Archives as well as raw Java files. The second needs to be thought through.
Should build on https://github.com/ikvmnet/ikvm/issues/490
We feed source information derived from Maven into IkvmReference. Maven companion source files may be available for packages. Or there may be other standard Maven ways to point to the original repository.