mardi 9 février 2016

How to reconstruct F# assembly signature from F# dll

I want to access F# signature data from a compiled F# dll.

I understand that I can get the signature data from the source files using the FSharp.Compiler.Service library. I could not find a way to use that library to produce signature information from a dll without sources.

I see two options, but I think it's possible there may be a simpler solution. The two options I'm aware of are:

  1. Embed the .fsi signature file in the dll and use FSharp.Compiler.Service to extract information from the embedded resource. I can make any associations to reflection metadata from correspondence in name.

  2. Reconstruct the F# signature from reflection metadata. This approach seems necessarily insufficient because some data is not recoverable through reflection (e.g. type aliases).

My question is:

Is there a better way to access F# signature data and associate it with reflection metadata than I have suggested?

Another way to look at this question that might make it a little more concrete is, "Given a compiled F# assembly, how can I determine all the type aliases (and referents thereof) that would be available to referencing projects?"





Aucun commentaire:

Enregistrer un commentaire