fsprojects / FSharp.TypeProviders.SDK

The SDK for creating F# type providers
https://fsprojects.github.io/FSharp.TypeProviders.SDK/
MIT License
298 stars 94 forks source link

Issue with provided type where all arguments are optional #346

Open dsyme opened 3 years ago

dsyme commented 3 years ago

When you have a provided type, it shouldn't have all its arguments optional. We should give a better or warningfor this case

In particular the case where all the arguments are optional AND all the values given in the static parameter instantiation are exactly identical to the optional values causes the resulting type to be unusable.

The best workaround is to make at least one of your static parameters non-optional, or if they have optional values (e.g. because only one of two are expected to be given) then make sure they are dummy values that no one will ever give in practice.