fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
572 stars 146 forks source link

Adding package crashes (aborts) Visual Studio for Mac (7.8.3.2 or 8.0 preview) #606

Closed sushihangover closed 5 years ago

sushihangover commented 5 years ago

Description

Adding the SQLProvider package to a NetStandard2.0 Library package causes an app termination of VS4M. 100% repeatable adding it to any NetStandard2.0 Library (C# or F# based).

Note: Once the package is added, the only way to recover is to manually remove the "PackageReference" for the .fsproj file:

<PackageReference Include="SQLProvider" Version="1.1.59" />

Microsoft.FSharp.Compiler.Tainted:

ProviderImplementation.ProvidedTypes.ProvidedTypesContext.convTypeDefToTgt (System.Type x) [0x0000c] in <5c7abc15ba6c01eea745038315bc7a5c>:0 
  at <StartupCode$FSharp-Data-SqlProvider>.$ProvidedTypes+clo@9151-167.Microsoft-FSharp-Core-CompilerServices-IProvidedNamespace-GetTypes () [0x0002f] in <5c7abc15ba6c01eea745038315bc7a5c>:0 
  at Microsoft.FSharp.Compiler.Tainted`1[T].Protect[a] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] f, Microsoft.FSharp.Compiler.Range+range range) [0x00000] in <5b0f50bc36f83639a7450383bc500f5b>:0 

Repro steps

Add SQLProvider package to F# project (NetStd2.0 library in this case)

<PackageReference Include="SQLProvider" Version="1.1.59" />

Expected behavior

Not to crash the IDE

Related information

Microsoft (R) F# Compiler version 4.1

=== Visual Studio Community 2017 for Mac ===

Version 7.8.3 (build 2)

=== Mono Framework MDK ===

Runtime:
    Mono 5.18.0.268 (2018-08/68aad3b0eb7) (64-bit)
    Package version: 518000268

=== Operating System ===

Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
    Tue Jan  8 18:47:02 PST 2019
    root:xnu-4570.71.26~1/RELEASE_X86_64 x86_64
Thorium commented 5 years ago

Duplicate of #600

Thorium commented 5 years ago

Also https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues/292

sushihangover commented 5 years ago

@Thorium

Thanks, totally missed the referenced issue. I guess I'll go back to C# (again) to complete this project.

Thorium commented 5 years ago

I think this is not SQLProvider problem but rather the new .NET Standard is not yet production ready quality. .NET Framework works prefectly though. Have fun with C#.

Thorium commented 5 years ago

Should be working in 1.1.61.