Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sourcelink2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Taggart committed Apr 1, 2017
2 parents dbea0f4 + 4599d7b commit 661edc9
Show file tree
Hide file tree
Showing 61 changed files with 2,060 additions and 2,695 deletions.
120 changes: 93 additions & 27 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,105 @@
<IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded>
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
<!-- Paket command -->
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
</PropertyGroup>
</PropertyGroup>

<Target Name="PaketRestore" BeforeTargets="_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >

<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" ' />

<PropertyGroup>
<PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
</PropertyGroup>

<ReadLinesFromFile File="$(PaketReferencesFilePath)" >
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
</ReadLinesFromFile>

<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
</PaketReferencesFileLinesInfo>
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
</PropertyGroup>

</Target>

<Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" >
<PropertyGroup>
<ContinuePackingAfterGeneratingNuspec>false</ContinuePackingAfterGeneratingNuspec>
</PropertyGroup>
</Target>

<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" ' />

<PropertyGroup>
<PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
</PropertyGroup>

<ReadLinesFromFile File="$(PaketReferencesFilePath)" >
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
</ReadLinesFromFile>

<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
</PaketReferencesFileLinesInfo>
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
</PropertyGroup>

</Target>
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" >
<PropertyGroup>
<PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
</PropertyGroup>

<ItemGroup>
<_NuspecFiles Include="$(BaseIntermediateOutputPath)*.nuspec"/>
</ItemGroup>

<Exec Command='$(PaketCommand) fix-nuspec file "@(_NuspecFiles)" references-file "$(PaketReferencesFilePath)" ' />

<ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
<Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
</ConvertToAbsolutePath>

<!-- Call Pack -->
<PackTask 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)"
TargetPathsToAssemblies="@(_TargetPathsToAssemblies->'%(FinalOutputPath)')"
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
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)"
AssemblyReferences="@(_References)"
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
NuspecOutputPath="$(BaseIntermediateOutputPath)"
IncludeBuildOutput="$(IncludeBuildOutput)"
BuildOutputFolder="$(BuildOutputTargetFolder)"
ContentTargetFolders="$(ContentTargetFolders)"
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
NuspecFile="$(NuspecFileAbsolutePath)"
NuspecBasePath="$(NuspecBasePath)"
NuspecProperties="$(NuspecProperties)"/>
</Target>

</Project>
19 changes: 8 additions & 11 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#### 4.0.7 - 17.03.2017
* USABILITY: Write out if package is transitive or not

#### 4.0.6 - 16.03.2017
#### 4.1.3 - 30.03.2017
* Support for dotnet pack
* BUGFIX: Handle empty references files for .NET Core
* BUGFIX: Better framework node detection
* BUGFIX: Better redirects for project dependent references files
* BUGFIX: Out-of-Sync check should work with auto-detection of framework settings
* BUGFIX: Convert from nuget with wildcard version - https://github.com/fsprojects/Paket/issues/2185

#### 4.0.5 - 16.03.2017
* BUGFIX: Support load script generation in restore

#### 4.0.3 - 16.03.2017
* BUGFIX: framework: auto-detect didn't work with Paket 4 - https://github.com/fsprojects/Paket/issues/2188

#### 4.0.2 - 16.03.2017
* Handle empty references files for .NET Core
* USABILITY: Convert packages that do not have version specified
* COSMETICS: Use latest FSharp.Core

#### 4.0.0 - 15.03.2017
* Make Paket compatible with DotNet SDK / MSBuild 15 / Visual Sudio 2017
Expand Down
2 changes: 1 addition & 1 deletion docs/content/editor-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
* Status: Released
* Installation: Available in [Visual Studio Marketplace](https://marketplace.visualstudio.com/items/Ionide.Ionide-Paket)
* Features:
* Paket commands available in Atom's Command Palette
* Paket commands available in VS Code's Command Palette

<a href="img/paket-vscode.gif"><img src="img/paket-vscode.gif" alt="paket in VS Code" title="paket in VSCode" width="500"></a>
8 changes: 4 additions & 4 deletions integrationtests/Paket.IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.4.1.0" />
</dependentAssembly>
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.1.0.0" />
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding></runtime></configuration>
134 changes: 0 additions & 134 deletions integrationtests/Paket.IntegrationTests/BindingRedirect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -78,69 +78,6 @@ let ``#1195 should report broken app.config``() =
failwith "paket should fail"
with
| exn when exn.Message.Contains("Project1") && exn.Message.Contains("app.config") -> ()

[<Test>]
let ``#1218 install hard should replace all assembly redirects with required only``() =
paket "install --redirects --createnewbindingfiles --clean-redirects" "i001218-binding-redirect" |> ignore

let path = Path.Combine(scenarioTempPath "i001218-binding-redirect")
let config1Path = Path.Combine(path, "Project1", "app.config")
let config2Path = Path.Combine(path, "Project2", "app.config")
let config3Path = Path.Combine(path, "Project3", "app.config")
let config4Path = Path.Combine(path, "Project4", "app.config")

let config1 = File.ReadAllText(config1Path)
let config2 = File.ReadAllText(config2Path)
let config3 = File.ReadAllText(config3Path)
let config4 = File.ReadAllText(config4Path)

let Albedo = """<assemblyIdentity name="Ploeh.Albedo" publicKeyToken="179ef6dd03497bbd" culture="neutral" />"""
let AutoFixture = """<assemblyIdentity name="Ploeh.AutoFixture" publicKeyToken="b24654c590009d4f" culture="neutral" />"""
let ``AutoFixture.Idioms`` = """<assemblyIdentity name="Ploeh.AutoFixture.Idioms" publicKeyToken="b24654c590009d4f" culture="neutral" />"""
let ``AutoFixture.Xunit`` = """<assemblyIdentity name="Ploeh.AutoFixture.Xunit" publicKeyToken="b24654c590009d4f" culture="neutral" />"""
let log4net = """<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />"""
let ``Newtonsoft.Json`` = """<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""
let ``Newtonsoft.Json.Schema`` = """<assemblyIdentity name="Newtonsoft.Json.Schema" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""
let xunit = """<assemblyIdentity name="xunit" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />"""
let ``xunit.extensions`` = """<assemblyIdentity name="xunit.extensions" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />"""
let ``Castle.Core`` = """<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />"""
let ``Castle.Windsor`` = """<assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral" />"""

config1 |> shouldContainText Albedo
config1 |> shouldContainText AutoFixture
config1.Contains ``AutoFixture.Idioms`` |> shouldEqual false
config1.Contains ``AutoFixture.Xunit`` |> shouldEqual false
config1.Contains log4net |> shouldEqual false
config1 |> shouldContainText ``Newtonsoft.Json``
config1.Contains ``Newtonsoft.Json.Schema`` |> shouldEqual false
config1.Contains xunit |> shouldEqual false
config1 |> shouldContainText ``xunit.extensions``
config1 |> shouldContainText ``Castle.Core``
config1.Contains ``Castle.Windsor`` |> shouldEqual false

config3.Contains Albedo |> shouldEqual false
config3.Contains AutoFixture |> shouldEqual false
config3.Contains ``AutoFixture.Idioms`` |> shouldEqual false
config3.Contains ``AutoFixture.Xunit`` |> shouldEqual false
config3.Contains log4net |> shouldEqual false
config3 |> shouldContainText ``Newtonsoft.Json``
config3.Contains ``Newtonsoft.Json.Schema`` |> shouldEqual false
config3.Contains xunit |> shouldEqual false
config3.Contains ``xunit.extensions`` |> shouldEqual false
config3 |> shouldContainText ``Castle.Core``
config3.Contains ``Castle.Windsor`` |> shouldEqual false

config4.Contains Albedo |> shouldEqual false
config4.Contains AutoFixture |> shouldEqual false
config4.Contains ``AutoFixture.Idioms`` |> shouldEqual false
config4.Contains ``AutoFixture.Xunit`` |> shouldEqual false
config4.Contains log4net |> shouldEqual false
config4.Contains ``Newtonsoft.Json`` |> shouldEqual false
config4.Contains ``Newtonsoft.Json.Schema`` |> shouldEqual false
config4.Contains xunit |> shouldEqual false
config4.Contains ``xunit.extensions`` |> shouldEqual false
config4 |> shouldContainText ``Castle.Core``
config4.Contains ``Castle.Windsor`` |> shouldEqual false

[<Test>]
let ``#1218 install should replace paket's binding redirects with required only``() =
Expand Down Expand Up @@ -220,21 +157,6 @@ let ``#1218 install should replace paket's binding redirects with required only`
config4.Contains ``Castle.Windsor`` |> shouldEqual false


[<Test>]
let ``#1248 install should replace paket's binding redirects with required only and keep stable``() =
paket "install --redirects --clean-redirects --createnewbindingfiles" "i001248-stable-redirect" |> ignore

let originalConfig2Path = Path.Combine(originalScenarioPath "i001248-stable-redirect", "Project2", "app.config")

let config2Path = Path.Combine(scenarioTempPath "i001248-stable-redirect", "Project2", "app.config")

let originalConfig2 = File.ReadAllText(originalConfig2Path)
let config2 = File.ReadAllText(config2Path)

config2
|> normalizeLineEndings
|> shouldEqual (normalizeLineEndings originalConfig2)

[<Test>]
let ``#1270 force redirects``() =
paket "install --createnewbindingfiles" "i001270-force-redirects" |> ignore
Expand Down Expand Up @@ -270,62 +192,6 @@ let ``#1270 redirects from references``() =
config.Contains AlphaFS |> shouldEqual false
config |> shouldContainText ``Newtonsoft.Json.Schema``
config.Contains ``Newtonsoft.Json`` |> shouldEqual false

[<Test>]
let ``#1248 redirects off``() =
paket "install" "i001248-redirects-off" |> ignore
let path = Path.Combine(scenarioTempPath "i001248-redirects-off")
let configPath = Path.Combine(path, "MyClassLibrary", "MyClassLibrary", "app.config")
let originalPath = Path.Combine(originalScenarioPath "i001248-redirects-off")
let originalConfigPath = Path.Combine(originalPath, "MyClassLibrary", "MyClassLibrary", "app.config")

let config = File.ReadAllText(configPath)
let originalConfig = File.ReadAllText(originalConfigPath)

config |> shouldEqual originalConfig

[<Test>]
let ``#1248 redirects off for main only``() =
paket "install" "i001248-redirects-off" |> ignore
let path = Path.Combine(scenarioTempPath "i001248-redirects-off")
let configPath = Path.Combine(path, "MyClassLibrary", "MyClassLibrary2", "app.config")

let ``FSharp.Core`` = """<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />"""
let AlphaFS = """<assemblyIdentity name="AlphaFS" publicKeyToken="4d31a58f7d7ad5c9" culture="neutral" />"""
let ``Newtonsoft.Json`` = """<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""
let ``Newtonsoft.Json.Schema`` = """<assemblyIdentity name="Newtonsoft.Json.Schema" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""

let config = File.ReadAllText(configPath)

config |> shouldContainText ``FSharp.Core``
config |> shouldContainText AlphaFS
config.Contains ``Newtonsoft.Json`` |> shouldEqual false
config.Contains ``Newtonsoft.Json.Schema`` |> shouldEqual false

[<Test>]
let ``#1248 redirects off with --redirects``() =
paket "install --redirects" "i001248-redirects-off" |> ignore
let path = Path.Combine(scenarioTempPath "i001248-redirects-off")
let configPath = Path.Combine(path, "MyClassLibrary", "MyClassLibrary", "app.config")
let originalPath = Path.Combine(originalScenarioPath "i001248-redirects-off")
let originalConfigPath = Path.Combine(originalPath, "MyClassLibrary", "MyClassLibrary", "app.config")

let config = File.ReadAllText(configPath)
let originalConfig = File.ReadAllText(originalConfigPath)

config |> shouldEqual originalConfig

[<Test>]
let ``#1544 redirects off``() =
install "i001544-redirects" |> ignore
let path = Path.Combine(scenarioTempPath "i001544-redirects")
let configPath = Path.Combine(path, "BindingRedirectPaketBug", "App.config")
let originalConfigPath = Path.Combine(path, "BindingRedirectPaketBug", "App.config.expected")

let config = File.ReadAllText(configPath) |> normalizeLineEndings
let originalConfig = File.ReadAllText(originalConfigPath) |> normalizeLineEndings

config |> shouldEqual originalConfig

[<Test>]
let ``#1574 redirects GAC``() =
Expand Down
25 changes: 1 addition & 24 deletions integrationtests/Paket.IntegrationTests/LocalOverrideSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,4 @@ let replaceInFile filePath (searchText: string) replaceText =
File.ReadAllText filePath
|> fun x -> x.Replace(searchText, replaceText)
|> fun x -> File.WriteAllText (filePath, x)

[<Test>]
let ``#1633 paket.local local git override``() =
let scenario = "i001633-local-git-override"
prepare scenario
replaceInFile
(Path.Combine (scenarioTempPath scenario, "paket.local"))
"[build-command]"
(if isUnix then "build.sh NuGet" else "build.cmd NuGet")
directPaket "restore" scenario |> ignore
let doc = new XmlDocument()
Path.Combine(
scenarioTempPath scenario,
"packages",
"Argu",
"Argu.nuspec")
|> doc.Load

doc
|> getNode "package"
|> optGetNode "metadata"
|> optGetNode "summary"
|> Option.map (fun n -> n.InnerText)
|> shouldEqual (Some "Test paket source remote git override.")

Loading

0 comments on commit 661edc9

Please sign in to comment.