question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Unsupported type" exception with TypeSafe sample type

See original GitHub issue

Description

“Unsupported type” exception when using TypeSafe.

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a console app or an FSX script.

  2. Use sample class for value printer (as published on the front page of this repo)

  3. Place a statement let p = mkPrinter<TestType>()

Expected behavior

Should create a value printer for the type TestType.

Actual behavior

The statement above causes exception: Unhandled Exception: System.Exception: unsupported type 'System.Tuple3[Microsoft.FSharp.Collections.FSharpList1[System.Int32],Microsoft.FSharp.Core.FSharpOption1[System.String],System.String]' at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1360.Invoke(String message) at Program.mkPrinter[T]() in C:\Projects\Temp\TypeShapeTest\TypeShapeTest\Program.fs:line 54 at Program.mkPrinter@22-8.TypeShape-ITuple2Visitor1-Visitt1,t2 in C:\Project\Temp\TypeShapeTest\TypeShapeTest\Program.fs:line 25 at TypeShape.ShapeTuple22.TypeShape-IShapeTuple2-Accept[a](ITuple2Visitor1v) in C:\Projects\Temp\TypeShapeTest\TypeShapeTest\TypeShape.fs:line 288 at Program.mkPrinterT in C:\Projects\Temp\TypeShapeTest\TypeShapeTest\Program.fs:line 22 at Program.main(String[] argv) in C:\Projects\Temp\TypeShapeTest\TypeShapeTest\Program.fs:line 68

Known workarounds

No workaround.

Related information

  • Windows 8.1
  • Visual Studio 2015
  • Branch
  • .NET Runtime, CoreCLR or Mono Version
  • Performance information, links to performance testing scripts

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bartelinkcommented, Mar 6, 2019

This issue seems to be closable ?

0reactions
cotyarcommented, Apr 26, 2017

Sorry, my bad. All works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Best exception for an invalid generic type argument
I stumbled across this today in writing a generic method where extra requirements are placed on the type being used that cannot be...
Read more >
Unsupported type Type[...] error when instantiating ...
It looks like instantiating (calling) Type[X] sometimes has problems if X is: a tuple type; a generic type; type variable with a bound...
Read more >
How to Fix the Type Not Present Exception in Java
Java's TypeNotPresentException is thrown when the definition of a type, attempted to be accessed using a specified name, cannot be found.
Read more >
Built-in Exceptions — Python 3.11.4 documentation
User code can create subclasses that inherit from an exception type. It's recommended to only subclass one exception type at a time to...
Read more >
How to Solve Java List UnsupportedOperationException?
It is thrown to indicate that the requested operation is not supported. This class is a member of the Java Collections Framework.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found