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

1. changed signature of AddMember be of Flexible Type #MemberInfo ins… #243

Closed sgtz closed 5 years ago

sgtz commented 6 years ago

…tead of MemberInfo as a convenience

  1. altered the behaviour of the AddMember and AddMemberDelayed, so that each item of a list is patched then queued, not the list patched completely, then queued completely. The difference is subtle, but it appears to be necessary. Previously, if a .ctor was in the member list, while using AddMembers, you'd get an exception. Clue: possibly related to a depth-first creation strategy, but this was also replicated in simpler cases. This is the closest I've come to fixing a root cause without delving deeply into IL. NB. note that TP authors add the .ctor as a separate step. Eventually, I'll be aiming at a fable-like DSL for TPs (stay tuned). This fix is related to that.
dsyme commented 6 years ago

@sgtz

(1) should not be needed, F# does that automatically

(2) could you add a test cases for that

(3) you've got a huge diff because of the removal of whitespace at end of line. Could you undo that or submit it as a separate PR please? thanks

sgtz commented 6 years ago

(1) -- even if it is still an issue after (2), I hope not. (2) -- okay. I'll create an extra directory off of tests/ for this with a separate .fsproj. We can reorganise later. I want to synch environments first (either bash under Windows or a fresh Linux install instead of OSX/Win10). (3) -- the IDE was "helping". I will reduce the diff size.

sgtz commented 6 years ago

@dsyme :: looking to create some tests that could be integrated into a run of build.sh RunTests

To that end, I have a fresh Mint / Ubuntu image to play with with: $ sudo apt-get install dotnet-sdk-2.1 $ sudo apt-get install dotnet-sdk-2.0 $ sudo apt install mono-complete $ sudo apt install mono-dbg $ sudo apt install ca-certificates-mono $ sudo apt-get install fsharp $ sudo apt install referenceassemblies-pcl # not needed though. etc

Is there a separate step to download the 4.5 framework, because I'm getting this error when I run build.sh -- /home/steven/.local/share/dotnetcore/sdk/2.1.201/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found.

Thoughts?

dsyme commented 5 years ago

@sgtz In the name of API stability I'm closing this one, it's ok not to have the flexible annotation here

sgtz commented 5 years ago

@dsyme I ran into NetCore / type provider / Linux issues and planned to come back to this after some time had gone by. I made up a functional layer that was more elegant when utilising #MemberInfo -- I was thinking of releasing that as a helper library at some stage. I'll ping you with fewer diffs next time.