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

Hints throw exception #14885

Closed
0101 opened this issue Mar 13, 2023 · 0 comments · Fixed by #15004
Closed

Hints throw exception #14885

0101 opened this issue Mar 13, 2023 · 0 comments · Fixed by #15004
Assignees
Labels
Area-LangService-Hints F# hints inspired by C# inline hints Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@0101
Copy link
Contributor

0101 commented Mar 13, 2023

devenv.exe Error: 0 : Visual F# Tools: exception swallowed and not passed to Roslyn: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.getSourceTextAtRange(SourceText sourceText, Range range) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\InlineParameterNameHints.fs:line 70
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.argumentNames@112.Invoke(Range range)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@99.DoMoveNext(b& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 102
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map2@134.DoMoveNext(c& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 136
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@211.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 222
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 974
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.getHintsForMemberOrFunctionOrValue(SourceText sourceText, FSharpParseFileResults parseResults, FSharpMemberOrFunctionOrValue symbol, FSharpSymbolUse symbolUse) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\InlineParameterNameHints.fs:line 120
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.Pipe #4 input at line [email protected](FSharpSymbolUse symbolUse)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@99.DoMoveNext(b& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 102
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@320.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 320
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@314.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 314
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@314.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 314
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 974
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.getHintsForDocument@62-2.Invoke(Tuple`2 _arg1) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\HintService.fs:line 66
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in C:\code\fsharp\src\FSharp.Core\async.fs:line 528
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@169-3.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@80-13.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.parseAndCheckFile@40-2.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.parseAndCheckFile@39-3.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@79-14.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@32-15.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@31-16.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@29-17.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@167-5.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpCompilationOptionsAsync@113-1.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@166-6.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.getHintsForDocument@59-4.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Editor>.$RoslynAdapter.Pipe #1 input at line [email protected](AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Editor>.$RoslynAdapter.Pipe #1 input at line [email protected](AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in C:\code\fsharp\src\FSharp.Core\async.fs:line 112
@github-actions github-actions bot added this to the Backlog milestone Mar 13, 2023
@0101 0101 added Area-LangService-Hints F# hints inspired by C# inline hints Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. and removed Needs-Triage labels Mar 13, 2023
@0101 0101 self-assigned this Mar 30, 2023
@0101 0101 modified the milestones: Backlog, March-2023 Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-Hints F# hints inspired by C# inline hints Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant