Merge pull request #7033 from KevinRansom/rel/1.1.0

Add F# to dotnet cli 1.1.0
This commit is contained in:
Livar 2017-06-29 18:25:59 -07:00 committed by GitHub
commit 13e84f7cbd
6 changed files with 96 additions and 1 deletions

View file

@ -197,6 +197,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Cli.Sln.In
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Cli.Sln.Internal.Tests", "test\Microsoft.DotNet.Cli.Sln.Internal.Tests\Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj", "{56F1E090-B80F-4BDF-8991-4B0F9B5B8C9A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp\tool_fsc.csproj", "{602976C5-2477-4B4C-AD9A-1EAFB250529A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -1621,5 +1623,6 @@ Global
{F2D1A7DA-B3EB-4CA7-BAA9-A18CEC398853} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
{C98C7C2E-2C29-4A40-958C-60561ED77791} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{56F1E090-B80F-4BDF-8991-4B0F9B5B8C9A} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{602976C5-2477-4B4C-AD9A-1EAFB250529A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
EndGlobalSection
EndGlobal

View file

@ -126,6 +126,12 @@
VersionSuffix="$(VersionSuffix)"
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
Output="$(SdkOutputDirectory)/FSharp"
Configuration="$(Configuration)"
VersionSuffix="$(VersionSuffix)"
ProjectPath="$(SrcDirectory)/tool_fsharp/tool_fsc.csproj" />
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
SectionName="runtimeTargets"
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
@ -169,6 +175,7 @@
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<SdkFilesExclude Include="$(SdkOutputDirectory)/TestHost*/**/*" />
<SdkFiles Include="$(SdkOutputDirectory)/**/*" Exclude="@(SdkFilesExclude)" />
<SdkFilesWithPEMarker Remove="*" />
</ItemGroup>
@ -194,7 +201,8 @@
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);
PlatformAssemblyPaths="%(CrossgenTargets.RootDir)%(CrossgenTargets.Directory);
@(PlatformAssemblies);
@(CompileStageSdkDirectories);
$(SharedFrameworkNameVersionPath)" />

View file

@ -4,6 +4,7 @@
<CLI_SharedFrameworkVersion>1.1.2</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.3.0-preview-000402-01</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.3.0-beta3-61816-04</CLI_Roslyn_Version>
<CLI_FSharp_Version>4.2.0-rc-170621-0</CLI_FSharp_Version>
<CLI_NETSDK_Version>1.1.0-alpha-20170615-3</CLI_NETSDK_Version>
<CLI_NuGet_Version>4.3.0-preview3-4168</CLI_NuGet_Version>
<CLI_WEBSDK_Version>1.0.0-alpha-20170516-2-509</CLI_WEBSDK_Version>

View file

@ -0,0 +1,6 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
"%~dp0..\..\..\dotnet" "%~dp0fsc.exe" %*

17
src/tool_fsharp/RunFsc.sh Normal file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
"$DIR/../../../dotnet" "$DIR/fsc.exe" "$@"

View file

@ -0,0 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>netcoreapp1.1</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
<PackageReference Include="Microsoft.FSharp.Compiler" Version="$(CLI_FSharp_Version)" />
</ItemGroup>
<ItemGroup>
<Content Include="RunFsc.sh;RunFsc.cmd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<Target Name="AddHackFilesToPublish"
AfterTargets="ComputeFilesToPublish">
<ItemGroup>
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
<HackFilesToCopy Include="$(NuGetPackagesDir)\Microsoft.FSharp.Compiler\$(CLI_FSharp_Version)\contentFiles\any\any\**;" />
</ItemGroup>
<Copy SourceFiles="@(HackFilesToCopy)"
DestinationFiles="@(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="MakeFscRunnableAndMoveToPublishDir"
AfterTargets="Publish"
BeforeTargets="RemoveFilesAfterPublish">
<ItemGroup>
<AssetsToRemoveFromDeps Include="tool_fsc.dll"
SectionName="runtime"/>
</ItemGroup>
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
SectionName="%(AssetsToRemoveFromDeps.SectionName)"
AssetPath="%(AssetsToRemoveFromDeps.Identity)" />
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json;
$(PublishDir)/$(TargetName).deps.json;"
DestinationFiles="$(PublishDir)/fsc.runtimeconfig.json;
$(PublishDir)/fsc.deps.json;"/>
</Target>
<Target Name="RemoveFilesAfterPublish"
AfterTargets="Publish">
<Delete Files="$(PublishDir)/$(TargetName).dll" />
<Delete Files="$(PublishDir)/$(TargetName).pdb" />
<Delete Files="$(PublishDir)/$(TargetName).runtimeconfig.json" />
<Delete Files="$(PublishDir)/$(TargetName).deps.json" />
</Target>
</Project>