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

InvalidOperationException on some DUs #128

Open
marklam opened this issue Nov 13, 2024 · 0 comments
Open

InvalidOperationException on some DUs #128

marklam opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@marklam
Copy link

marklam commented Nov 13, 2024

Describe the bug
Analyzer crashes on some DU with arrays or tuples

To Reproduce
Analyze the project https://github.com/marklam/AnalyzerTests using the RunAnalyzers.bat or equivalent

Expected behaviour
List of analyzer advisories

Actual result

[16:11:29.855] info: Running in verbose mode
[16:11:29.866] info: Treat as Hints: []
[16:11:29.866] info: Treat as Info: []
[16:11:29.866] info: Treat as Warning: []
[16:11:29.866] info: Treat as Error: []
[16:11:29.869] info: Exclude Files: []
[16:11:29.869] info: Include Files: []
[16:11:29.873] info: Loading analyzers from D:\Git\Temp\AnalyzerTests\packages\Ionide.Analyzers\analyzers\dotnet\fs
[16:11:29.889] info: Registered 12 analyzers from 1 dlls
[16:11:29.896] info: Loading project D:\Git\Temp\AnalyzerTests\AnalyzerTests\AnalyzerTests.fsproj
[16:11:30.286] info: Checking project D:\Git\Temp\AnalyzerTests\AnalyzerTests\AnalyzerTests.fsproj
[16:11:31.419] info: Running analyzers for D:\Git\Temp\AnalyzerTests\AnalyzerTests\foo.fs
[16:11:31.419] info: Running analyzers for D:\Git\Temp\AnalyzerTests\AnalyzerTests\obj\Debug\net9.0\AnalyzerTests.AssemblyInfo.fs
[16:11:31.419] info: Running analyzers for D:\Git\Temp\AnalyzerTests\AnalyzerTests\obj\Debug\net9.0\.NETCoreApp,Version=v9.0.AssemblyAttributes.fs
Unhandled exception. System.InvalidOperationException: the type 'type Microsoft.FSharp.Core.int Microsoft.FSharp.Core.array' does not have a qualified name
   at [email protected](Unit unitVar0) in D:\a\_work\1\s\src\Compiler\Symbols\Symbols.fs:line 2597
   at FSharp.Compiler.Symbols.Impl.protect[a](FSharpFunc`2 f) in D:\a\_work\1\s\src\Compiler\Symbols\Symbols.fs:line 79
   at FSharp.Compiler.Symbols.FSharpType.get_BasicQualifiedName() in D:\a\_work\1\s\src\Compiler\Symbols\Symbols.fs:line 2599
   at Ionide.Analyzers.Suggestion.StructDiscriminatedUnionAnalyzer.analyze@102-4.Invoke(FSharpUnionCase uc) in /_//src/Ionide.Analyzers/Suggestion/StructDiscriminatedUnionAnalyzer.fs:line 111
   at Microsoft.FSharp.Collections.SeqModule.ForAll[T](FSharpFunc`2 predicate, IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 699
   at Ionide.Analyzers.Suggestion.StructDiscriminatedUnionAnalyzer.analyze@97-3.Invoke(FixData data) in /_//src/Ionide.Analyzers/Suggestion/StructDiscriminatedUnionAnalyzer.fs:line 101
   at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@240.System.Collections.IEnumerator.MoveNext() in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 252
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in D:\a\_work\1\s\src\FSharp.Core\seq.fs:line 1004
   at Ionide.Analyzers.Suggestion.StructDiscriminatedUnionAnalyzer.structDiscriminatedUnionCliAnalyzer@171.Invoke(Unit unitVar) in /_//src/Ionide.Analyzers/Suggestion/StructDiscriminatedUnionAnalyzer.fs:line 171
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454
   at Microsoft.FSharp.Control.AsyncPrimitives.QueueAsyncAndWaitForResultSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1139
   at Program.results$cont@621(ToolsPath toolsPath, SeverityMappings severityMapping, FSharpList`1 projOpts, FSharpOption`1 fscArgs, FSharpChoice`2 exclInclFiles, FSharpList`1 properties, Client`2 client, Unit unitVar) in /_//src/FSharp.Analyzers.Cli/Program.fs:line 638
   at Program.main(String[] argv) in /_//src/FSharp.Analyzers.Cli/Program.fs:line 619

Environment (please complete the following information):

  • OS: Windows 11
  • Ionide Analzer version: 0.12
  • dotnet SDK version:
    • 6.0.428 [C:\Program Files\dotnet\sdk]
    • 9.0.100 [C:\Program Files\dotnet\sdk]

Additional context
Add any other context about the problem here.

@TheAngryByrd TheAngryByrd added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants