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

[Bug] IndexOutOfRangeException with FSharp assembly active pattern #10155

Open
MadelineRitchie opened this issue Aug 14, 2024 · 0 comments
Open
Labels
bug A bug to fix dotnet Generate .NET API reference docs

Comments

@MadelineRitchie
Copy link

Describe the bug
Attempting to generate docs against an fsharp assembly with a particular shape of active pattern throws an exception. I created a minimum reproduction https://github.com/MadelineRitchie/docfx-exception-repro and the code that causes docfx to fail is there in src/lib/Library.fs

To Reproduce
Steps to reproduce the behavior:

  1. Clone my minimum repro https://github.com/MadelineRitchie/docfx-exception-repro
  2. cd src/docfx
  3. docfx.exe .\docfx.json --serve

Expected behavior
Doc output should be generated.

Context (please complete the following information):

  • OS: Windows
  • Docfx versions tested:
  1. 2.77.0+bd00e2b93951e9e7fa6e5abd990d2cd77d7a83bd
  2. docfx repo main built locally as of half an hour ago

Additional context
The full console output is in the repro repo at https://github.com/MadelineRitchie/docfx-exception-repro/blob/main/console-output-with-error.txt

I ran docfx with a debugger attached, and this particular FSharp output fails the Debug.Assert in SpecIdHelper.cs at line 49 which currently looks like Debug.Assert(symbol.TypeParameters.Length > int.Parse(match.Value.Substring(2)));

@MadelineRitchie MadelineRitchie added the bug A bug to fix label Aug 14, 2024
@yufeih yufeih added the dotnet Generate .NET API reference docs label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix dotnet Generate .NET API reference docs
Projects
None yet
Development

No branches or pull requests

2 participants