Skip to content

Commit

Permalink
Update Yaaf.FSharp.Scripting (now uses the 4.5 reference assemblies).…
Browse files Browse the repository at this point in the history
… Fixes crash with C# extension methods when the assembly containing them was build against net45. Fixes #201. (Might fix) References #328, #325, #139
  • Loading branch information
matthid committed Sep 20, 2015
1 parent 40797b0 commit 53062bb
Show file tree
Hide file tree
Showing 7 changed files with 400 additions and 382 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.suo
.fake/
.vs/
bin/
obj/
paket-files/
Expand Down
4 changes: 2 additions & 2 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NUGET
remote: http://nuget.org/api/v2
specs:
CommandLineParser (1.9.71)
FAKE (4.3.4)
FAKE (4.4.2)
FSharp.Compiler.Service (0.0.90)
FSharpVSPowerTools.Core (1.9.0)
FSharp.Compiler.Service (>= 0.0.90)
Expand All @@ -17,4 +17,4 @@ NUGET
GITHUB
remote: matthid/Yaaf.FSharp.Scripting
specs:
src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs (1823a75ec30e022c1a086b32c773d5a6ddd0db00)
src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs (25170f50dabf631b6ec319d12c78b5276370f418)
2 changes: 1 addition & 1 deletion tests/FSharp.MetadataFormat.Tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="2.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="2.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommandLine" publicKeyToken="de6f01bd326f8c32" culture="neutral" />
Expand Down
741 changes: 375 additions & 366 deletions tests/FSharp.MetadataFormat.Tests/Tests.fs

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions tests/FSharp.MetadataFormat.Tests/files/FsLib/FsLib2.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<OutputType>Library</OutputType>
<RootNamespace>FsLib</RootNamespace>
<AssemblyName>FsLib2</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.3.0.0</TargetFSharpCoreVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<Name>FsLib1</Name>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
18 changes: 18 additions & 0 deletions tests/FSharp.MetadataFormat.Tests/files/FsLib/Library1.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,21 @@ type Record =
/// Additional members
member x.Foo = 0
member x.Foo2() = 0

type ITestInterface =
abstract Test : unit -> RazorEngine.Templating.IRazorEngineService
abstract FixScript : string -> string

/// Issue 201 docs
[<System.Runtime.CompilerServices.Extension>]
module Test_Issue201 =
/// Extension docs
[<System.Runtime.CompilerServices.Extension>]
let MyExtension (o : ITestInterface) =
ignore <| o.Test().GetKey(null)

[<AutoOpen>]
module Test_Issue201Extensions =
type ITestInterface with
member x.MyExtension() =
Test_Issue201.MyExtension x
11 changes: 0 additions & 11 deletions tests/FSharp.MetadataFormat.Tests/files/FsLib/Library2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ type ITestInterface =
/// Issue 201 docs
[<System.Runtime.CompilerServices.Extension>]
module Test_Issue201 =
let internal notImpl () =
(raise <| System.NotSupportedException("Migration is not supported by this type, please implement GetMigrator."))
: 'a
/// Test FixScript_MSSQL Documentation
let FixScript_MSSQL (script:string) = script
/// Test FixScript_MySQL Documentation
let FixScript_MySQL (script:string) =
script.Replace(
"from information_schema.columns where",
"FROM information_schema.columns WHERE table_schema = SCHEMA() AND")

/// Extension docs
[<System.Runtime.CompilerServices.Extension>]
let MyExtension (o : ITestInterface) =
Expand Down

0 comments on commit 53062bb

Please sign in to comment.