Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Initial support for .NET Core #197

Merged
merged 46 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3b3234c
Further experiment based on #185 showing side-by-side netframework an…
cgravill Feb 24, 2019
26467d7
Disable debugger starting.
cgravill Feb 24, 2019
9874701
Proper mono/dotnet replacement in kernel
cgravill Feb 24, 2019
57da24a
We no longer seem to need NetMQ.dll reference
cgravill Mar 5, 2019
76cb7cb
Simple build for both .NET Core and .NET Framework
cgravill Mar 5, 2019
036b670
Add config for AppVeyor
cgravill Mar 5, 2019
288e819
Extra file tidy-up, this has now been moved into jupyter-kernel folder
cgravill Mar 5, 2019
45a46ed
Try earlier SDK for Debian install compatibility
cgravill Mar 5, 2019
ae0f971
Try a HIGHER version of .NET Core SDK for Debian
cgravill Mar 5, 2019
8406538
Merge remote-tracking branch 'origin/master' into sdkStyleProjects
cgravill Mar 5, 2019
edab721
Try forcing use of 16.04 to workaround install issue.
cgravill Mar 5, 2019
6930294
macOS and Linux builds Azure builds
cgravill Mar 9, 2019
9be257b
Paths for bash
cgravill Mar 9, 2019
d360750
Update FCS and FAKE
cgravill Mar 9, 2019
1a21c6a
Adjust fake location
cgravill Mar 9, 2019
7e433d6
Drop back FCS for now, lots of updates for FAKE 5
cgravill Mar 9, 2019
a27c653
Try just doing a restore.
cgravill Mar 9, 2019
ef239c8
Try stepping SDK back to 2.1 for Travis.
cgravill Mar 9, 2019
6a634bf
Path AppVeyour
cgravill Mar 9, 2019
f70eec1
Try sudo on AppVeyor for fsc permission error
cgravill Mar 9, 2019
2448ec3
Build from solution in FAKE
cgravill Mar 9, 2019
5b704d9
Delete kernel.json
cgravill Mar 9, 2019
59748ec
Move project to fix casing mismatch
cgravill Mar 9, 2019
82445e7
Drop extra projects.
cgravill Mar 9, 2019
1c6c337
Now try just a restore and build with msbuild
cgravill Mar 9, 2019
8bc2e3b
Now try re-enabling the Azure macOS and Linux builds
cgravill Mar 9, 2019
79dea65
Full build test on Azure Linux
cgravill Mar 9, 2019
5cfaa3c
Allow building just DotNetFramework or DotNetCore
cgravill Mar 9, 2019
466037d
Add project to help debug agent permission failures
cgravill Mar 9, 2019
f2eaac5
Add reference
cgravill Mar 9, 2019
bfbf4d4
Just x64
cgravill Mar 9, 2019
72f2e89
Try pushing up to .NET Standard 2.0
cgravill Mar 9, 2019
704cb85
Fix configuration naming
cgravill Mar 9, 2019
bb19562
Add separate solution for testing.
cgravill Mar 9, 2019
9b69f53
Merge branch 'debugAgent' of https://github.com/fsprojects/IfSharp in…
cgravill Mar 9, 2019
98a051d
Separate out dependency groups
cgravill Mar 10, 2019
b09e9a4
Only try to build NetFramework on Travis - .NET SDK support for 2.2 f…
cgravill Mar 10, 2019
9bc17e4
Shouldn't need a separate solution for NetCore now.
cgravill Mar 10, 2019
08d0f6a
Drop dedicated NetCore solution.
cgravill Mar 10, 2019
4b7f1d7
Casing on reference
cgravill Mar 10, 2019
50f053c
Full separate out the .NET Framework and .NET Core builds.
cgravill Mar 10, 2019
c2fdaa2
Adjust msbuild script for Mono compat
cgravill Mar 10, 2019
46a9387
Dom't remove obj directory, causes other problems.
cgravill Mar 10, 2019
7853865
More detailed diagnostics
cgravill Mar 10, 2019
943fc48
Everything target 64bit as needed.
cgravill Mar 10, 2019
2f4d6fd
Restore lower case AssemblyName for consistency with previous releases
cgravill Mar 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
<!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md -->
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>

<!-- Disable Paket restore under NCrunch build -->
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
</PropertyGroup>

<Target Name="PaketBootstrapping" Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">
Expand Down Expand Up @@ -102,7 +105,11 @@
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
</PropertyGroup>

<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.174.2' ">
<!--
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' ">
<PaketRestoreRequired>true</PaketRestoreRequired>
</PropertyGroup>

Expand Down Expand Up @@ -183,6 +190,7 @@
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
<AllowExplicitVersion>true</AllowExplicitVersion>
</PackageReference>
</ItemGroup>

Expand Down
Binary file modified .paket/paket.exe
Binary file not shown.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
language: csharp

sudo: false # use the new container-based Travis infrastructure
dist: xenial

#dotnet 2.* currently fail on unpack
dotnet: 2.1.302

script:
- ./build.sh
- ./build.sh BuildNetFramework

branches:
only:
- master

- master
69 changes: 12 additions & 57 deletions IfSharp.sln
Original file line number Diff line number Diff line change
@@ -1,76 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
VisualStudioVersion = 15.0.28307.421
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "IfSharp.Kernel", "src\IfSharp.Kernel\IfSharp.Kernel.fsproj", "{2FE619B3-4756-4285-B31F-232607F62D78}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IfSharp.Kernel", "src\IfSharp.Kernel\IfSharp.Kernel.fsproj", "{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3C993D34-1BD4-4002-B149-7DB2ECAD61CF}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
build.fsx = build.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ipython-profile", "ipython-profile", "{F5A3E866-86FB-44AD-9ED1-DB65D6EB0058}"
ProjectSection(SolutionItems) = preProject
ipython-profile\static\custom\ifsharp_logo.png = ipython-profile\static\custom\ifsharp_logo.png
ipython-profile\ipython_config.py = ipython-profile\ipython_config.py
ipython-profile\ipython_qtconsole_config.py = ipython-profile\ipython_qtconsole_config.py
ipython-profile\kernel.js = ipython-profile\kernel.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "static", "static", "{45519D10-5973-41C3-A8D0-BCBF0008044D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "custom", "custom", "{3AAFA64D-CBB6-488E-B395-6A1E7CB554CE}"
ProjectSection(SolutionItems) = preProject
ipython-profile\static\custom\fsharp.css = ipython-profile\static\custom\fsharp.css
ipython-profile\static\custom\ifsharp_logo.png = ipython-profile\static\custom\ifsharp_logo.png
ipython-profile\static\custom\webintellisense-codemirror.js = ipython-profile\static\custom\webintellisense-codemirror.js
ipython-profile\static\custom\webintellisense.js = ipython-profile\static\custom\webintellisense.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "kernel-spec", "kernel-spec", "{4D56C9F0-7F98-4587-A320-98C06876AC9B}"
ProjectSection(SolutionItems) = preProject
kernel-spec\kernel.json = kernel-spec\kernel.json
kernel-spec\logo-32x32.png = kernel-spec\logo-32x32.png
kernel-spec\logo-64x64.png = kernel-spec\logo-64x64.png
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "IfSharp", "src\IfSharp\IfSharp.fsproj", "{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "IfSharp", "src\IfSharp\IfSharp.fsproj", "{614109A5-EC07-47DA-BE73-D91CCC08FB4F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2FE619B3-4756-4285-B31F-232607F62D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FE619B3-4756-4285-B31F-232607F62D78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FE619B3-4756-4285-B31F-232607F62D78}.Debug|x64.ActiveCfg = Debug|x64
{2FE619B3-4756-4285-B31F-232607F62D78}.Debug|x64.Build.0 = Debug|x64
{2FE619B3-4756-4285-B31F-232607F62D78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FE619B3-4756-4285-B31F-232607F62D78}.Release|Any CPU.Build.0 = Release|Any CPU
{2FE619B3-4756-4285-B31F-232607F62D78}.Release|x64.ActiveCfg = Release|x64
{2FE619B3-4756-4285-B31F-232607F62D78}.Release|x64.Build.0 = Release|x64
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Debug|x64.ActiveCfg = Debug|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Debug|x64.Build.0 = Debug|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Release|Any CPU.Build.0 = Release|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Release|x64.ActiveCfg = Release|Any CPU
{5FC8E68C-C5F9-4FEF-B000-EC99871D3A4E}.Release|x64.Build.0 = Release|Any CPU
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.ActiveCfg = Debug|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.Build.0 = Debug|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.ActiveCfg = Release|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.Build.0 = Release|x64
{614109A5-EC07-47DA-BE73-D91CCC08FB4F}.Debug|x64.ActiveCfg = Debug|x64
{614109A5-EC07-47DA-BE73-D91CCC08FB4F}.Debug|x64.Build.0 = Debug|x64
{614109A5-EC07-47DA-BE73-D91CCC08FB4F}.Release|x64.ActiveCfg = Release|x64
{614109A5-EC07-47DA-BE73-D91CCC08FB4F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{45519D10-5973-41C3-A8D0-BCBF0008044D} = {F5A3E866-86FB-44AD-9ED1-DB65D6EB0058}
{3AAFA64D-CBB6-488E-B395-6A1E7CB554CE} = {45519D10-5973-41C3-A8D0-BCBF0008044D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0D40E243-FC1E-43DA-B53D-08D731012F40}
SolutionGuid = {6E614E07-33B2-4D12-B1CD-38BBFD484F64}
EndGlobalSection
EndGlobal
31 changes: 31 additions & 0 deletions IfSharpNetCore.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.421
MinimumVisualStudioVersion = 10.0.40219.1
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IfSharp.Kernel", "src\IfSharp.Kernel\IfSharp.Kernel.fsproj", "{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IfSharpNetCore", "src\IfSharpNetCore\IfSharpNetCore.fsproj", "{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.ActiveCfg = Debug|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.Build.0 = Debug|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.ActiveCfg = Release|x64
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.Build.0 = Release|x64
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.ActiveCfg = Debug|x64
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.Build.0 = Debug|x64
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.ActiveCfg = Release|x64
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6E614E07-33B2-4D12-B1CD-38BBFD484F64}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
image: ubuntu

build_script:
- ./build.sh BuildNetCore
27 changes: 16 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@
trigger:
- master

pool:
vmImage: 'VS2017-Win2016'

#steps:
#- task: ShellScript@2
# inputs:
# scriptPath: build.sh

steps:
- script: build.cmd
displayName: 'build.cmd'
jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
steps:
- script: build.cmd
- job: macOS
pool:
vmImage: 'macOS-10.13'
steps:
- bash: . '$(Build.SourcesDirectory)/build.sh' BuildNetCore
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: . '$(Build.SourcesDirectory)/build.sh' BuildNetCore

#- script: |
# echo Add other tasks to build, test, and deploy your project.
Expand Down
101 changes: 60 additions & 41 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
open Fake.Runtime.Trace
open Fake.MSBuildHelper
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------

#r @"packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake
open Fake.SystemHelper
open Fake.Git
open Fake.DotNet
open Fake.IO
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open Fake.Core.TargetOperators
open Fake.IO.Globbing.Operators
open System
open System.IO

// --------------------------------------------------------------------------------------
// START TODO: Provide project-specific details below
Expand Down Expand Up @@ -41,67 +49,78 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
//let release = parseReleaseNotes (IO.File.ReadAllLines "RELEASE_NOTES.md")

// Generate assembly info files with the right version & up-to-date information
Target "AssemblyInfo" (fun _ ->
let fileName = "src/" + project + "/AssemblyInfo.fs"
CreateFSharpAssemblyInfo fileName
[ Attribute.Title project
Attribute.Product project
Attribute.Description summary
//Attribute.Version release.AssemblyVersion
//Attribute.FileVersion release.AssemblyVersion
]
Fake.Core.Target.create "AssemblyInfo" (fun _ ->
let fileName = "src/" + project + "/AssemblyInfo.fs"
AssemblyInfoFile.createFSharp
fileName
[
//TODO: switch to FAKE5

//Attribute.Title project
//Attribute.Product project
//Attribute.Description summary
//Attribute.Version release.AssemblyVersion
//Attribute.FileVersion release.AssemblyVersion
]
)

// --------------------------------------------------------------------------------------
// Clean build results & restore NuGet packages

Target "Clean" (fun _ ->
CleanDirs ["bin"; "temp"]
Fake.Core.Target.create "Clean" (fun _ ->
Fake.IO.Shell.cleanDirs ["bin"; "temp"]
)

Target "CleanDocs" (fun _ ->
CleanDirs ["docs/output"]
Fake.Core.Target.create "CleanDocs" (fun _ ->
Fake.IO.Shell.cleanDirs ["docs/output"]
)

// --------------------------------------------------------------------------------------
// Build library & test project
Target "Build" (fun _ ->
[ "src/IfSharp/IfSharp.fsproj"]
|> MSBuildRelease "bin" "Rebuild"
|> ignore
Fake.Core.Target.create "BuildNetFramework" (fun _ ->
//Need to restore for .NET Standard
let workingDir = Path.getFullName "src/IfSharp.Kernel"
let result =
DotNet.exec (DotNet.Options.withWorkingDirectory workingDir) "restore" ""
if result.ExitCode <> 0 then failwithf "'dotnet %s' failed in %s messages: %A" "restore" __SOURCE_DIRECTORY__ result.Messages

let setParams (defaults:MSBuildParams) =
{ defaults with
Verbosity = Some(MSBuildVerbosity.Detailed)
Targets = ["Build"]
Properties =
[
"Optimize", "True"
"DebugSymbols", "True"
"Configuration", "Release"
]
}
Fake.DotNet.MSBuild.build setParams "IfSharp.sln"
)

// --------------------------------------------------------------------------------------
// Run the unit tests using test runner & kill test runner when complete

Target "xUnit" (fun _ ->
!! "**/bin/**/*.Tests.dll"
|> Fake.Testing.XUnit2.xUnit2 (fun p ->
{p with
TimeOut = TimeSpan.FromMinutes 5.
HtmlOutputPath = Some "xunit.html"})
)

FinalTarget "CloseTestRunner" (fun _ ->
ProcessHelper.killProcess "nunit-agent.exe"
Fake.Core.Target.create "BuildNetCore" (fun _ ->
let workingDir = Path.getFullName "src/IfSharpNetCore"
let result =
DotNet.exec (DotNet.Options.withWorkingDirectory __SOURCE_DIRECTORY__) "build" "IfSharpNetCore.sln"
if result.ExitCode <> 0 then failwithf "'dotnet %s' failed in %s messages: %A" "build" workingDir result.Messages
)


Target "Release" DoNothing

// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build <Target>' to override

Target "All" DoNothing
Fake.Core.Target.create "All" ignore

"Clean"
==> "AssemblyInfo"
==> "Build"
==> "BuildNetCore"

"Clean"
==> "BuildNetFramework"

"BuildNetCore"
==> "All"

"All"
==> "xUnit"
==> "Release"
"BuildNetFramework"
==> "All"


RunTargetOrDefault "All"
Fake.Core.Target.runOrDefault "All"
Loading