Skip to content

Commit 3acf8a0

Browse files
committed
Change to SimpleScaffold
1 parent a7da00b commit 3acf8a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1095
-5970
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = crlf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = false

.gitignore

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ build/
2020
[Bb]in/
2121
[Oo]bj/
2222

23+
2324
# MSTest test Results
2425
[Tt]est[Rr]esult*/
2526
[Bb]uild[Ll]og.*
@@ -170,7 +171,10 @@ $RECYCLE.BIN/
170171
packages/
171172

172173
# Generated documentation folder
173-
docs/output/
174+
docs/formatted/
175+
176+
#ignore local docs
177+
docs/local/
174178

175179
# Temp folder used for publishing docs
176180
temp/
@@ -185,18 +189,7 @@ release.sh
185189
localpackages/
186190
paket-files
187191
*.orig
188-
.paket/paket.exe
189192
docs/content/license.md
190193
docs/content/release-notes.md
191194
.fake
192-
docs/tools/FSharp.Formatting.svclog
193-
/nuget/docs/output/content/tips.js
194-
/nuget/docs/output/content/style_light.css
195-
/nuget/docs/output/content/style.css.bak
196-
/nuget/docs/output/content/style.css
197-
/nuget/docs/output/content/img/github.png
198-
/nuget/docs/output/content/img/github-blue.png
199-
/nuget/docs/files/img/logo.png
200-
/nuget/docs/files/img/logo-template.pdn
201-
/nuget/lib/net40
202-
/nuget/FSharp.Plotly.0.6.0-beta.nuspec
195+
docs/tools/FSharp.Formatting.svclog

.paket/Paket.Restore.targets

Lines changed: 68 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
1919
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
2020
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
21+
22+
<!-- .net core fdd -->
23+
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
24+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
25+
26+
<!-- no extension is a shell script -->
27+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '' ">"$(PaketExePath)"</PaketCommand>
28+
2129
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2230
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2331
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
@@ -30,27 +38,53 @@
3038
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
3139
</PropertyGroup>
3240

33-
<Target Name="PaketRestore" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >
41+
<Target Name="PaketRestore" Condition="'$(PaketRestoreDisabled)' != 'True'" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >
3442

3543
<!-- Step 1 Check if lockfile is properly restored -->
3644
<PropertyGroup>
3745
<PaketRestoreRequired>true</PaketRestoreRequired>
38-
<NoWarn>$(NoWarn);NU1603</NoWarn>
46+
<NoWarn>$(NoWarn);NU1603;NU1604;NU1605;NU1608</NoWarn>
3947
</PropertyGroup>
4048

49+
<!-- Because ReadAllText is slow on osx/linux, try to find shasum and awk -->
50+
<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>
53+
</PropertyGroup>
54+
55+
<!-- If shasum and awk exist get the hashes -->
56+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
57+
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" />
58+
</Exec>
59+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
60+
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
61+
</Exec>
62+
63+
<!-- Debug whats going on -->
64+
<Message Importance="low" Text="calling paket restore with targetframework=$(TargetFramework) targetframeworks=$(TargetFrameworks)" />
65+
4166
<PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
42-
<PaketRestoreCachedHash>$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))</PaketRestoreCachedHash>
43-
<PaketRestoreLockFileHash>$([System.IO.File]::ReadAllText('$(PaketLockFilePath)'))</PaketRestoreLockFileHash>
67+
<!-- if no hash has been done yet fall back to just reading in the files and comparing them -->
68+
<PaketRestoreCachedHash Condition=" '$(PaketRestoreCachedHash)' == '' ">$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))</PaketRestoreCachedHash>
69+
<PaketRestoreLockFileHash Condition=" '$(PaketRestoreLockFileHash)' == '' ">$([System.IO.File]::ReadAllText('$(PaketLockFilePath)'))</PaketRestoreLockFileHash>
4470
<PaketRestoreRequired>true</PaketRestoreRequired>
4571
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '$(PaketRestoreCachedHash)' ">false</PaketRestoreRequired>
4672
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
4773
</PropertyGroup>
4874

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

5380
<!-- 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)" />
5488
<PropertyGroup>
5589
<PaketReferencesCachedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached</PaketReferencesCachedFilePath>
5690
<!-- MyProject.fsproj.paket.references has the highest precedence -->
@@ -59,7 +93,9 @@
5993
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references</PaketOriginalReferencesFilePath>
6094
<!-- paket.references -->
6195
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\paket.references</PaketOriginalReferencesFilePath>
62-
<PaketResolvedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved</PaketResolvedFilePath>
96+
97+
<DoAllResolvedFilesExist>false</DoAllResolvedFilesExist>
98+
<DoAllResolvedFilesExist Condition="Exists(%(PaketResolvedFilePaths.Identity))">true</DoAllResolvedFilesExist>
6399
<PaketRestoreRequired>true</PaketRestoreRequired>
64100
<PaketRestoreRequiredReason>references-file-or-cache-not-found</PaketRestoreRequiredReason>
65101
</PropertyGroup>
@@ -78,30 +114,39 @@
78114
</PropertyGroup>
79115

80116
<!-- Step 2 b detect relevant changes in project file (new targetframework) -->
81-
<PropertyGroup Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' ">
117+
<PropertyGroup Condition=" '$(DoAllResolvedFilesExist)' != 'true' ">
82118
<PaketRestoreRequired>true</PaketRestoreRequired>
83-
<PaketRestoreRequiredReason>target-framework '$(TargetFramework)'</PaketRestoreRequiredReason>
119+
<PaketRestoreRequiredReason>target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)</PaketRestoreRequiredReason>
84120
</PropertyGroup>
85121

86122
<!-- Step 3 Restore project specific stuff if required -->
87123
<Message Condition=" '$(PaketRestoreRequired)' == 'true' " Importance="low" Text="Detected a change ('$(PaketRestoreRequiredReason)') in the project file '$(MSBuildProjectFullPath)', calling paket restore" />
88-
<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" />
89126

90127
<!-- This shouldn't actually happen, but just to be sure. -->
91-
<Error Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' " Text="A paket file for the framework '$(TargetFramework)' is missing. 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'." />
92133

93134
<!-- Step 4 forward all msbuild properties (PackageReference, DotNetCliToolReference) to msbuild -->
94-
<ReadLinesFromFile Condition="Exists('$(PaketResolvedFilePath)')" File="$(PaketResolvedFilePath)" >
135+
<ReadLinesFromFile Condition="'@(PaketResolvedFilePaths)' != ''" File="%(PaketResolvedFilePaths.Identity)" ><!--Condition="Exists('%(PaketResolvedFilePaths.Identity)')"-->
95136
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
96137
</ReadLinesFromFile>
97138

98-
<ItemGroup Condition=" Exists('$(PaketResolvedFilePath)') AND '@(PaketReferencesFileLines)' != '' " >
139+
<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
99140
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
100141
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
101142
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
143+
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
102144
</PaketReferencesFileLinesInfo>
103145
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
104146
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
147+
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
148+
<ExcludeAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
149+
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
105150
</PackageReference>
106151
</ItemGroup>
107152

@@ -123,9 +168,10 @@
123168
</DotNetCliToolReference>
124169
</ItemGroup>
125170

171+
<!-- Disabled for now until we know what to do with runtime deps - https://github.com/fsprojects/Paket/issues/2964
126172
<PropertyGroup>
127173
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
128-
</PropertyGroup>
174+
</PropertyGroup> -->
129175

130176
</Target>
131177

@@ -136,15 +182,21 @@
136182
</Target>
137183

138184
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
185+
<ItemGroup>
186+
<_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
187+
</ItemGroup>
188+
139189
<PropertyGroup>
140190
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
141191
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
142192
<UseNewPack>false</UseNewPack>
143193
<UseNewPack Condition=" '$(NuGetToolVersion)' != '4.0.0' ">true</UseNewPack>
194+
<AdjustedNuspecOutputPath>$(BaseIntermediateOutputPath)$(Configuration)</AdjustedNuspecOutputPath>
195+
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(BaseIntermediateOutputPath)</AdjustedNuspecOutputPath>
144196
</PropertyGroup>
145197

146198
<ItemGroup>
147-
<_NuspecFiles Include="$(BaseIntermediateOutputPath)*.nuspec"/>
199+
<_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/>
148200
</ItemGroup>
149201

150202
<Exec Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' Condition="@(_NuspecFiles) != ''" />
@@ -153,6 +205,7 @@
153205
<Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
154206
</ConvertToAbsolutePath>
155207

208+
156209
<!-- Call Pack -->
157210
<PackTask Condition="$(UseNewPack)"
158211
PackItem="$(PackProjectInputFile)"
@@ -188,7 +241,7 @@
188241
Serviceable="$(Serviceable)"
189242
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
190243
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
191-
NuspecOutputPath="$(BaseIntermediateOutputPath)"
244+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
192245
IncludeBuildOutput="$(IncludeBuildOutput)"
193246
BuildOutputFolder="$(BuildOutputTargetFolder)"
194247
ContentTargetFolders="$(ContentTargetFolders)"
@@ -230,7 +283,7 @@
230283
Serviceable="$(Serviceable)"
231284
AssemblyReferences="@(_References)"
232285
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
233-
NuspecOutputPath="$(BaseIntermediateOutputPath)"
286+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
234287
IncludeBuildOutput="$(IncludeBuildOutput)"
235288
BuildOutputFolder="$(BuildOutputTargetFolder)"
236289
ContentTargetFolders="$(ContentTargetFolders)"

.paket/paket.bootstrapper.exe

-27.5 KB
Binary file not shown.

.paket/paket.exe

62.8 KB
Binary file not shown.

.paket/paket.targets

Lines changed: 0 additions & 36 deletions
This file was deleted.

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
language: csharp
2+
mono: latest # until https://github.com/dotnet/sdk/issues/335 is solved we don't have the full benefit of mono
3+
dotnet: 2.1.101
24

3-
sudo: false # use the new container-based Travis infrastructure
5+
sudo: false # use the new container-based Travis infrastructure
46

57
before_install:
68
- chmod +x build.sh
7-
8-
script:
9-
- ./build.sh All
9+
10+
script:
11+
- ./build.sh RunTests

0 commit comments

Comments
 (0)