Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ symbolCache.db
**/.DS_Store
/tmp/
/.fsdocs
/output
/output
/.idea
7 changes: 7 additions & 0 deletions FSharp.Data.Adaptive.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FileSystem", "src\Demo\File
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Scratch", "src\Demo\Scratch\Scratch.fsproj", "{929BB872-3FFF-48E6-ABC7-3E1FB3E72242}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PublishTrimmedTest", "src\Demo\PublishTrimmedTest\PublishTrimmedTest.fsproj", "{11280471-7178-4DC3-9BAD-18411B1AE62B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -66,6 +68,10 @@ Global
{929BB872-3FFF-48E6-ABC7-3E1FB3E72242}.Debug|Any CPU.Build.0 = Debug|Any CPU
{929BB872-3FFF-48E6-ABC7-3E1FB3E72242}.Release|Any CPU.ActiveCfg = Release|Any CPU
{929BB872-3FFF-48E6-ABC7-3E1FB3E72242}.Release|Any CPU.Build.0 = Release|Any CPU
{11280471-7178-4DC3-9BAD-18411B1AE62B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11280471-7178-4DC3-9BAD-18411B1AE62B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11280471-7178-4DC3-9BAD-18411B1AE62B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11280471-7178-4DC3-9BAD-18411B1AE62B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -78,6 +84,7 @@ Global
{D4058F6D-A8D5-4587-AE05-D32A3B99B625} = {B5A29D79-4C76-4148-A69F-814ED1BEEFCE}
{2AE99C0D-703D-4042-9E8D-BF8A66284B0D} = {B5A29D79-4C76-4148-A69F-814ED1BEEFCE}
{929BB872-3FFF-48E6-ABC7-3E1FB3E72242} = {B5A29D79-4C76-4148-A69F-814ED1BEEFCE}
{11280471-7178-4DC3-9BAD-18411B1AE62B} = {B5A29D79-4C76-4148-A69F-814ED1BEEFCE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0E91AEEA-75F2-484D-8E5E-E3322D13C65A}
Expand Down
156 changes: 78 additions & 78 deletions paket.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/CSharp.Data.Adaptive/CSharp.Data.Adaptive.fsproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<TrimMode>link</TrimMode>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\bin\Release\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Demo/Fable/Fable.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
10 changes: 10 additions & 0 deletions src/Demo/PublishTrimmedTest/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open FSharp.Data.Adaptive


let a = cval 10

let b = a |> AVal.map (fun x -> x * 2)
printfn "%A" (AVal.force b)

transact (fun () -> a.Value <- 100)
printfn "%A" (AVal.force b)
21 changes: 21 additions & 0 deletions src/Demo/PublishTrimmedTest/PublishTrimmedTest.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\..\bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\..\bin\Debug\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Data.Adaptive\FSharp.Data.Adaptive.fsproj" />
</ItemGroup>
<Import Project="..\..\..\.paket\Paket.Restore.targets" />
</Project>
2 changes: 2 additions & 0 deletions src/Demo/PublishTrimmedTest/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FSharp.Core
Aardvark.Build
5 changes: 4 additions & 1 deletion src/FSharp.Data.Adaptive/FSharp.Data.Adaptive.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>

<TrimMode>link</TrimMode>
<IsTrimmable>true</IsTrimmable>

<!-- Example ultra-simple styling and generation settings for FsDocs default template-->
<PackageLicenseUrl>https://github.com/fsprojects/FSharp.Data.Adaptive/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://fsprojects.github.io/FSharp.Data.Adaptive</PackageProjectUrl>
Expand Down
7 changes: 5 additions & 2 deletions src/FSharp.Data.Adaptive/ShallowEquality.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace FSharp.Data.Adaptive
open System.Diagnostics.CodeAnalysis


#if FABLE_COMPILER
Expand Down Expand Up @@ -84,7 +85,9 @@ type private HashCodeHelpers private() =
)

static member CombineMethod = combineMeth

#if NET5_0
[<RequiresUnreferencedCode("used by ShallowEqualityComparer")>]
#endif
static member Combine(a : int, b : int) =
uint32 a ^^^ uint32 b + 0x9e3779b9u + ((uint32 a) <<< 6) + ((uint32 a) >>> 2) |> int

Expand Down Expand Up @@ -313,7 +316,7 @@ type ShallowEqualityComparer<'a> private() =
let del = meth.CreateDelegate(typeof<ShallowEqDelegate<'a>>) |> unbox<ShallowEqDelegate<'a>>
fun (a : 'a) (b : 'a) -> del.Invoke(a, b)
else
/// TODO: better way?
// TODO: better way?
fun (a : 'a) (b : 'a) -> false
elif FSharpType.IsUnion(typ, true) && DynamicMethod.IsSupported && not isRecursive then
let cases = FSharpType.GetUnionCases(typ, true)
Expand Down
1 change: 1 addition & 0 deletions startFableDemo.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
pushd src/Demo/Fable
npm install
dotnet fable watch . --outDir .\fable --run webpack serve
1 change: 1 addition & 0 deletions startFableDemo.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /bin/sh
cd src/Demo/Fable
npm install
dotnet fable watch . --outDir ./fable --run webpack serve