-
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
API generation fails when attempting to parse <Module> type in C# assemblies #180
Comments
I've already noticed this with C# assemblies from Akka.NET. The problem is that the '<' '>' chars are not escaped, and they're not valid in a file path.. |
Yes, I should have mentioned that it was a C# assembly in my case too. I've subsequently noticed that this issue probably stems from the fact that accessibility modifiers are ignored in C# assemblies; internal and public types are churned out indiscriminately. |
Well, the path encoding should be easy to fix :-) The ignoring of private and internal C# members relies on F# Compiler Service, so I think we need some pointers from @dsyme on where to change things there... |
I kind of tried to introduce C# support, however there is a bit more than just fixing this exception. The problem seems to be that the FSharp.Compiler.Service call doesn't return them: After this fix it's just a matter of generating the right XmlSignature string: (matthid/FSharp.Formatting@1bf4f92). Maybe someone wants to review those changes and open a pull request? I'm not sure what to do because of the changes in FSharp.Compiler.Service (not sure if those changes are "correct" or if this is even a bug?). After those changes the documentation is generated for my project flawlessly (its a bit unfortunate that I have to bundle the FSharp.Compiler.Service.dll now). NOTE: The first commit is kind of broken in a way that the check "&& (typ.IsClass || typ.IsInterface)" must be added to line 668 (or you will get errors for some FSharp projects) |
For whatever reason, the library attempts to generate documentation for the
<Module>
type. This causes a failure, since the ouput file contains invalid characters.This is the type record that caused the failure:
and here is the complete stacktrace:
The text was updated successfully, but these errors were encountered: