Skip to content

Commit

Permalink
Remove FSharp.Compiler.Tools
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Nov 21, 2019
1 parent 5699ef3 commit 2595f2c
Show file tree
Hide file tree
Showing 20 changed files with 111 additions and 10,342 deletions.
34 changes: 17 additions & 17 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ let tags = "nuget, bundler, F#"
let solutionFile = "Paket.sln"

// Pattern specifying assemblies to be tested using NUnit
let testAssemblies = "tests/**/bin/Release/*Tests*.dll"
let integrationTestAssemblies = "integrationtests/Paket.IntegrationTests/bin/Release/*Tests*.dll"
let testAssemblies = "tests/**/bin/Release/net46/*Tests*.dll"
let integrationTestAssemblies = "integrationtests/Paket.IntegrationTests/bin/Release/net46/*Tests*.dll"

// Git configuration (used for publishing documentation in gh-pages branch)
// The profile where the project is posted
Expand All @@ -69,6 +69,7 @@ let mutable dotnetExePath = "dotnet"
// --------------------------------------------------------------------------------------

let buildDir = "bin"
let buildDirNet46 = "bin/net46"
let buildDirNetCore = "bin_netcore"
let tempDir = "temp"
let buildMergedDir = buildDir @@ "merged"
Expand Down Expand Up @@ -140,6 +141,7 @@ Target "Clean" (fun _ ->
!! "src/**/bin"
++ "tests/**/bin"
++ buildDir
++ buildDirNet46
++ buildDirNetCore
++ tempDir
|> CleanDirs
Expand All @@ -157,20 +159,18 @@ Target "CleanDocs" (fun _ ->

Target "Build" (fun _ ->
if isMono then
!! solutionFile
|> MSBuildReleaseExt "" [
"VisualStudioVersion", "14.0"
"ToolsVersion" , "14.0"
] "Rebuild"
|> ignore
DotNetCli.Build (fun c ->
{ c with
Project = solutionFile
ToolPath = dotnetExePath
})
else
!! solutionFile
|> MSBuildReleaseExt "" [
"VisualStudioVersion", "14.0"
"ToolsVersion" , "14.0"
"SourceLinkCreate" , "true"
] "Rebuild"
|> ignore
DotNetCli.Build (fun c ->
{ c with
Project = solutionFile
ToolPath = dotnetExePath
AdditionalArgs = [ "/p:SourceLinkCreate=true" ]
})
)

let assertExitCodeZero x =
Expand Down Expand Up @@ -342,13 +342,13 @@ Target "MergePaketTool" (fun _ ->

let toPack =
mergeLibs
|> List.map (fun l -> buildDir @@ l)
|> List.map (fun l -> buildDirNet46 @@ l)
|> separated " "

let result =
ExecProcess (fun info ->
info.FileName <- currentDirectory </> "packages" </> "build" </> "ILRepack" </> "tools" </> "ILRepack.exe"
info.Arguments <- sprintf "/lib:%s /ver:%s /out:%s %s" buildDir release.AssemblyVersion paketFile toPack
info.Arguments <- sprintf "/lib:%s /ver:%s /out:%s %s" buildDirNet46 release.AssemblyVersion paketFile toPack
) (TimeSpan.FromMinutes 5.)

if result <> 0 then failwithf "Error during ILRepack execution."
Expand Down
4 changes: 2 additions & 2 deletions docs/tools/generate.fsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Getting help docs from Paket.exe
#r "../../bin/Argu.dll"
#r "../../bin/Paket.exe"
#r "../../bin/net46/Argu.dll"
#r "../../bin/net46/Paket.exe"
open System.IO


Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.500"
"version": "3.0.100"
}
}
13 changes: 13 additions & 0 deletions integrationtests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<!-- MSBuild only includes the first Directory.Build.props, so we need to manually include the root one -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
<PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
2,173 changes: 9 additions & 2,164 deletions integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let paketToolPath =
#if PAKET_NETCORE
dotnetToolPath, FullName(__SOURCE_DIRECTORY__ + "../../../bin_netcore/paket.dll")
#else
"", FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.exe")
"", FullName(__SOURCE_DIRECTORY__ + "../../../bin/net46/paket.exe")
#endif

let integrationTestPath = FullName(__SOURCE_DIRECTORY__ + "../../../integrationtests/scenarios")
Expand All @@ -40,7 +40,7 @@ let cleanup scenario =

//let cleanupAllScenarios() =
// for scenario in scenarios |> Seq.toList do
// try
// try
// cleanup scenario
// scenarios.Remove(scenario) |> ignore<bool>
// with e ->
Expand Down Expand Up @@ -121,7 +121,7 @@ let directToolEx env isPaket toolInfo commands workingDir =
ExecProcessWithLambdas (fun info ->
info.FileName <- processFilename
info.WorkingDirectory <- workingDir
info.Arguments <- processArgs)
info.Arguments <- processArgs)
(System.TimeSpan.FromMinutes 7.)
false
(printfn "%s")
Expand All @@ -144,7 +144,7 @@ let directToolEx env isPaket toolInfo commands workingDir =
perfMessages.Add(msg)

msgs.Add({ IsError = isError; Message = msg})

let result =
try
ExecProcessWithLambdas (fun info ->
Expand Down Expand Up @@ -269,7 +269,7 @@ let updateShouldFindPackageConflict packageName scenario =
use __ = update scenario |> fst
failwith "No conflict was found."
with
| exn when exn.Message.Contains("Conflict detected") && exn.Message.Contains(sprintf "requested package %s" packageName) ->
| exn when exn.Message.Contains("Conflict detected") && exn.Message.Contains(sprintf "requested package %s" packageName) ->
#if INTERACTIVE
printfn "Ninject conflict test passed"
#endif
Expand Down Expand Up @@ -321,13 +321,13 @@ let isPackageCachedWithOnlyLowercaseNames (name: string) =

let lowercaseName = name.ToLowerInvariant()

let packageFolders =
let packageFolders =
[ nugetCache; userPackageFolder ]
|> List.collect (Directory.GetDirectories >> List.ofArray)
|> List.filter (fun x -> Path.GetFileName x |> String.equalsIgnoreCase name)

let packageFolderNames = packageFolders |> List.map Path.GetFileName |> List.distinct

// ensure that names of package directories are lowercase only
match packageFolderNames with
| [ x ] when x = lowercaseName ->
Expand Down
1 change: 0 additions & 1 deletion integrationtests/Paket.IntegrationTests/paket.references
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FSharp.Core
Chessie
Newtonsoft.Json
FSharp.Compiler.Tools
NUnit

NUnit3TestAdapter
Expand Down
2 changes: 0 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ nuget Mono.Cecil prerelease

nuget System.Security.Cryptography.ProtectedData

nuget FSharp.Compiler.Tools

nuget NETStandard.Library ~> 2.0
nuget Microsoft.NETCore.App ~> 2.1
nuget System.Net.Http.WinHttpHandler
Expand Down
1 change: 0 additions & 1 deletion paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ NUGET
FSharp.Core (>= 4.1) - restriction: < netstandard1.6
FSharp.Core (>= 4.1.17) - restriction: >= netstandard1.6
NETStandard.Library (>= 1.6.1) - restriction: >= netstandard1.6
FSharp.Compiler.Tools (4.1.23)
FSharp.Core (4.3.4) - redirects: force
System.Collections (>= 4.0.11) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0)
System.Console (>= 4.0) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0)
Expand Down
7 changes: 5 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.1.1" PrivateAssets="All" />
<PackageReference Include="SourceLink.Embed.PaketFiles" Version="2.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

</Project>
95 changes: 7 additions & 88 deletions src/Paket.Bootstrapper/Paket.Bootstrapper.csproj
Original file line number Diff line number Diff line change
@@ -1,98 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CE3F8B87-1ABD-462E-A35B-CDCEC695898B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Paket.Bootstrapper</RootNamespace>
<TargetFramework>net46</TargetFramework>
<StartupObject>Paket.Bootstrapper.Program</StartupObject>
<AssemblyName>paket.bootstrapper</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<Win32Resource>
</Win32Resource>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(PaketUseLocalGithub)' == 'true' ">
<DefineConstants>LOCAL_GITHUB;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="ArgumentParser.cs" />
<Compile Include="BootstrapperHelper.cs" />
<Compile Include="BootstrapperOptions.cs" />
<Compile Include="DownloadStrategies\IDownloadStrategy.cs" />
<Compile Include="DownloadStrategies\IHaveEffectiveStrategy.cs" />
<Compile Include="InstallKind\InstallAsTool.cs" />
<Compile Include="PaketHashFile.cs" />
<Compile Include="Properties\InternalsVisibleTo.cs" />
<Compile Include="PaketDependencies.cs" />
<Compile Include="PaketRunner.cs" />
<Compile Include="Verbosity.cs" />
<Compile Include="WindowsProcessArguments.cs" />
<Compile Include="DownloadStrategies\CacheDownloadStrategy.cs" />
<Compile Include="HelperProxies\IWebRequestProxy.cs" />
<Compile Include="HelperProxies\WebRequestProxy.cs" />
<Compile Include="DownloadArguments.cs" />
<Compile Include="EnvProxy.cs" />
<Compile Include="HelperProxies\FileSystemProxy.cs" />
<Compile Include="DownloadStrategies\GitHubDownloadStrategy.cs" />
<Compile Include="DownloadStrategies\DownloadStrategy.cs" />
<Compile Include="HelperProxies\IFileSystemProxy.cs" />
<Compile Include="DownloadStrategies\NugetDownloadStrategy.cs" />
<Compile Include="ConsoleImpl.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SemVer.cs" />
<Compile Include="DownloadStrategies\TemporarilyIgnoreUpdatesDownloadStrategy.cs" />
<Compile Include="HelperProxies\DateTimeProxy.cs" />
<None Include="paket.template" />
</ItemGroup>
<ItemGroup>
<None Include="paket.template" />
<Reference Include="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
14 changes: 7 additions & 7 deletions src/Paket.Core/Dependencies/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,13 @@ type private StepFlags = {
} with
override self.ToString () =
sprintf
"[< FLAGS >]\n\
| Ready - %b\n\
| UseUnlisted - %b\n\
| HasUnlisted - %b\n\
| ForceBreak - %b\n\
| FirstTrial - %b\n\
| UnlistedSearch - %b\n"
"""[< FLAGS >]\n\
| Ready - %b\n\
| UseUnlisted - %b\n\
| HasUnlisted - %b\n\
| ForceBreak - %b\n\
| FirstTrial - %b\n\
| UnlistedSearch - %b\n"""
self.Ready self.UseUnlisted self.HasUnlisted self.ForceBreak self.FirstTrial self.UnlistedSearch

type private Stage =
Expand Down
Loading

0 comments on commit 2595f2c

Please sign in to comment.