Skip to content

Commit 78ea91a

Browse files
committed
Release version 6.0.0
1 parent 94838b6 commit 78ea91a

File tree

4 files changed

+51
-54
lines changed

4 files changed

+51
-54
lines changed

.paket/Paket.Restore.targets

+39-52
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
<PaketBootstrapperStyle Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">proj</PaketBootstrapperStyle>
2121
<PaketExeImage>assembly</PaketExeImage>
2222
<PaketExeImage Condition=" '$(PaketBootstrapperStyle)' == 'proj' ">native</PaketExeImage>
23-
<MonoPath Condition="'$(MonoPath)' == '' AND Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
23+
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
2424
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
2525

2626
<!-- PaketBootStrapper -->
2727
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2828
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2929
<PaketBootStrapperExeDir Condition=" Exists('$(PaketBootStrapperExePath)') " >$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\</PaketBootStrapperExeDir>
30-
31-
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' ">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
30+
31+
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
3232
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
3333

34-
<!-- Disable automagic references for F# DotNet SDK -->
34+
<!-- Disable automagic references for F# dotnet sdk -->
3535
<!-- This will not do anything for other project types -->
3636
<!-- see https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1002-fsharp-in-dotnet-sdk.md -->
3737
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@@ -40,68 +40,55 @@
4040
<!-- Disable Paket restore under NCrunch build -->
4141
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
4242

43-
<!-- Disable test for CLI tool completely - overrideable via properties in projects or via environment variables -->
44-
<PaketDisableCliTest Condition=" '$(PaketDisableCliTest)' == '' ">False</PaketDisableCliTest>
45-
4643
<PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath>
4744
</PropertyGroup>
4845

49-
<!-- Resolve how paket should be called -->
50-
<!-- Current priority is: local (1: repo root, 2: .paket folder) => 3: as CLI tool => as bootstrapper (4: proj Bootstrapper style, 5: BootstrapperExeDir) => 6: global path variable -->
46+
<!-- Check if paket is available as local dotnet cli tool -->
5147
<Target Name="SetPaketCommand" >
52-
<!-- Test if paket is available in the standard locations. If so, that takes priority. Case 1/2 - non-windows specific -->
53-
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' ">
54-
<!-- no windows, try native paket as default, root => tool -->
55-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket') ">$(PaketRootPath)paket</PaketExePath>
56-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketToolsPath)paket') ">$(PaketToolsPath)paket</PaketExePath>
57-
</PropertyGroup>
48+
49+
<!-- Call 'dotnet paket' and see if it returns without an error. Mute all the output. -->
50+
<Exec Command="dotnet paket --version" IgnoreExitCode="true" StandardOutputImportance="low" StandardErrorImportance="low" >
51+
<Output TaskParameter="ExitCode" PropertyName="LocalPaketToolExitCode" />
52+
</Exec>
5853

59-
<!-- Test if paket is available in the standard locations. If so, that takes priority. Case 2/2 - same across platforms -->
60-
<PropertyGroup>
61-
<!-- root => tool -->
62-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath>
63-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath>
54+
<!-- If local paket tool is found, use that -->
55+
<PropertyGroup Condition=" '$(LocalPaketToolExitCode)' == '0' ">
56+
<InternalPaketCommand>dotnet paket</InternalPaketCommand>
6457
</PropertyGroup>
6558

66-
<!-- If paket hasn't be found in standard locations, test for CLI tool usage. -->
67-
<!-- First test: Is CLI configured to be used in "dotnet-tools.json"? - can result in a false negative; only a positive outcome is reliable. -->
68-
<PropertyGroup Condition=" '$(PaketExePath)' == '' ">
69-
<_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json"))</_DotnetToolsJson>
70-
<_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"'))</_ConfigContainsPaket>
71-
<_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false</_ConfigContainsPaket>
72-
</PropertyGroup>
59+
<!-- If not, then we go through our normal steps of setting the Paket command. -->
60+
<PropertyGroup Condition=" '$(LocalPaketToolExitCode)' != '0' ">
61+
<!-- windows, root => tool => proj style => bootstrapper => global -->
62+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath>
63+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath>
64+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket.exe</PaketExePath>
65+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketBootStrapperExeDir)') ">$(_PaketBootStrapperExeDir)paket.exe</PaketExePath>
66+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' ">paket.exe</PaketExePath>
7367

74-
<!-- Second test: Call 'dotnet paket' and see if it returns without an error. Mute all the output. Only run if previous test failed and the test has not been disabled. -->
75-
<!-- WARNING: This method can lead to processes hanging forever, and should be used as little as possible. See https://github.com/fsprojects/Paket/issues/3705 for details. -->
76-
<Exec Condition=" '$(PaketExePath)' == '' AND !$(PaketDisableCliTest) AND !$(_ConfigContainsPaket)" Command="dotnet paket --version" IgnoreExitCode="true" StandardOutputImportance="low" StandardErrorImportance="low" >
77-
<Output TaskParameter="ExitCode" PropertyName="LocalPaketToolExitCode" />
78-
</Exec>
68+
<!-- no windows, try native paket as default, root => tool => proj style => mono paket => bootstrpper => global -->
69+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketRootPath)paket') ">$(PaketRootPath)paket</PaketExePath>
70+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketToolsPath)paket') ">$(PaketToolsPath)paket</PaketExePath>
71+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket</PaketExePath>
7972

80-
<!-- If paket is installed as CLI use that. Again, only if paket haven't already been found in standard locations. -->
81-
<PropertyGroup Condition=" '$(PaketExePath)' == '' AND ($(_ConfigContainsPaket) OR '$(LocalPaketToolExitCode)' == '0') ">
82-
<_PaketCommand>dotnet paket</_PaketCommand>
83-
</PropertyGroup>
73+
<!-- no windows, try mono paket -->
74+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath>
75+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath>
8476

85-
<!-- If neither local files nor CLI tool can be found, final attempt is searching for boostrapper config before falling back to global path variable. -->
86-
<PropertyGroup Condition=" '$(PaketExePath)' == '' AND '$(_PaketCommand)' == '' ">
87-
<!-- Test for bootstrapper setup -->
88-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket</PaketExePath>
89-
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketBootStrapperExeDir)') ">$(PaketBootStrapperExeDir)paket</PaketExePath>
77+
<!-- no windows, try bootstrapper -->
78+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExeDir)') ">$(PaketBootStrapperExeDir)paket.exe</PaketExePath>
9079

91-
<!-- If all else fails, use global path approach. -->
92-
<PaketExePath Condition=" '$(PaketExePath)' == ''">paket</PaketExePath>
93-
</PropertyGroup>
80+
<!-- no windows, try global native paket -->
81+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' ">paket</PaketExePath>
9482

95-
<!-- If not using CLI, setup correct execution command. -->
96-
<PropertyGroup Condition=" '$(_PaketCommand)' == '' ">
9783
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
98-
<_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</_PaketCommand>
99-
<_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</_PaketCommand>
100-
<_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)"</_PaketCommand>
84+
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</InternalPaketCommand>
85+
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</InternalPaketCommand>
86+
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' ">"$(PaketExePath)"</InternalPaketCommand>
87+
10188
</PropertyGroup>
10289

10390
<!-- The way to get a property to be available outside the target is to use this task. -->
104-
<CreateProperty Value="$(_PaketCommand)">
91+
<CreateProperty Value="$(InternalPaketCommand)">
10592
<Output TaskParameter="Value" PropertyName="PaketCommand"/>
10693
</CreateProperty>
10794

@@ -136,7 +123,7 @@
136123
<!-- Parse our simple 'paket.restore.cached' json ...-->
137124
<PaketRestoreCachedSplitObject Include="$([System.Text.RegularExpressions.Regex]::Split(`$(PaketRestoreCachedContents)`, `{|}|,`))"></PaketRestoreCachedSplitObject>
138125
<!-- Keep Key, Value ItemGroup-->
139-
<PaketRestoreCachedKeyValue Include="@(PaketRestoreCachedSplitObject)"
126+
<PaketRestoreCachedKeyValue Include="@(PaketRestoreCachedSplitObject)"
140127
Condition=" $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `&quot;: &quot;`).Length) &gt; 1 ">
141128
<Key>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))</Key>
142129
<Value>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))</Value>
@@ -169,7 +156,7 @@
169156
<Exec Command='$(PaketBootStrapperCommand)' Condition=" '$(PaketBootstrapperStyle)' == 'classic' AND Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
170157
<Error Text="Stop build because of PAKET_ERROR_ON_MSBUILD_EXEC and we need a full restore (hashes don't match)" Condition=" '$(PAKET_ERROR_ON_MSBUILD_EXEC)' == 'true' AND '$(PaketRestoreRequired)' == 'true' AND '$(PaketDisableGlobalRestore)' != 'true'" />
171158
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(PaketDisableGlobalRestore)' != 'true' " ContinueOnError="false" />
172-
159+
173160
<!-- Step 2 Detect project specific changes -->
174161
<ItemGroup>
175162
<MyTargetFrameworks Condition="'$(TargetFramework)' != '' " Include="$(TargetFramework)"></MyTargetFrameworks>

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## 6.0.0 - 2021-07-06
10+
11+
### Added
12+
13+
* Expose `Helpers` from `Decode` module so users can consume it when writting custom decoders
14+
15+
### Changed
16+
17+
* Remove `[<Inject>]` use in favor of `inline` to prepare for Fable 4
18+
919
## 5.1.0 - 2021-01-13
1020

1121
### Fixed

nacara.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
editUrl: "https://github.com/thoth-org/Thoth.Json/edit/master/docs",
1111
title: "Thoth.Json",
1212
debug: true,
13-
version: "5.1.0",
13+
version: "6.0.0",
1414
navbar: {
1515
showVersion: true,
1616
links: [

src/Thoth.Json.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you are interested on using it against .NET Core or .NET Framework, please us
1111
<RepositoryUrl>https://github.com/thoth-org/Thoth.Json</RepositoryUrl>
1212
<PackageTags>fable;fsharp;json</PackageTags>
1313
<Authors>Maxime Mangel</Authors>
14-
<Version>5.1.0</Version>
14+
<Version>6.0.0</Version>
1515
</PropertyGroup>
1616
<PropertyGroup>
1717
<TargetFramework>netstandard2.0</TargetFramework>

0 commit comments

Comments
 (0)