Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Source Link for IkvmReference #490

Open
wasabii opened this issue Feb 15, 2024 · 1 comment
Open

Enable Source Link for IkvmReference #490

wasabii opened this issue Feb 15, 2024 · 1 comment

Comments

@wasabii
Copy link
Contributor

wasabii commented Feb 15, 2024

Enable Source Link for generated assemblies from IkvmReference. IkvmReference can point to a JAR, but can also be augmented with some source information (such as a companion source JAR, or a URL prefix, or something), and embed the appropriate information into the generated assembly. Probably need our Portable PDB support for this.

@Martin1994
Copy link

There are two ways to provide source information: Source Link, and embedded source. Eventually ikvm should support both modes for different scenarios.

Thinking of use experience from ikvmc's interface, we can add new parameters to it to support Source Link:

  • srcpath:<string> - this is an existing parameter to locate the sources. This will affect the document name in PDB, as well as the source key in the Source Link document entry.
  • sourcelink:<boolean> - this will be a new parameter that will automatically identify a source link provider based on git information on local sources
  • sourcelinkurl:<string> - this will be a new parameter to explicitly specify the URL prefix of sources used by source link. This is useful when CSM enabled local source is not available, such as from a Maven repository, but embedded source is not preferred. This cannot be used together with sourcelink parameter.
  • embeduntrackedsources:<boolean> - this will be a new parameter to embed sources not tracked by any CSM (when either sourcelink is not provided or the source file is not tracked in the local git repository). This cannot be used together with sourcelinkurl parameter.

Speaking of the order of implementation, I propose:

  1. embeduntrackedsources - this should be the easiest implementation, and will unblock Maven integration.
  2. sourcelinkurl - this is a nice to have feature to reduce the size of PDB. I believe this can be useful for libraries with MavenReference.
  3. sourcelink - this requires integration with CSM (git/GitHub as a starting point), and provides the least use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants