-
Notifications
You must be signed in to change notification settings - Fork 158
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
Exception of type 'Microsoft.FSharp.Compiler.Tast+InternalUndefinedItemRef' when generating reference docs for an assembly that uses the Json type provider. #325
Comments
Any thoughts on this? I'm still trying to work through it. Tried using the omit tag on the members that use the JsonProvider but I'm still getting the same message. Reading through some of the other issues, I see there might be problems with using different versions of the Compiler.Service and VSPowerTools. |
Tried another test.
The first step succeeds but the second fails with the same message I've been getting in my project. Here's the JsonProvider.
|
Thanks for producing an easy-to-reproduce scenario! This looks like an F# Compiler Service issue (http://github.com/fsharp/FSharp.Compiler.Service/), or perhaps we're not calling the F# Compiler Service correctly... Let me cc @dsyme to see if he has any ideas on what might be causing this. |
There seems to be a steady stream of issues involving FCS and FSharp.Formatting, especially in the area of assembly references and other compiler configuration flags. I think FSharp.Formatting is exposed to this more than other tooling because of two things
To get to the bottom of this kind of issue we really need much better visibility of how FSharp.Formatting is actually instantiating and using FCS. For example, it would be very helpful if FSharp.Formatting printed out the exact command line option set being passed to create the FSharpChecker and also to FsiEvaluationSession. @tpetricek do you think you could add these diagnostics? On the specific issue above - I'm not really sure - it could be a missing FSharp.Data reference meaning the provided symbols can't be linked. Whatever comes we should add more tests to FSharp.Compiler.Service which drives the API in a way that is equivalent to the way that FSHarp.Formatting is driving it. Some systematic testing in FCS would help flush out bugs here. |
Yes, adding some logging so that we can easily diagnose these kinds of errors would be nice. I currently have a few other things that I need to finish soon. Can you perhaps open a separate issue for this, so that we can move the diagnostics-related discussion there? (And add a couple of pointers in case someone else wanted to contribute.) |
Thanks for the responses. I'm coming from a C# background and have been using my project the last few months as a way of learning F#. The community has been a great help. I'd be interesting in contributing if there are some pointers and it's something that can be done at my skill level. |
I would be willing to contribute to this as well (improving the overall exception code to make it easier to reproduce in FCS), I have already improved the exception messages within the F# scripting code of FSF, so this would be the next logical thing to do. It's OK if @talbottmike want's to take it though, as he was faster :). Currently I'm still busy anyway so I would start with this in a couple of weeks at best. |
@matthid I'm not sure where to start so don't let me get in the way. I will go take a look at your commits to FSF to see what I can learn. |
@matthid I looked at some history and you're better equipped to help than I am. I'm out of my depth here. I'd like to find something to contribute to but need to start closer to beginner level. I could do a lot of learning here but don't know how much value I could contribute until I've done some more learning. |
CLosing really old bugs we likely aren't going to investigate directly now things have moved on |
I'm using FSharp.Formatting as implemented in the ProjectScaffold to generate reference documentation. When attempting to generate reference documentation, I'm getting an exception when MetadataFormat.Generate is called. By process of elimination I found that removing all JsonProviders from my assembly resolves the issue. However, when I re-include a JsonProvider in my project the error returns. I'm not sure that this is an issue with FSharp.Formatting, but any help is appreciated. Thanks
Here's the function from the scaffold generate.fsx where the error occurs.
Here's the exception.
The text was updated successfully, but these errors were encountered: