Skip to content

Commit

Permalink
Update Proj-Info and FCS to support F# 6 and .Net 6 (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel authored Nov 8, 2021
1 parent 1591c84 commit f176825
Show file tree
Hide file tree
Showing 74 changed files with 9,073 additions and 7,024 deletions.
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"commands": [
"reportgenerator"
]
},
"fantomas-tool": {
"version": "4.6.0-alpha-004",
"commands": [
"fantomas"
]
}
}
}
10 changes: 6 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length=120

# The JSON files contain newlines inconsistently
[*.json]
Expand All @@ -16,8 +17,9 @@ insert_final_newline = ignore
[*.md]
trim_trailing_whitespace = false

[*.fs]
indent_size = 2

[*.fsx]
[*.fs, *.fsx]
indent_size = 2
fsharp_max_array_or_list_width=80
fsharp_max_dot_get_expression_width=80
fsharp_max_function_binding_width=80
fsharp_max_value_binding_width=80
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
github_token: ${{ secrets.FSAC_CHECKS_TOKEN }}
set_check_status_from_test_outcome: true
fail_build_on_failed_tests: true
extra_test_parameters: "--no-build /p:AltCover=true /p:AltCoverAssemblyExcludeFilter=System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|Dapper|FSharp.DependencyManager"
extra_test_parameters: "--no-build --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter=System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|Dapper|FSharp.DependencyManager"
skip_check_run: true # something's wrong with the PAT used above, so github checks won't be added
env:
TEST_TIMEOUT_MINUTES: 10
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
116 changes: 60 additions & 56 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,62 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core mode lsp (debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_debug_netcore",
"program": "${workspaceFolder}/src/FsAutoComplete/bin/Debug/net5.0/fsautocomplete.dll",
"args": ["--mode", "lsp"],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "LSP tests",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_lsp_tests",
"program": "${workspaceFolder}/test/FsAutoComplete.Tests.Lsp/bin/Debug/net5.0/FsAutoComplete.Tests.Lsp.dll",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"stopAtEntry": false,
"justMyCode": false,
"symbolOptions": {
"searchPaths": [],
"searchMicrosoftSymbolServer": true,
"searchNuGetOrgSymbolServer": true
},
"sourceLinkOptions": {
"*": {
"enabled": true
}
},
"enableStepFiltering": false,
"args": [
"--filter",
"lsp.Ionide WorkspaceLoader.codefix tests.remove unused binding"
]
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
"sourceLinkOptions": {
"*": {
"enabled": true
}
},
"justMyCode": false
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core mode lsp (debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_debug_netcore",
"program": "${workspaceFolder}/src/FsAutoComplete/bin/Debug/net5.0/fsautocomplete.dll",
"args": [
"--mode",
"lsp"
],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "LSP tests",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_lsp_tests",
"program": "${workspaceFolder}/test/FsAutoComplete.Tests.Lsp/bin/Debug/net5.0/FsAutoComplete.Tests.Lsp.dll",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"stopAtEntry": false,
"justMyCode": false,
"symbolOptions": {
"searchPaths": [],
"searchMicrosoftSymbolServer": true,
"searchNuGetOrgSymbolServer": true
},
"sourceLinkOptions": {
"*": {
"enabled": true
}
]
}
},
"enableStepFiltering": false,
"args": [
"--debug",
"--filter",
"lsp.Ionide WorkspaceLoader.Completion.AutoOpen.with root module with comments and new line before open.completion"
]
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
"sourceLinkOptions": {
"*": {
"enabled": true
}
},
"justMyCode": false
}
]
}
12 changes: 7 additions & 5 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Target.initEnvironment ()
let fsacAssemblies =
"FsAutoComplete|FsAutoComplete.Core|FsAutoComplete.BackgroundServices|LanguageServerProtocol"

let versionProp = "Version", release.AssemblyVersion
let packAsToolProp = "PackAsTool", "true"
let latestReleaseNotesProp = "PackageReleaseNotes", release.Notes |> String.concat "\n"

Target.create "LspTest" (fun _ ->

let msbuildCli : Fake.DotNet.MSBuild.CliArguments =
Expand All @@ -41,6 +45,8 @@ Target.create "LspTest" (fun _ ->
[ "AltCover", "true"
// "AltCoverAssemblyFilter", fsacAssemblies
"AltCoverAssemblyExcludeFilter", "System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|Dapper|FSharp.DependencyManager|FsAutoComplete.Tests.Lsp"
versionProp
latestReleaseNotesProp
]
}
let testOpts (opts: DotNet.TestOptions) =
Expand All @@ -66,10 +72,6 @@ Target.create "ReleaseArchive" (fun _ ->
|> Shell.copy "bin/pkgs"
)

let versionProp = "Version", release.AssemblyVersion
let packAsToolProp = "PackAsTool", "true"
let latestReleaseNotesProp = "PackageReleaseNotes", release.Notes |> String.concat "\n"

Target.create "LocalRelease" (fun _ ->
Directory.ensure "bin/release_netcore"
Shell.cleanDirs [ "bin/release_netcore" ]
Expand Down Expand Up @@ -103,7 +105,7 @@ Target.create "Build" (fun _ ->
DotNet.build (fun p ->
{ p with
Configuration = DotNet.BuildConfiguration.fromString configuration
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [ "Version", release.AssemblyVersion ] } }) "FsAutoComplete.sln"
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [versionProp ] } }) "FsAutoComplete.sln"
)

let ensureGitUser user email =
Expand Down
20 changes: 11 additions & 9 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ storage: none
github TheAngryByrd/FsLibLog:f81cba440bf0476bb4e2262b57a067a0d6ab78a7 src/FsLibLog/FsLibLog.fs

nuget Argu ~> 5.2.0
nuget Fantomas.Client 0.3.1
nuget FSharp.Compiler.Service ~> 39
nuget Ionide.ProjInfo 0.52
nuget Ionide.ProjInfo.FCS 0.52
nuget Ionide.ProjInfo.ProjectSystem 0.52
nuget Fantomas.Client
nuget FSharp.Compiler.Service ~> 41
nuget Ionide.ProjInfo 0.55.0
nuget Ionide.ProjInfo.FCS 0.55.0
nuget Ionide.ProjInfo.ProjectSystem 0.55.0
nuget Ionide.ProjInfo.Sln 0.55.0
nuget Microsoft.Build copy_local:false
nuget Microsoft.Build.Framework copy_local:false
nuget Microsoft.Build.Utilities.Core copy_local:false
Expand All @@ -37,19 +38,20 @@ nuget Serilog
nuget Serilog.Sinks.File
nuget Serilog.Sinks.Console
nuget Serilog.Sinks.Async
nuget Destructurama.FSharp 1.1.1-dev-00035 # prerelease is stable, just has different FSharp.Core version constraints
nuget Destructurama.FSharp
nuget FSharp.UMX
nuget FSharp.Formatting
nuget FsToolkit.ErrorHandling
nuget FSharpx.Async
nuget CliWrap

nuget Microsoft.NET.Test.Sdk ~> 16.8.0
nuget Microsoft.SourceLink.GitHub copy_local:true
nuget Microsoft.NET.Test.Sdk
nuget Dotnet.ReproducibleBuilds copy_local:true
nuget Microsoft.NETFramework.ReferenceAssemblies 1.0.0
nuget Expecto
nuget YoloDev.Expecto.TestSdk ~> 0.11
nuget YoloDev.Expecto.TestSdk
nuget AltCover
nuget GitHubActionsTestLogger

group Build
source https://api.nuget.org/v3/index.json
Expand Down
Loading

0 comments on commit f176825

Please sign in to comment.