Skip to content

Commit bbdb63b

Browse files
committed
* fixed Callback double free problem
* build updates
1 parent 5c816a0 commit bbdb63b

File tree

13 files changed

+189
-173
lines changed

13 files changed

+189
-173
lines changed

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PUSHD %~dp0
55

66
IF NOT exist .paket\paket.exe (
77
echo installing paket
8-
dotnet tool install Paket --version 6.0.0-alpha014 --tool-path .paket
8+
dotnet tool install Paket --tool-path .paket
99
)
1010

1111
if NOT exist paket.lock (

build.fsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ Target.create "Clean" (fun _ ->
137137
Target.create "Compile" (fun _ ->
138138
let options (o : DotNet.BuildOptions) =
139139
let v = sprintf "%d.%d.%d.%s" notes.SemVer.Major notes.SemVer.Minor notes.SemVer.Patch (string notes.SemVer.Build)
140-
141140
{ o with
142141
Configuration = DotNet.BuildConfiguration.Release
143142

144143
MSBuildParams =
145144
{ o.MSBuildParams with
145+
DisableInternalBinLog = true
146146
Properties =
147147
[
148148
"GenerateAssemblyInfo", "true"
@@ -395,6 +395,7 @@ Target.create "RunTest" (fun _ ->
395395
{ (o.WithRedirectOutput false) with
396396
NoBuild = true
397397
NoRestore = true
398+
MSBuildParams = { o.MSBuildParams with DisableInternalBinLog = true }
398399
Configuration = DotNet.BuildConfiguration.Release
399400
Logger = Some "console;verbosity=normal"
400401
}

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
if [ ! -f .paket/paket ]; then
44
echo installing paket
5-
dotnet tool install Paket --version 6.0.0-alpha014 --tool-path .paket
5+
dotnet tool install Paket --tool-path .paket
66
fi
77

88
if [ ! -f paket.lock ]; then

paket.dependencies

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
version 6.0.0-alpha014
21
source https://api.nuget.org/v3/index.json
32
redirects: off
43
storage: none
54
framework: auto-detect
65

76
nuget FSharp.Core >= 4.6.2 lowest_matching: true
8-
nuget System.Reflection.Emit.Lightweight ~> 4.6.0
7+
nuget System.Reflection.Emit.Lightweight >= 4.6.0 lowest_matching: true
98

109
# Tests : intentionally in main group
1110
nuget FsUnit ~> 3.4.1
@@ -23,13 +22,13 @@ nuget Fable.Browser.Dom ~> 1.1.0
2322
group Build
2423
framework: netstandard2.0
2524
source https://api.nuget.org/v3/index.json
26-
nuget fake-cli ~> 5.16.1
27-
nuget Fake.DotNet.Cli ~> 5.16.1
28-
nuget Fake.Core.Target ~> 5.16.1
29-
nuget Fake.DotNet.Paket ~> 5.16.1
30-
nuget Fake.Core.ReleaseNotes ~> 5.16.1
31-
nuget Fake.Tools.Git ~> 5.16.1
32-
nuget Fake.Api.GitHub ~> 5.16.1
25+
nuget fake-cli ~> 5.19.1
26+
nuget Fake.DotNet.Cli ~> 5.19.1
27+
nuget Fake.Core.Target ~> 5.19.1
28+
nuget Fake.DotNet.Paket ~> 5.19.1
29+
nuget Fake.Core.ReleaseNotes ~> 5.19.1
30+
nuget Fake.Tools.Git ~> 5.19.1
31+
nuget Fake.Api.GitHub ~> 5.19.1
3332

3433
group Docs
3534
framework: net461

paket.lock

Lines changed: 160 additions & 157 deletions
Large diffs are not rendered by default.

src/CSharp.Data.Adaptive/CSharp.Data.Adaptive.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
56
</PropertyGroup>
67
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
78
<OutputPath>..\..\bin\Release\</OutputPath>

src/Demo/CSharpInterop/CSharpInterop.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<LangVersion>8</LangVersion>
6+
<TargetFramework>netcoreapp3.1</TargetFramework>
67
</PropertyGroup>
78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
89
<OutputPath>..\..\..\bin\Release\</OutputPath>

src/Demo/EventInterop/EventInterop.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
67
</PropertyGroup>
78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
89
<OutputPath>..\..\..\bin\Debug\</OutputPath>

src/Demo/Fable/Fable.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
67
</PropertyGroup>
78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
89
<OutputPath>..\..\..\bin\Release\</OutputPath>

src/FSharp.Data.Adaptive/Core/Callbacks.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,21 @@ type internal MultiCallbackObject(table : ConditionalWeakTable<IAdaptiveObject,
5050

5151
cbs <- HashMap.add i cb cbs
5252

53+
#if !FABLE_COMPILER
5354
let mutable self = Unchecked.defaultof<GCHandle>
5455
let result =
5556
{ new IDisposable with
5657
member __.Dispose() =
57-
self.Free()
58+
if self.IsAllocated then self.Free()
5859
remove x i
5960
}
6061
self <- GCHandle.Alloc(result)
6162
result
63+
#else
64+
{ new IDisposable with
65+
member __.Dispose() = remove x i
66+
}
67+
#endif
6268

6369
)
6470

0 commit comments

Comments
 (0)