Skip to content

Commit

Permalink
.NET Core and new project parser for old fsproj/fsx (#224)
Browse files Browse the repository at this point in the history
.NET Core and new project parser for old fsproj/fsx

## .net core fsac

add .net core 2.0 fsautocomplete console app.

Published as FDD in `bin/release_netcore`
Packaged in `bin/pkgs/fsautocomplete.netcore.zip`

Notes:

- no TP (not supported by FCS netstandard)
- use new project parser based on `Dotnet.ProjInfo` for old fsproj/fsx
 - bump to suave v2 (was v2)
- integration tests for netcore fsac in http/stdio mode

## new project parser for old fsproj

use `Donet.ProjInfo` instead of `ProjectCracker. more info in https://github.com/enricosada/dotnet-proj-info/releases/tag/v0.8.0

Notes:

- require mono/.net installed
- in mono, the `msbuild` in `PATH` is used

## new parser of default references for fsx

use `Donet.ProjInfo` instead of `ProjectCracker. more info in https://github.com/enricosada/dotnet-proj-info/releases/tag/v0.9.0

Notes:

- require mono/.net installed
- in mono, the `msbuild` in `PATH` is used

## additional

- package the .net fsac in `bin/pkgs/fsautocomplete.zip`
- bump to `FSharpLint` v0.9.0-beta
  • Loading branch information
enricosada committed Oct 29, 2017
1 parent 30993f8 commit 6ee483f
Show file tree
Hide file tree
Showing 48 changed files with 2,043 additions and 296 deletions.
4 changes: 2 additions & 2 deletions .paket/Paket.Restore.targets
Expand Up @@ -30,7 +30,7 @@
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
</PropertyGroup>

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

<!-- Step 1 Check if lockfile is properly restored -->
<PropertyGroup>
Expand Down Expand Up @@ -88,7 +88,7 @@
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)"' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />

<!-- This shouldn't actually happen, but just to be sure. -->
<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'." />
<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'." />

<!-- Step 4 forward all msbuild properties (PackageReference, DotNetCliToolReference) to msbuild -->
<ReadLinesFromFile Condition="Exists('$(PaketResolvedFilePath)')" File="$(PaketResolvedFilePath)" >
Expand Down
20 changes: 14 additions & 6 deletions .travis.yml
Expand Up @@ -4,26 +4,34 @@ dist: trusty
sudo: false

script:
- ./build.sh Test
- ./build.sh All

matrix:
include:
- mono: 4.8.1
dotnet: 1.0.4
dotnet: 2.0.0
env:
- FSAC_TESTSUITE_NETCORE_MODE_STDIO=0
- FSAC_TESTSUITE_NETCORE_MODE_HTTP=0
- mono: 5.0.1
dotnet: 1.0.4
dotnet: 2.0.0
env:
- FSAC_TESTSUITE_NETCORE_MODE_HTTP=0
- mono: 5.2.0
dotnet: 1.0.4
dotnet: 2.0.0
env:
- FSAC_TESTSUITE_CROSSGEN_NETFX=1 #works on 5.0
- FSAC_TESTSUITE_NETCORE_MODE_HTTP=0
- mono: latest # => "stable release"
dotnet: 1.0.4
dotnet: 2.0.0
env:
- FSAC_TESTSUITE_CROSSGEN_NETFX=1 #works on 5.0
- FSAC_TESTSUITE_NETCORE_MODE_HTTP=0
- mono: weekly # => "latest commits"
dotnet: 1.0.4
dotnet: 2.0.0
env:
- FSAC_TESTSUITE_CROSSGEN_NETFX=1 #works on 5.0
- FSAC_TESTSUITE_NETCORE_MODE_HTTP=0

allow_failures:
- mono: latest
Expand Down
86 changes: 86 additions & 0 deletions FsAutoComplete.netcore.sln
@@ -0,0 +1,86 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3BF56A5B-20D9-4A2B-94B6-C1C2A6AB444E}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete", "src\FsAutoComplete.netcore\FsAutoComplete.fsproj", "{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Core", "src\FsAutoComplete.Core.netcore\FsAutoComplete.Core.fsproj", "{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A6B07596-9854-4E9D-BA7E-41B21324EB27}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Tests", "test\FsAutoComplete.Tests.netcore\FsAutoComplete.Tests.fsproj", "{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Core.VerboseSdkHelper", "src\FsAutoComplete.Core.VerboseSdkHelper\FsAutoComplete.Core.VerboseSdkHelper.fsproj", "{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|x64.ActiveCfg = Debug|x64
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|x64.Build.0 = Debug|x64
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|x86.ActiveCfg = Debug|x86
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Debug|x86.Build.0 = Debug|x86
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|Any CPU.Build.0 = Release|Any CPU
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|x64.ActiveCfg = Release|x64
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|x64.Build.0 = Release|x64
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|x86.ActiveCfg = Release|x86
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7}.Release|x86.Build.0 = Release|x86
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|x64.ActiveCfg = Debug|x64
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|x64.Build.0 = Debug|x64
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|x86.ActiveCfg = Debug|x86
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Debug|x86.Build.0 = Debug|x86
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|Any CPU.Build.0 = Release|Any CPU
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|x64.ActiveCfg = Release|x64
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|x64.Build.0 = Release|x64
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|x86.ActiveCfg = Release|x86
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8}.Release|x86.Build.0 = Release|x86
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|x64.ActiveCfg = Debug|x64
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|x64.Build.0 = Debug|x64
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|x86.ActiveCfg = Debug|x86
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Debug|x86.Build.0 = Debug|x86
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|Any CPU.Build.0 = Release|Any CPU
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|x64.ActiveCfg = Release|x64
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|x64.Build.0 = Release|x64
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|x86.ActiveCfg = Release|x86
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5}.Release|x86.Build.0 = Release|x86
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|x64.ActiveCfg = Debug|x64
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|x64.Build.0 = Debug|x64
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|x86.ActiveCfg = Debug|x86
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Debug|x86.Build.0 = Debug|x86
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|Any CPU.Build.0 = Release|Any CPU
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|x64.ActiveCfg = Release|x64
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|x64.Build.0 = Release|x64
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|x86.ActiveCfg = Release|x86
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A1213D84-6BB1-4C92-99AC-53A6C8F2E0A7} = {3BF56A5B-20D9-4A2B-94B6-C1C2A6AB444E}
{70D76F8C-2B0D-43B7-8A80-46EC355E68C8} = {3BF56A5B-20D9-4A2B-94B6-C1C2A6AB444E}
{9C83F8C4-226C-4608-B942-DF9C5A5E3BC5} = {A6B07596-9854-4E9D-BA7E-41B21324EB27}
{CBC5A8FC-9FCA-4B77-9654-EBF459CBE199} = {3BF56A5B-20D9-4A2B-94B6-C1C2A6AB444E}
EndGlobalSection
EndGlobal
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -49,6 +49,8 @@ There are [unit tests](test/FsAutoComplete.Tests) for FSharp.CompilerBinding, wh

### Project file loading issues

#### Old sdk project (verbose fsproj)

Try invoking the binary for project file cracking directly:

mono FSharp.Compiler.Service.ProjectCrackerTool.exe --text <path to>/MyProject.fsproj true
Expand Down
10 changes: 9 additions & 1 deletion appveyor.yml
Expand Up @@ -2,7 +2,15 @@ image:
- Visual Studio 2015
- Visual Studio 2017

before_build:
- ps: >-
$env:FSAC_TESTSUITE_MSBUILD_TOOLSVERSION_4_INSTALLED = if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2017") { "0" } else { "1" };
build_script:
- cmd: build.cmd Test
- cmd: build.cmd All

test: off

artifacts:
- path: bin\pkgs\*.zip
name: pkgs
4 changes: 2 additions & 2 deletions build.cmd
Expand Up @@ -13,6 +13,6 @@ if errorlevel 1 (

IF NOT EXIST build.fsx (
.paket\paket.exe update
packages\FAKE\tools\FAKE.exe init.fsx
packages\build\FAKE\tools\FAKE.exe init.fsx
)
packages\FAKE\tools\FAKE.exe build.fsx %*
packages\build\FAKE\tools\FAKE.exe build.fsx %*

0 comments on commit 6ee483f

Please sign in to comment.