Skip to content

Commit ed8fe39

Browse files
Bump version to 3.1.3
1 parent f852e18 commit ed8fe39

File tree

4 files changed

+38
-25
lines changed

4 files changed

+38
-25
lines changed

.paket/Paket.Restore.targets

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
<!-- Step 1 Check if lockfile is properly restored -->
4444
<PropertyGroup>
4545
<PaketRestoreRequired>true</PaketRestoreRequired>
46-
<NoWarn>$(NoWarn);NU1603</NoWarn>
46+
<NoWarn>$(NoWarn);NU1603;NU1604;NU1605;NU1608</NoWarn>
4747
</PropertyGroup>
4848

4949
<!-- Because ReadAllText is slow on osx/linux, try to find shasum and awk -->
5050
<PropertyGroup>
51-
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
52-
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
51+
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
52+
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
5353
</PropertyGroup>
5454

5555
<!-- If shasum and awk exist get the hashes -->
@@ -60,6 +60,9 @@
6060
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
6161
</Exec>
6262

63+
<!-- Debug whats going on -->
64+
<Message Importance="low" Text="calling paket restore with targetframework=$(TargetFramework) targetframeworks=$(TargetFrameworks)" />
65+
6366
<PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
6467
<!-- if no hash has been done yet fall back to just reading in the files and comparing them -->
6568
<PaketRestoreCachedHash Condition=" '$(PaketRestoreCachedHash)' == '' ">$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))</PaketRestoreCachedHash>
@@ -69,11 +72,19 @@
6972
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
7073
</PropertyGroup>
7174

75+
7276
<!-- Do a global restore if required -->
7377
<Exec Command='$(PaketBootStrapperCommand)' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
7478
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
7579

7680
<!-- Step 2 Detect project specific changes -->
81+
<ItemGroup>
82+
<MyTargetFrameworks Condition="'$(TargetFramework)' != '' " Include="$(TargetFramework)"></MyTargetFrameworks>
83+
<!-- Don't include all frameworks when msbuild explicitly asks for a single one -->
84+
<MyTargetFrameworks Condition="'$(TargetFrameworks)' != '' AND '$(TargetFramework)' == '' " Include="$(TargetFrameworks)"></MyTargetFrameworks>
85+
<PaketResolvedFilePaths Include="@(MyTargetFrameworks -> '$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).%(Identity).paket.resolved')"></PaketResolvedFilePaths>
86+
</ItemGroup>
87+
<Message Importance="low" Text="MyTargetFrameworks=@(MyTargetFrameworks) PaketResolvedFilePaths=@(PaketResolvedFilePaths)" />
7788
<PropertyGroup>
7889
<PaketReferencesCachedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached</PaketReferencesCachedFilePath>
7990
<!-- MyProject.fsproj.paket.references has the highest precedence -->
@@ -82,7 +93,9 @@
8293
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references</PaketOriginalReferencesFilePath>
8394
<!-- paket.references -->
8495
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\paket.references</PaketOriginalReferencesFilePath>
85-
<PaketResolvedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved</PaketResolvedFilePath>
96+
97+
<DoAllResolvedFilesExist>false</DoAllResolvedFilesExist>
98+
<DoAllResolvedFilesExist Condition="Exists(%(PaketResolvedFilePaths.Identity))">true</DoAllResolvedFilesExist>
8699
<PaketRestoreRequired>true</PaketRestoreRequired>
87100
<PaketRestoreRequiredReason>references-file-or-cache-not-found</PaketRestoreRequiredReason>
88101
</PropertyGroup>
@@ -101,33 +114,39 @@
101114
</PropertyGroup>
102115

103116
<!-- Step 2 b detect relevant changes in project file (new targetframework) -->
104-
<PropertyGroup Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' ">
117+
<PropertyGroup Condition=" '$(DoAllResolvedFilesExist)' != 'true' ">
105118
<PaketRestoreRequired>true</PaketRestoreRequired>
106-
<PaketRestoreRequiredReason>target-framework '$(TargetFramework)'</PaketRestoreRequiredReason>
119+
<PaketRestoreRequiredReason>target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)</PaketRestoreRequiredReason>
107120
</PropertyGroup>
108121

109122
<!-- Step 3 Restore project specific stuff if required -->
110123
<Message Condition=" '$(PaketRestoreRequired)' == 'true' " Importance="low" Text="Detected a change ('$(PaketRestoreRequiredReason)') in the project file '$(MSBuildProjectFullPath)', calling paket restore" />
111-
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)"' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
124+
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFrameworks)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' == '' " ContinueOnError="false" />
125+
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFramework)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' != '' " ContinueOnError="false" />
112126

113127
<!-- This shouldn't actually happen, but just to be sure. -->
114-
<Error Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' AND '$(ResolveNuGetPackages)' != 'False' " Text="Paket file '$(PaketResolvedFilePath)' is missing while restoring $(MSBuildProjectFile). Please delete 'paket-files/paket.restore.cached' and call 'paket restore'." />
128+
<PropertyGroup>
129+
<DoAllResolvedFilesExist>false</DoAllResolvedFilesExist>
130+
<DoAllResolvedFilesExist Condition="Exists(%(PaketResolvedFilePaths.Identity))">true</DoAllResolvedFilesExist>
131+
</PropertyGroup>
132+
<Error Condition=" '$(DoAllResolvedFilesExist)' != 'true' AND '$(ResolveNuGetPackages)' != 'False' " Text="One Paket file '@(PaketResolvedFilePaths)' is missing while restoring $(MSBuildProjectFile). Please delete 'paket-files/paket.restore.cached' and call 'paket restore'." />
115133

116134
<!-- Step 4 forward all msbuild properties (PackageReference, DotNetCliToolReference) to msbuild -->
117-
<ReadLinesFromFile Condition="Exists('$(PaketResolvedFilePath)')" File="$(PaketResolvedFilePath)" >
135+
<ReadLinesFromFile Condition="'@(PaketResolvedFilePaths)' != ''" File="%(PaketResolvedFilePaths.Identity)" ><!--Condition="Exists('%(PaketResolvedFilePaths.Identity)')"-->
118136
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
119137
</ReadLinesFromFile>
120138

121-
<ItemGroup Condition=" Exists('$(PaketResolvedFilePath)') AND '@(PaketReferencesFileLines)' != '' " >
139+
<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
122140
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
123141
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
124142
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
125143
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
126144
</PaketReferencesFileLinesInfo>
127145
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
128146
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
129-
<PrivateAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'true'">All</PrivateAssets>
147+
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
130148
<ExcludeAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
149+
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
131150
</PackageReference>
132151
</ItemGroup>
133152

src/Fable.React/Fable.Helpers.React.fs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,8 @@ module rec Props =
158158
| Y1 of obj
159159
| Y2 of obj
160160
| Y of obj
161-
#if !FABLE_COMPILER
162-
| Custom of string * obj
163-
#else
164161
/// If you are searching for a way to provide a value not supported by this DSL then use something like: CSSProp.Custom ("align-content", "center")
165-
static member inline Custom (key: string, value: obj) : SVGAttr = !!(key, value)
166-
#endif
162+
| [<Erase>] Custom of string * obj
167163
interface IProp
168164

169165
type HTMLAttr =
@@ -312,12 +308,10 @@ module rec Props =
312308
| Results of float
313309
| Security of string
314310
| Unselectable of bool
311+
| [<Erase>] Custom of string * obj
315312
#if !FABLE_COMPILER
316-
| Custom of string * obj
317313
| Style of CSSProp list
318314
| Data of string * obj
319-
#else
320-
static member inline Custom (key: string, value: obj) : HTMLAttr = !!(key, value)
321315
#endif
322316
interface IHTMLProp
323317

@@ -727,12 +721,8 @@ module rec Props =
727721
| WritingMode of obj
728722
| ZIndex of obj
729723
| Zoom of obj
730-
#if !FABLE_COMPILER
731-
| Custom of string * obj
732-
#else
733724
/// If you are searching for a way to provide a value not supported by this DSL then use something like: CSSProp.Custom ("align-content", "center")
734-
static member inline Custom (key: string, value: obj) : CSSProp = !!(key, value)
735-
#endif
725+
| [<Erase>] Custom of string * obj
736726

737727
#if FABLE_COMPILER
738728
let inline Style (css: CSSProp list): HTMLAttr =

src/Fable.React/Fable.React.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<Version>3.1.2</Version>
4+
<Version>3.1.3</Version>
55
<TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>

src/Fable.React/RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 3.1.3
2+
3+
* Make `Custom` another DU case instead of static member (see #89)
4+
15
### 3.1.2
26

37
* Include documentation in the package

0 commit comments

Comments
 (0)