Skip to content

Commit

Permalink
Merge upstream master:6ec1622 from fsprojects/Paket
Browse files Browse the repository at this point in the history
from origin (Merge pull request fsprojects#3323 from fsprojects/matthid-patch-1)
  • Loading branch information
viktor-svub authored Aug 4, 2018
2 parents 90d4927 + 6ec1622 commit 892ac47
Show file tree
Hide file tree
Showing 98 changed files with 2,171 additions and 843 deletions.
Binary file added .ionide/symbolCache.db
Binary file not shown.
9 changes: 6 additions & 3 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
</PropertyGroup>

<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.174.2' ">
<PaketRestoreRequired>true</PaketRestoreRequired>
</PropertyGroup>

<!-- Do a global restore if required -->
<Exec Command='$(PaketBootStrapperCommand)' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
Expand All @@ -93,7 +96,7 @@
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references</PaketOriginalReferencesFilePath>
<!-- paket.references -->
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\paket.references</PaketOriginalReferencesFilePath>

<DoAllResolvedFilesExist>false</DoAllResolvedFilesExist>
<DoAllResolvedFilesExist Condition="Exists(%(PaketResolvedFilePaths.Identity))">true</DoAllResolvedFilesExist>
<PaketRestoreRequired>true</PaketRestoreRequired>
Expand Down Expand Up @@ -132,11 +135,11 @@
<Error Condition=" '$(DoAllResolvedFilesExist)' != 'true' AND '$(ResolveNuGetPackages)' != 'False' " Text="One Paket file '@(PaketResolvedFilePaths)' 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="'@(PaketResolvedFilePaths)' != ''" File="%(PaketResolvedFilePaths.Identity)" ><!--Condition="Exists('%(PaketResolvedFilePaths.Identity)')"-->
<ReadLinesFromFile Condition="($(DesignTimeBuild) != true OR '$(PaketPropsLoaded)' != 'true') AND '@(PaketResolvedFilePaths)' != ''" File="%(PaketResolvedFilePaths.Identity)" >
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
</ReadLinesFromFile>

<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
<ItemGroup Condition="($(DesignTimeBuild) != true OR '$(PaketPropsLoaded)' != 'true') AND '@(PaketReferencesFileLines)' != '' " >
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
Expand Down
31 changes: 31 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
#### 5.176.1 - 2018-08-02
* BUGFIX: Removed faulty creation of directories during `generate-load-scripts` - https://github.com/fsprojects/Paket/pull/3319

#### 5.176.0 - 2018-07-31
* paket pack with p2p dependencies and multitargeting - https://github.com/fsprojects/Paket/pull/3317
* BUGFIX: Revert impact of https://github.com/dotnet/corefx/issues/31098 by using WinHttpHandler - https://github.com/fsprojects/Paket/pull/3307

#### 5.175.0 - 2018-07-30
* Allow addition of <EmbedInteropTypes> for NuGet packages - https://github.com/fsprojects/Paket/pull/3314
* BUGFIX: "-T" switch removed when isMacOS, because it is not valid on OSX - https://github.com/fsprojects/Paket/pull/3298
* BUGFIX: Fixed exception during restore when accessing missing folders - https://github.com/fsprojects/Paket/pull/3293
* BUGFIX: Reports NuGet download time correctly - https://github.com/fsprojects/Paket/pull/3304
* BUGFIX: Accept netstandard20 in Visual Studion integration - https://github.com/fsprojects/Paket/issues/3284

#### 5.174.0 - 2018-07-06
* NEW FEATURE: Improved Visual Studio integration - https://github.com/fsprojects/Paket/pull/3273
* BUGFIX: Paket doesn't add Compile tags for packages when new project format ius used - https://github.com/fsprojects/Paket/issues/3269
* BUGFIX: Paket packs localized assemblies with new .csproj - https://github.com/fsprojects/Paket/pull/3276
* BUGFIX: Extended NuGetV3 source detection with Artifactory feed format - https://github.com/fsprojects/Paket/pull/3267
* BUGFIX: Paket add only runs update on the touched group - https://github.com/fsprojects/Paket/issues/3259
* COSMETICS: group parameter for outdated works like everywhere else - https://github.com/fsprojects/Paket/pull/3280

#### 5.173.0 - 2018-06-20
* BUGFIX: Don't serialize individual settings that match group settings in lock file - https://github.com/fsprojects/Paket/issues/3257

#### 5.172.4 - 2018-06-18
* BUGFIX: Fixed invalid syntax in packages config - https://github.com/fsprojects/Paket/pull/3253

#### 5.172.3 - 2018-06-18
* BUGFIX: Fixed infinite recursion when handling errors - https://github.com/fsprojects/Paket/pull/3251

#### 5.172.2 - 2018-06-11
* BUGFIX: Report only transitive settings changes - https://github.com/fsprojects/Paket/issues/3218

Expand Down
13 changes: 9 additions & 4 deletions docs/content/dependencies-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ the Paket team noticed a dramatic increase of the well known "packages" folder.
Historically one way was to tell Paket that you only want to compile for `framework: net45`.
However, this doesn't prevent netstandard dependencies in all situations.
On the other side more features are provided by Paket and the packages folder has become more and more redundant:

- Load scripts can reference the files in the global cache
- csproj/fsproj files can references files in the global cache
- netcore project files don't require any explicit dll-references

Therefore, the paket team decided to make the "packages" folder opt-out.

> This feature is currently considered beta
You can opt-out of generating the `packages` folder by using the `storage` option:

```paket
Expand All @@ -219,8 +219,13 @@ source https://nuget.org/api/v2
nuget jQuery
```

The storage option may be overriden by packages.
However, the behavior is undefined and may change (please open an issue if you depend on the current behavior or we break you).
The option may be overriden by packages. However, the behavior is undefined and may change (please open an issue if you depend on the current behavior or we break you).

The storage option has three values:

- `storage: packages` (the default, relevant for FAKE 5 where the default for inline-dependencies is `storage: none`)
- `storage: none` disable the packages folder and use the global NuGet cache (default in FAKE 5 inline-dependencies)
- `storage: symlink` use the packages folder but use symlinks instead of physical files

```paket
// make a symlink instead copy the packages.
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 @@ -38,7 +38,7 @@
* [Project site](https://github.com/fsprojects/Paket.VisualStudio)
* Status: In Development
* Installation: Available via
[Visual Studio Gallery](https://visualstudiogallery.msdn.microsoft.com/ce104917-e8b3-4365-9490-8432c6e75c36)
[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SteffenForkmann.PaketforVisualStudio)
* Features:
* Solution Explorer Extensions for Paket files
* Paket commands in Solution Explorer menu
Expand Down
21 changes: 21 additions & 0 deletions docs/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ This guide will show you
1. Commit `.paket/paket.exe` to your repository.
1. After the first `.paket/paket.exe` invocation Paket will create a couple of
files in `.paket` — commit those as well.
1. Configure your source control system to ignore the `paket-files` folder, for example
in Git add a line to the `.gitignore` file containing `paket-files`.

### Specifying dependencies

Expand Down Expand Up @@ -154,3 +156,22 @@ This command will analyze your

If you are already using NuGet and want to learn how to use the automatic NuGet
conversion, then read the next [tutorial](convert-from-nuget-tutorial.html).

### Working with Paket

The most frequently used Paket commands are:

* [`paket install` command](paket-install.html) which you should run after modifying the `paket.dependencies` file.
This command will update the `paket.lock` file, then update all of your Visual Studio
projects to the new versions.

* [`paket restore` command](paket-restore.html) which you should run after cloning the repository or switching branches.
This command will take the current `paket.lock` file and update your Visual Studio projects
so that they are referencing the correct versions of NuGet packages. If you are using a
continuous integration system like TeamCity or Jenkins then you should also run this
command after getting the source code and before compiling it.

* [`paket update` command](paket-update.html) which you can run to update your project to the latest versions of all
dependent packages. This command will update the `paket.lock` file to reference the most
recent versions permitted by the restrictions in `paket.dependencies`, then apply these
changes to your Visual Studio projects.
5 changes: 5 additions & 0 deletions docs/content/references-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ DotNetZip framework: >= net45
FSharp.Core redirects: on
```

## Adding support for COM interop DLL
Follows the same syntax as the previous one:
`PkgName embed_interop_types: true`
In case it is not enabled, the default behavior is to drop `<EmbedInteropTypes>` from the project file.

## Excluding libraries

This option allows you to exclude libraries from being referenced in project files:
Expand Down
53 changes: 53 additions & 0 deletions integrationtests/Paket.IntegrationTests/PackSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ open System.IO.Compression
open Paket.Domain
open Paket
open Paket.NuGetCache
open Paket.Requirements

let getDependencies(x:Paket.NuGet.NuGetPackageCache) = x.GetDependencies()

Expand Down Expand Up @@ -389,6 +390,23 @@ let ``#1816 pack localized when satellite dll is missing`` () =

CleanDir rootPath

[<Test>]
let ``#3275 netstandard pack localized happy path`` () =
let scenario = "i003275-pack-localized-netstandard"
let rootPath = scenarioTempPath scenario
let outPath = Path.Combine(rootPath, "out")
let package = Path.Combine(outPath, "LibForTest.1.0.0.nupkg")

paket ("pack -v output \"" + outPath + "\"") scenario |> ignore
ZipFile.ExtractToDirectory(package, outPath)

Path.Combine(outPath, "lib", "netstandard2.0", "LibForTest.dll") |> checkFileExists
Path.Combine(outPath, "lib", "netstandard2.0", "de", "LibForTest.resources.dll") |> checkFileExists
Path.Combine(outPath, "lib", "netstandard2.0", "ru", "LibForTest.resources.dll") |> checkFileExists
Path.Combine(outPath, "lib", "netstandard2.0", "en-US", "LibForTest.resources.dll") |> checkFileExists

CleanDir rootPath

[<Test>]
let ``#1848 single template without include-referenced-projects`` () =
let scenario = "i001848-pack-single-template-wo-incl-flag"
Expand Down Expand Up @@ -566,6 +584,41 @@ let ``#3164 pack analyzer`` () =

CleanDir rootPath


[<Test>]
let ``#3165 pack multitarget with p2p`` () =
let scenario = "i003165-pack-multitarget-with-p2p"
prepareSdk scenario
let rootPath = scenarioTempPath scenario

directDotnet true "build MyProj.Main -c Release" rootPath
|> Seq.iter (printfn "%A")

let outPath = Path.Combine(rootPath, "out")
directPaket (sprintf """pack "%s" """ outPath) scenario
|> Seq.iter (printfn "%A")

let nupkgPath = Path.Combine(outPath, "MyProj.Main.1.0.0.nupkg")

if File.Exists nupkgPath |> not then Assert.Fail(sprintf "Expected '%s' to exist" nupkgPath)
let nuspec = NuGetLocal.getNuSpecFromNupgk nupkgPath
let depsByTfm byTfm = nuspec.Dependencies.Value |> Seq.choose (fun (pkgName,version,tfm) -> if (tfm.GetExplicitRestriction()) = byTfm then Some (pkgName,version) else None) |> Seq.toList
let pkgVer name version = (PackageName name), (VersionRequirement.Parse version)

let tfmNET45 = FrameworkIdentifier.DotNetFramework(FrameworkVersion.V4_5)
CollectionAssert.AreEquivalent([ pkgVer "FSharp.Core" "3.1.2.5"; pkgVer "Argu" "4.2.1" ], depsByTfm (FrameworkRestriction.AtLeast(tfmNET45)))

let tfmNETSTANDARD2_0 = FrameworkIdentifier.DotNetStandard(DotNetStandardVersion.V2_0)
CollectionAssert.AreEquivalent([ pkgVer "FSharp.Core" "4.5.1"; pkgVer "Argu" "5.1.0" ], depsByTfm (FrameworkRestriction.And [FrameworkRestriction.NotAtLeast(tfmNET45); FrameworkRestriction.AtLeast(tfmNETSTANDARD2_0)]))

CollectionAssert.AreEquivalent([ pkgVer "MyProj.Common" "1.0.0" ], depsByTfm (FrameworkRestriction.Or [FrameworkRestriction.AtLeast(tfmNET45); FrameworkRestriction.AtLeast(tfmNETSTANDARD2_0)]))

let unzippedNupkgPath = Path.Combine(outPath, "MyProj.Main")
ZipFile.ExtractToDirectory(nupkgPath, unzippedNupkgPath)
Path.Combine(unzippedNupkgPath, "lib", "net45", "MyProj.Main.dll") |> checkFileExists
Path.Combine(unzippedNupkgPath, "lib", "netstandard2.0", "MyProj.Main.dll") |> checkFileExists

CleanDir rootPath

[<Test>]
[<Ignore("disabled for now, because require .net core 2.1.300")>]
Expand Down
Loading

0 comments on commit 892ac47

Please sign in to comment.