You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading FSharp.Data.SqlClient to the latest version of the SDK, I am seeing compile-time errors for tests using SqlEnumProvider, which is a generative provider. At design time, the provided types are working as expected.
The error at compile time:
A problem occurred writing the binary 'C:\code\FSharp.Data.SqlClient\src\SqlClient.Tests\obj\Debug\net451\SqlClient.Tests.dll': Error in pass3 for type FSharp.Data.EnumTests, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Parse", "TinyIntMapping"), error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown.
I also see the following in the output:
1>output error FS0073: error : One of your modules expects the type 'FSharp.Data.EnumTests.TinyIntMapping' to be defined within the module being emitted. You may be missing an input file
1>output error FS0073: error : The local field Items was referenced but not declared
1>output error FS0073: error : One of your modules expects the type 'FSharp.Data.EnumTests.TinyIntMapping' to be defined within the module being emitted. You may be missing an input file
I was able to resolve this issue - we were incorrectly adding both the root types and the provider type to the executing assembly. After updating usage to match the example in the template, the compiler error is resolved.
I'm now seeing a different issue, but it may not be related - going to investigate a bit more before I close this. Please don't spend any time on this for now!
Description
After upgrading FSharp.Data.SqlClient to the latest version of the SDK, I am seeing compile-time errors for tests using
SqlEnumProvider
, which is a generative provider. At design time, the provided types are working as expected.The error at compile time:
I also see the following in the output:
Repro steps
Fetch the branch used here: Update to latest version of SDK FSharp.Data.SqlClient#315
Run
build.fsx
, type provider will build but tests will fail to compile.Open Tests.sln and observe that design-time behavior in
SqlEnumTests.fs
is as expected.Expected behavior
SqlClient.Tests project should compile.
Actual behavior
Error when compiling SqlClient.Tests.
Known workarounds
None
Related information
The text was updated successfully, but these errors were encountered: