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

Add NewUnionCaseUnchecked, also adjust PropertySetUnchecked to have the same signature as PropertySet #247

Closed 7sharp9 closed 6 years ago

7sharp9 commented 6 years ago

This allows the use of NewUnionCaseUnchecked, also the PR unifies the API so that PropertySetUnchecked has the same signature as PropertySet - args being optional.

dsyme commented 6 years ago

Hmm, test failure on appveyor, looks unrelated though:

C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fs(23,20): error FS3033: The type provider 'ProviderImplementation.BasicGenerativeProvider' reported an error: Could not open file for writing (binary mode): C:\Users\appveyor\AppData\Local\Temp\1\tmp4070.dllSystem.IO.IOException: The process cannot access the file 'C:\Users\appveyor\AppData\Local\Temp\1\tmp4070.dll' because it is being used by another process.   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)   at ProviderImplementation.ProvidedTypes.BinaryWriter.writeBinaryAndReportMappings[a,b,c,d,e](String outfile, ILGlobals ilg, FSharpOption`1 pdbfile, a portablePDB, Boolean embeddedPDB, b embedAllSource, c embedSourceList, d sourceLink, Boolean emitTailcalls, Boolean deterministic, Boolean showTimes, e dumpDebugInfo, ILModuleDef modul) [C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fsproj]
C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fs(28,15): error FS0039: The value or constructor 'Generative2' is not defined. [C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fsproj]
C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fs(29,18): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fsproj]
C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fs(30,18): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [C:\projects\fsharp-typeproviders-sdk\examples\BasicProvider.Tests\BasicProvider.Tests.fsproj]
Running build failed.
Error:
System.Exception: Test failed on "test" "examples/BasicProvider.Tests/BasicProvider.Tests.fsproj" --configuration Release 
   at Fake.DotNetCli.Test@298-3.Invoke(String message) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 298
   at Fake.DotNetCli.Test(FSharpFunc`2 setTestParams) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 298
   at FSI_0005.Build.clo@106-16.Invoke(Unit _arg4) in C:\projects\fsharp-typeproviders-sdk\build.fsx:line 126
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626
7sharp9 commented 6 years ago

@dsyme Yeah that looks unrelated, these are just additional unchecked quotations that Im using, and also and API adjustment for consistency.