Skip to content

Commit

Permalink
Merge pull request #26 from mchylek/master
Browse files Browse the repository at this point in the history
Add support for additional TFM's
  • Loading branch information
eiriktsarpalis authored Mar 17, 2022
2 parents 4a421b4 + d507627 commit ccec017
Show file tree
Hide file tree
Showing 22 changed files with 948 additions and 898 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"paket": {
"version": "5.242.2",
"version": "7.0.0-alpha003",
"commands": [
"paket"
]
},
"fake-cli": {
"version": "5.19.1",
"version": "5.22.0",
"commands": [
"fake"
]
Expand Down
79 changes: 71 additions & 8 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
This value should match the version in the props generated by paket
If they differ, this means we need to do a restore in order to ensure correct dependencies
-->
<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.185.3' ">
<PropertyGroup Condition="'$(PaketPropsVersion)' != '6.0.0' ">
<PaketRestoreRequired>true</PaketRestoreRequired>
</PropertyGroup>

Expand Down Expand Up @@ -236,13 +236,16 @@
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
<CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
</PaketReferencesFileLinesInfo>
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.ImportTargets) == 'false'">$(ExcludeAssets);build;buildMultitargeting;buildTransitive</ExcludeAssets>
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
<AllowExplicitVersion>true</AllowExplicitVersion>
</PackageReference>
Expand Down Expand Up @@ -289,14 +292,16 @@
<PropertyGroup>
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
<UseMSBuild16_10_Pack>false</UseMSBuild16_10_Pack>
<UseMSBuild16_10_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND '@(MSBuildMinorVersion)' > '10' ">true</UseMSBuild16_10_Pack>
<UseMSBuild16_0_Pack>false</UseMSBuild16_0_Pack>
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' ">true</UseMSBuild16_0_Pack>
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild16_0_Pack>
<UseMSBuild15_9_Pack>false</UseMSBuild15_9_Pack>
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8' ">true</UseMSBuild15_9_Pack>
<UseMSBuild15_8_Pack>false</UseMSBuild15_8_Pack>
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseMSBuild15_8_Pack>
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild15_8_Pack>
<UseNuGet4_Pack>false</UseNuGet4_Pack>
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseNuGet4_Pack>
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseNuGet4_Pack>
<AdjustedNuspecOutputPath>$(PaketIntermediateOutputPath)\$(Configuration)</AdjustedNuspecOutputPath>
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(PaketIntermediateOutputPath)</AdjustedNuspecOutputPath>
</PropertyGroup>
Expand All @@ -314,6 +319,55 @@
</ConvertToAbsolutePath>

<!-- Call Pack -->
<PackTask Condition="$(UseMSBuild16_10_Pack)"
PackItem="$(PackProjectInputFile)"
PackageFiles="@(_PackageFiles)"
PackageFilesToExclude="@(_PackageFilesToExclude)"
PackageVersion="$(PackageVersion)"
PackageId="$(PackageId)"
Title="$(Title)"
Authors="$(Authors)"
Description="$(Description)"
Copyright="$(Copyright)"
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
LicenseUrl="$(PackageLicenseUrl)"
ProjectUrl="$(PackageProjectUrl)"
IconUrl="$(PackageIconUrl)"
ReleaseNotes="$(PackageReleaseNotes)"
Tags="$(PackageTags)"
DevelopmentDependency="$(DevelopmentDependency)"
BuildOutputInPackage="@(_BuildOutputInPackage)"
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
SymbolPackageFormat="$(SymbolPackageFormat)"
TargetFrameworks="@(_TargetFrameworks)"
AssemblyName="$(AssemblyName)"
PackageOutputPath="$(PackageOutputAbsolutePath)"
IncludeSymbols="$(IncludeSymbols)"
IncludeSource="$(IncludeSource)"
PackageTypes="$(PackageType)"
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Serviceable="$(Serviceable)"
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
IncludeBuildOutput="$(IncludeBuildOutput)"
BuildOutputFolders="$(BuildOutputTargetFolder)"
ContentTargetFolders="$(ContentTargetFolders)"
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
NuspecFile="$(NuspecFileAbsolutePath)"
NuspecBasePath="$(NuspecBasePath)"
NuspecProperties="$(NuspecProperties)"
PackageLicenseFile="$(PackageLicenseFile)"
PackageLicenseExpression="$(PackageLicenseExpression)"
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
Readme="$(PackageReadmeFile)"
NoDefaultExcludes="$(NoDefaultExcludes)"/>

<PackTask Condition="$(UseMSBuild16_0_Pack)"
PackItem="$(PackProjectInputFile)"
PackageFiles="@(_PackageFiles)"
Expand Down Expand Up @@ -343,6 +397,8 @@
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
RepositoryBranch="$(RepositoryBranch)"
RepositoryCommit="$(RepositoryCommit)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Expand All @@ -359,7 +415,8 @@
NuspecProperties="$(NuspecProperties)"
PackageLicenseFile="$(PackageLicenseFile)"
PackageLicenseExpression="$(PackageLicenseExpression)"
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
NoDefaultExcludes="$(NoDefaultExcludes)" />

<PackTask Condition="$(UseMSBuild15_9_Pack)"
PackItem="$(PackProjectInputFile)"
Expand Down Expand Up @@ -390,6 +447,8 @@
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
RepositoryBranch="$(RepositoryBranch)"
RepositoryCommit="$(RepositoryCommit)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Expand Down Expand Up @@ -433,6 +492,8 @@
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
RepositoryBranch="$(RepositoryBranch)"
RepositoryCommit="$(RepositoryCommit)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Expand Down Expand Up @@ -475,6 +536,8 @@
IsTool="$(IsTool)"
RepositoryUrl="$(RepositoryUrl)"
RepositoryType="$(RepositoryType)"
RepositoryBranch="$(RepositoryBranch)"
RepositoryCommit="$(RepositoryCommit)"
SourceFiles="@(_SourceFiles->Distinct())"
NoPackageAnalysis="$(NoPackageAnalysis)"
MinClientVersion="$(MinClientVersion)"
Expand Down
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<!--<IncludeSymbols>true</IncludeSymbols>-->
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
<LibTargetFrameworks>netstandard2.0;netcoreapp3.1</LibTargetFrameworks>
<TestTargetFrameworks>net472;net6.0</TestTargetFrameworks>
</PropertyGroup>

<!-- P2P nuget inlining workaround: c.f. http://yer.ac/blog/2019/09/05/dotnet-pack-project-reference-and-nuget-dependency/ -->
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: Visual Studio 2019
image: Visual Studio 2022
configuration: Release
init:
- git config --global core.autocrlf input
Expand Down
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Target.create "NuGet.Push" (fun _ ->
// Doc generation

Target.create "GenerateDocs" (fun _ ->
let result = DotNet.exec id "fsi" "--define:RELEASE docs/tools/generate.fsx"
let result = DotNet.exec (fun o -> { o with WorkingDirectory = "docs" }) "fsi" "--define:RELEASE tools/generate.fsx"
if not result.OK then failwith "failed to generate docs"
)

Expand Down
6 changes: 6 additions & 0 deletions docs/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "3.1.100",
"rollForward": "latestMinor"
}
}
6 changes: 3 additions & 3 deletions docs/tools/generate.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory
// (the generated documentation is stored in the 'docs/output' directory)
// --------------------------------------------------------------------------------------
#load "../../.paket/load/netstandard2.0/Build/build.group.fsx"
#load "../../.paket/load/netstandard2.0/Formatting/formatting.group.fsx"

open System
open System.IO
Expand Down Expand Up @@ -45,7 +45,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/formatting/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All @@ -62,7 +62,7 @@ let copyFiles () =

let getReferenceAssembliesForProject (proj : string) =
let projName = Path.GetFileName proj
!! (proj @@ "bin/Release/netcoreapp*/" + projName + ".dll") |> Seq.head
!! (proj @@ "bin/Release/netstandard2.0/" + projName + ".dll") |> Seq.head

// Build API reference from XML comments
let buildReference () =
Expand Down
7 changes: 6 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{ "sdk": { "version": "3.0.100", "rollForward": "latestMajor" } }
{
"sdk": {
"version": "6.0.102",
"rollForward": "latestMajor"
}
}
42 changes: 27 additions & 15 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
version 7.0.0-alpha003

source https://api.nuget.org/v3/index.json
framework: netcoreapp3.0
framework: netstandard2.0,netcoreapp3.1
redirects: off
storage: none

nuget FSharp.Core >= 4.3.2 lowest_matching:true
nuget FSharp.Core >= 5.0.1 lowest_matching:true
nuget FsPickler ~> 5.3.2 lowest_matching:true
nuget Mono.Cecil >= 0.11.0 lowest_matching:true

nuget Microsoft.SourceLink.GitHub copy_local:true

group Testing
source https://api.nuget.org/v3/index.json
framework: netcoreapp3.1
framework: net472,net6.0
redirects: off
storage: none

nuget FSharp.Core ~> 4.6
nuget FsPickler ~> 5.2
nuget FSharp.Core >= 5.0.1 lowest_matching:true
nuget FsPickler ~> 5.3.2 lowest_matching:true
nuget Thespian ~> 0.2.0

nuget FSharp.Compiler.Service ~> 34.0.0
nuget FSharp.Compiler.Service ~> 39.0.0
nuget xunit ~> 2.4.1
nuget xunit.runner.visualstudio ~> 2.4.1
nuget Microsoft.Net.Test.SDK ~> 16.4.0
Expand All @@ -35,18 +37,28 @@ group Fsi
nuget MathNet.Numerics.FSharp ~> 4.9.0
nuget MathNet.Numerics.MKL.Win-x64 ~> 2.3.0

group Build
group Formatting
source https://api.nuget.org/v3/index.json
generate_load_scripts: true
framework: netstandard2.0
storage: none

nuget Fake.Core.UserInput ~> 5.19.0
nuget Fake.Core.ReleaseNotes ~> 5.19.0
nuget Fake.Core.Target ~> 5.19.0
nuget Fake.IO.FileSystem ~> 5.19.0
nuget Fake.DotNet.Cli ~> 5.19.0
nuget Fake.Tools.Git ~> 5.19.0
nuget Fake.Api.Github ~> 5.19.0
nuget Fake.IO.FileSystem ~> 5.19.0

nuget FSharp.Compiler.Service ~> 35.0 storage: packages
nuget FSharp.Formatting ~> 4.1.0 storage: packages
nuget FSharp.Formatting.CommandTool ~> 4.1.0 storage: packages

group Build
source https://api.nuget.org/v3/index.json
generate_load_scripts: true
framework: netstandard2.0, net6.0
storage: none

nuget FSharp.Formatting ~> 4.0 prerelease storage: packages
nuget Fake.Core.UserInput ~> 5.22.0
nuget Fake.Core.ReleaseNotes ~> 5.22.0
nuget Fake.Core.Target ~> 5.22.0
nuget Fake.IO.FileSystem ~> 5.22.0
nuget Fake.DotNet.Cli ~> 5.22.0
nuget Fake.Tools.Git ~> 5.22.0
nuget Fake.Api.Github ~> 5.22.0
Loading

0 comments on commit ccec017

Please sign in to comment.