From cf8293d8ae423b0a4c819d6c594638fc8043baba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Thu, 20 Oct 2016 01:04:43 +0200 Subject: [PATCH 01/88] Initial draft of paket completion --- completion/paket-completion.zsh | 321 ++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 completion/paket-completion.zsh diff --git a/completion/paket-completion.zsh b/completion/paket-completion.zsh new file mode 100644 index 0000000000..0ea8169f41 --- /dev/null +++ b/completion/paket-completion.zsh @@ -0,0 +1,321 @@ +#compdef paket.exe + +# Zsh completion script for Paket (https://github.com/fsprojects/Paket/). +# +# This script is based on the excellent git complection in zsh. Many thanks +# to its authors! + +_paket() { + # TODO + echo $service > /tmp/_paket + + local curcontext=$curcontext state line ret=1 + local -A opt_args + + # Do not offer anything after these options. + local -a terminating_options + terminating_options=( + '(- :)'--version'[show Paket version]' + ) + + # Currently not implemented: + # ! means that if these options were specified right after paket, do not + # offer them as completions for the command. + # E.g. paket --verbose install -- won't show verbose again + local -a global_options + global_options=( + '(- :)'--help'[display help]' + '(--log-file)'--log-file'[print output to a file]:log file:_files' + '(-s --silent)'{-s,--silent}'[suppress console output]' + '(-v --verbose)'{-v,--verbose}'[print detailed information to the console]' + ) + + local -a keep_options + keep_options=( + '(--keep-major --keep-minor --keep-patch)'--keep-major'[only allow updates that preserve the major version]' + '(--keep-major --keep-minor --keep-patch)'--keep-minor'[only allow updates that preserve the minor version]' + '(--keep-major --keep-minor --keep-patch)'--keep-patch'[only allow updates that preserve the patch version]' + ) + + local -a binding_redirects_options + binding_redirects_options=( + '(--redirects)'--redirects'[create binding redirects]' + '(--clean-redirects)'--clean-redirects'[remove binding redirects that were not created by Paket]' + '(--create-new-binding-files)'--create-new-binding-files'[create binding redirect files if needed]' + ) + + local -a download_options + download_options=( + '(-f --force)'{-f,--force}'[force download and reinstallation of all dependencies]' + '(--touch-affected-refs)'--touch-affected-refs'[touch project files referencing affected dependencies to help incremental build tools detecting the change]' + ) + + # --verbose, --log-file and --silent (see above) + # These can appear as the first option, optionally followed by a command. + # + # --version and --help (see above) + # No more options are allowed afterwards. + # + # command + # Does not start with dash. + # + # option-or-argument + # This is the "rest" argument. + # + # For more information, see http://zsh.sourceforge.net/Doc/Release/Completion-System.html + # and search for "Each of the forms above may be preceded by a list in + # parentheses of option names and argument numbers". + _arguments -C \ + $terminating_options \ + $global_options \ + '(-): :->command' \ + '(-)*:: :->option-or-argument' \ + && return + + # TODO + typeset -p state >> /tmp/_paket + + case "$state" in + (command) + _paket_commands && ret=0 + ;; + + (option-or-argument) + curcontext=${curcontext%:*:*}:paket-$words[1]: + typeset -p curcontext >> /tmp/_paket + typeset -p words >> /tmp/_paket + + if ! _call_function ret _paket-$words[1]; then + _message "paket command '$words[1]' is not implemented, please contact @agross" + + if zstyle -T :completion:$curcontext: use-fallback; then + _default && ret=0 + fi + fi + ;; + esac + + return ret +} + +#(( $+functions[_paket-add] )) || +_paket-add() { + local curcontext=$curcontext state line ret=1 + declare -A opt_args + + local -a args + args=( + $global_options + $keep_options + $binding_redirects_options + $download_options + '(--interactive -i)'{--interactive,-i}"[ask for every project whether to add the dependency]" + '(--no-install)'--no-install'[skip install process after resolving dependencies]' + '(--project -p)'{--project,-p}'[add the package to a single project only]:project:_path_files -g "**/*.??proj"' + '(--version -V)'{--version,-V}'[package version constraint]:version constraint' + '(--group -g)'{--group,-g}'[add the package to a group (default: Main group)]:group:_paket_groups' + ) + + _arguments -C \ + $args \ + ':NuGet package ID' \ + && ret=0 + + return ret +} + +#(( $+functions[_paket-install] )) || +_paket-install() { + _arguments \ + $global_options \ + $keep_options \ + $binding_redirects_options \ + $download_options +} + +#(( $+functions[_paket-restore] )) || +_paket-restore() { + local curcontext=$curcontext state line ret=1 + declare -A opt_args + + local -a args + args=( + $global_options + $download_options + '(--ignore-checks)'--ignore-checks'[Skips the test if paket.dependencies and paket.lock are in sync]' + '(--references-files --only-referenced)'--references-files'[Restore all packages from the given paket.references files. This implies --only-referenced]' + ) + + _arguments -C \ + $args \ + ': :->command' \ + '*:: :->option-or-argument' \ + && ret=0 + + case $state in + (command) + local -a commands + + commands=( + group:'Restore a single group' + ) + + _describe -t commands command commands && ret=0 + ;; + + (option-or-argument) + curcontext=${curcontext%:*}-$line[1]: + + if [[ $line[1] == 'group' ]]; then + _arguments \ + ': :_paket_groups' \ + $args \ + && ret=0 + fi + ;; + esac + + return ret +} + +(( $+functions[_paket_commands] )) || +_paket_commands() { + local -a types + types=( + dependency + inspection + nuget + misc + ) + + for type in $types; do + local -a $type + done + + dependency=( + add:'add a new dependency to paket.dependencies' + install:'download the dependencies specified by paket.dependencies or paket.lock into the packages/ directory and update projects' + outdated:'find dependencies that have newer versions available' + remove:'remove a dependency from paket.dependencies and all paket.references files' + restore:'download the dependencies specified by the paket.lock file into the packages/ directory' + simplify:'simplify paket.dependencies and paket.references by removing transitive dependencies' + update:'update dependencies to their latest version' + ) + + inspection=( + find-packages:'search for packages' + find-package-versions:'search for package versions' + find-refs:'find all project files that have a dependency installed' + show-groups:'show groups' + show-installed-packages:'show installed top-level packages' + why:'determine why a dependency is required' + ) + + nuget=( + convert-from-nuget:'convert projects from NuGet to Paket' + fix-nuspecs:'patch a list of .nuspec files to correct transitive dependencies' + generate-nuspec:'generate a default nuspec for a project including its direct dependencies' + pack:'pack paket.template files within this repository' + push:'push a .nupkg file' + ) + + misc=( + auto-restore:'manage automatic package restore during the build process inside Visual Studio' + clear-cache:'clear the NuGet and git cache directories' + config:'store global configuration values like NuGet credentials' + generate-load-scripts:'generate C# and F# include scripts that reference installed packages in a interactive environment like F# Interactive or ScriptCS' + init:'create an empty paket.dependencies file in the current working directory' + ) + + for type in $types; do + local -a all_commands "${type}_commands" + + # Remove everything after the colon of the command definition above. + set -A "${type}_commands" ${(P)type%%:*} + # Copy command list to all_commands. + all_commands+=(${(P)${:-${type}_commands}}) + done + + # To get the length of the longest matching command, filter the list of + # commands down to the prefix the user typed. + # Get applicable matchers. + local expl + _description '' expl '' + local -a all_matching_commands + compadd "$expl[@]" -O all_matching_commands -a all_commands + # Length of longest match. + longest_match=${#${(O)all_matching_commands//?/.}[1]} + + # Verbose/long display requested? + local -a disp + if zstyle -T ":completion:${curcontext}:" verbose; then + disp=(-ld '${type}_desc') + fi + + local -a alternatives + for type in $types; do + local -a "${type}_desc" + + # Write description: + # 1. command padded with spaces up to longest_match + # 2. ' -- ' + # 3. description, trimmed if longer than screen width + set -A "${type}_desc" \ + ${${(r.$COLUMNS-1.)${(P)type}/(#s)(#m)[^:]##:/${(r.longest_match.)MATCH[1,-2]} -- }%% #} + + alternatives+=("${type}:$type command:compadd ${(e)disp} -a ${type}_commands") + done + + _alternative $alternatives +} + +#(( $+functions[_paket_groups] )) || +_paket_groups() { + local -a groups + local output exit_status + + # Replace CR, in case we're running on Windows. + output="${$(_call_program groups "$(_paket_executable)" show-groups 2> /dev/null)//$'\r'/}" + _paket_command_successful $? || return 1 + + # Split output on \n, creating array of lines. + groups=(${${(f)output}}) + + # Remove first and last two lines (paket version and performance), sort elements. + groups=(${(i)groups[2,-3]}) + + _wanted paket-groups expl 'paket group' compadd $groups +} + +#(( $+functions[_paket_command_successful] )) || +_paket_command_successful () { + if (( ${#*:#0} > 0 )); then + _message "paket invocation failed with exit status $1" + return 1 + fi + return 0 +} + +#(( $+functions[_paket_executable] )) || +_paket_executable() { + local -a locations + locations=( + ./.paket/$service + ./$service + ) + + if [[ $OS != 'Windows_NT' ]]; then + local mono=mono + fi + + local location + for location in $locations; do + [[ -f "$location" ]] && echo $mono $location && return + done + + return 1 +} + +_paket "$@" + +# vim: ft=zsh sw=2 ts=2 et From 08d5b7881cb3831b1711ac1cbe2fa7f890f6471a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Tue, 13 Jun 2017 22:08:48 +0200 Subject: [PATCH 02/88] Top-level commands --- src/Paket/Commands.fs | 84 +++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index ce4c2f8142..f0f62acc1c 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -33,10 +33,10 @@ with | CreateNewBindingFiles -> "Creates binding redirect files if needed." | Clean_Redirects -> "Removes all binding redirects that are not specified by Paket." | No_Install -> "Skips paket install process (patching of csproj, fsproj, ... files) after the generation of paket.lock file." - | Keep_Major -> "Allows only updates that are not changing the major version of the NuGet packages." - | Keep_Minor -> "Allows only updates that are not changing the minor version of the NuGet packages." - | Keep_Patch -> "Allows only updates that are not changing the patch version of the NuGet packages." - | Touch_Affected_Refs -> "Touches project files referencing packages which are affected, to help incremental build tools detecting the change." + | Keep_Major -> "Only allow updates that are preserving the major version of the NuGet packages" + | Keep_Minor -> "Only allow updates that are preserving the minor version of the NuGet packages" + | Keep_Patch -> "Only allow updates that are preserving the patch version of the NuGet packages" + | Touch_Affected_Refs -> "Touch project files referencing packages which are affected to help incremental build tools detecting the change" type ConfigArgs = | [] AddCredentials of string @@ -167,7 +167,7 @@ type RestoreArgs = | [] Touch_Affected_Refs | [] Ignore_Checks | [] Fail_On_Checks - | [] Group of name:string + | [] Group of name:string | [] Project of file_name:string | [] References_Files of file_name:string list | [] Target_Framework of target_framework:string @@ -247,7 +247,7 @@ with match this with | File _ -> "FileName of the nuspec file." | ReferencesFile _ -> "FileName of the nuspec file." - + type FixNuspecsArgs = | [][] Files of nuspecPaths:string list | [][] ReferencesFile of referencePath:string @@ -350,25 +350,25 @@ with | ApiKey(_) -> "Optionally specify your API key on the command line. Otherwise uses the value of the `nugetkey` environment variable." | EndPoint(_) -> "Optionally specify a custom api endpoint to push to. Defaults to `/api/v2/package`." -type GenerateLoadScriptsArgs = +type GenerateLoadScriptsArgs = | [] Groups of groups:string list | [] Framework of target:string | [] ScriptType of id:string with interface IArgParserTemplate with - member this.Usage = + member this.Usage = match this with | Groups _ -> "Groups to generate scripts for, if none are specified then generate for all groups" | Framework _ -> "Framework identifier to generate scripts for, such as net45 or netstandard1.6" | ScriptType _ -> "Language to generate scripts for, must be one of 'fsx' or 'csx'." - + type WhyArgs = | [][] NuGet of package_id:string | [] Group of name:string | Details with interface IArgParserTemplate with - member this.Usage = + member this.Usage = match this with | NuGet _ -> "Name of the NuGet package." | Group _ -> "Allows to specify the dependency group." @@ -411,36 +411,36 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Add _ -> "Adds a new package to your paket.dependencies file." - | ClearCache _ -> "Clears the NuGet and git cache folders." - | Config _ -> "Allows to store global configuration values like NuGet credentials." - | ConvertFromNuget _ -> "Converts from using NuGet to Paket." - | FindRefs _ -> "Finds all project files that have the given NuGet packages installed." - | Init _ -> "Creates an empty paket.dependencies file in the working directory." - | AutoRestore _ -> "Enables or disables automatic Package Restore in Visual Studio during the build process." - | Install _ -> "Download the dependencies specified by the paket.dependencies or paket.lock file into the `packages/` directory and update projects." - | Outdated _ -> "Lists all dependencies that have newer versions available." - | Remove _ -> "Removes a package from your paket.dependencies file and all paket.references files." - | Restore _ -> "Download the dependencies specified by the paket.lock file into the `packages/` directory." - | Simplify _ -> "Simplifies your paket.dependencies file by removing transitive dependencies." - | Update _ -> "Update one or all dependencies to their latest version and update projects." - | FindPackages _ -> "Allows to search for packages." - | FindPackageVersions _ -> "Allows to search for package versions." - | FixNuspec _ -> "[ Obsolete ] see fix-nuspecs." - | FixNuspecs _ -> "Patch a list of .nuspec files to correct transitive dependencies." - | GenerateNuspec _ -> "Generates a default nuspec for a project including its direct dependencies." - | ShowInstalledPackages _ -> "Shows all installed top-level packages." - | ShowGroups _ -> "Shows all groups." - | Pack _ -> "Packs all paket.template files within this repository." - | Push _ -> "Pushes the given `.nupkg` file." - | GenerateIncludeScripts _ -> "Obsolete, see generate-load-scripts." - | GenerateLoadScripts _ -> "Allows to generate C# and F# include scripts which references installed packages in a interactive environment like F# Interactive or ScriptCS." - | Why _ -> "Prints user-friendly reason for referencing a specified package" - | Log_File _ -> "Specify a log file for the paket process." - | Silent -> "Suppress console output for the paket process." - | Verbose -> "Enable verbose console output for the paket process." - | Version -> "Display the version." - | From_Bootstrapper -> "Call coming from the '--run' feature of the bootstrapper." + | Add _ -> "add a new dependency" + | ClearCache _ -> "clear the NuGet and git cache directories" + | Config _ -> "store global configuration values like NuGet credentials" + | ConvertFromNuget _ -> "convert projects from NuGet to Paket" + | FindRefs _ -> "find all project files that have a dependency installed" + | Init _ -> "create an empty paket.dependencies file in the current working directory" + | AutoRestore _ -> "manage automatic package restore during the build process inside Visual Studio" + | Install _ -> "download dependencies and update projects" + | Outdated _ -> "find dependencies that have newer versions available" + | Remove _ -> "remove a dependency" + | Restore _ -> "download the computed dependency graph" + | Simplify _ -> "simplify declared dependencies by removing transitive dependencies" + | Update _ -> "update dependencies to their latest version" + | FindPackages _ -> "search for dependencies" + | FindPackageVersions _ -> "search for dependency versions" + | FixNuspec _ -> "obsolete, see fix-nuspecs" + | FixNuspecs _ -> "patch a list of .nuspec files to correct transitive dependencies" + | GenerateNuspec _ -> "generate a default nuspec for a project including its direct dependencies" + | ShowInstalledPackages _ -> "show installed top-level packages" + | ShowGroups _ -> "show groups" + | Pack _ -> "create NuGet packages from paket.template files" + | Push _ -> "push a NuGet package" + | GenerateIncludeScripts _ -> "obsolete, see generate-load-scripts" + | GenerateLoadScripts _ -> "generate C# and F# include scripts that reference installed packages in a interactive environment like F# Interactive or ScriptCS" + | Why _ -> "determine why a dependency is required" + | Log_File _ -> "print output to a file" + | Silent -> "suppress console output" + | Verbose -> "print detailed information to the console" + | Version -> "show Paket version" + | From_Bootstrapper -> "call coming from the '--run' feature of the bootstrapper" let commandParser = ArgumentParser.Create(programName = "paket", errorHandler = new ProcessExiter()) @@ -452,7 +452,7 @@ let markdown (subParser : ArgumentParser) (width : int) (additionalText : string .Trim('\r', '\n') |> ensureLineBreak let afterCommandIndex = additionalText.IndexOf("# [after-command]") let afterOptionsIndex = additionalText.IndexOf("# [after-options]") - + if afterCommandIndex = -1 then "", additionalText |> cleanUp else if afterOptionsIndex = -1 then additionalText |> cleanUp, "" else (additionalText.Substring(0, afterCommandIndex) |> cleanUp, additionalText.Substring(afterOptionsIndex) |> cleanUp) @@ -468,7 +468,7 @@ let markdown (subParser : ArgumentParser) (width : int) (additionalText : string let replace (pattern : string) (replacement : string) input = System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement) - let syntax = + let syntax = subParser.PrintCommandLineSyntax(usageStringCharacterWidth = width) |> indentBy 4 From ea8fda3768a068067ebadc1d872e3994a0da4c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Tue, 13 Jun 2017 22:43:02 +0200 Subject: [PATCH 03/88] It does not make sense to invoke `paket add --version` --- src/Paket/Commands.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index f0f62acc1c..a44f32a06d 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -379,7 +379,7 @@ type Command = | [] Verbose | [] Log_File of path:string | [] Silent - | [] Version + | Version | [] From_Bootstrapper // subcommands | [] Add of ParseResults From a76920fbcce4f6fb12f0cede420cd45e3f395a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 12:03:32 +0200 Subject: [PATCH 04/88] Default argument order --- src/Paket/Commands.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index a44f32a06d..bf4e0516b6 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -376,10 +376,10 @@ with type Command = // global options + | Version + | [] Silent | [] Verbose | [] Log_File of path:string - | [] Silent - | Version | [] From_Bootstrapper // subcommands | [] Add of ParseResults From b76b10fcf30c7c1a49382624356081604c564085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Tue, 13 Jun 2017 23:45:38 +0200 Subject: [PATCH 05/88] add --- src/Paket/Commands.fs | 46 +++++++++++++++++++++---------------------- src/Paket/Program.fs | 10 +++++----- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index bf4e0516b6..455de9d171 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -5,14 +5,14 @@ open System open Argu type AddArgs = - | [][] Nuget of package_id:string - | [] Version of version:string - | [] Project of name:string - | [] Group of name:string + | [][] NuGet of package_id:string + | [] Version of version:string + | [] Project of name:string + | [] Group of name:string | [] Force | [] Interactive | Redirects - | CreateNewBindingFiles + | [] Create_New_Binding_Files | Clean_Redirects | No_Install | Keep_Major @@ -23,20 +23,20 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Nuget(_) -> "NuGet package id." - | Group(_) -> "Add the package to the given group. If omitted the Main group is used." - | Version(_) -> "Allows to specify version of the package." - | Project(_) -> "Allows to add the package to a single project only." - | Force -> "Forces the download and reinstallation of all packages." - | Interactive -> "Asks the user for every project if he or she wants to add the package to the projects's paket.references file." - | Redirects -> "Creates binding redirects for the NuGet packages." - | CreateNewBindingFiles -> "Creates binding redirect files if needed." - | Clean_Redirects -> "Removes all binding redirects that are not specified by Paket." - | No_Install -> "Skips paket install process (patching of csproj, fsproj, ... files) after the generation of paket.lock file." - | Keep_Major -> "Only allow updates that are preserving the major version of the NuGet packages" - | Keep_Minor -> "Only allow updates that are preserving the minor version of the NuGet packages" - | Keep_Patch -> "Only allow updates that are preserving the patch version of the NuGet packages" - | Touch_Affected_Refs -> "Touch project files referencing packages which are affected to help incremental build tools detecting the change" + | NuGet(_) -> "NuGet package ID" + | Group(_) -> "add the package to a group (default: Main group)" + | Version(_) -> "package version constraint" + | Project(_) -> "add the package to a single project only" + | Force -> "force download and reinstallation of all dependencies" + | Interactive -> "ask for every project whether to add the dependency" + | Redirects -> "create binding redirects" + | Create_New_Binding_Files -> "create binding redirect files if needed" + | Clean_Redirects -> "remove binding redirects that were not created by Paket" + | No_Install -> "skip install process after resolving dependencies" + | Keep_Major -> "only allow updates that preserve the major version" + | Keep_Minor -> "only allow updates that preserve the minor version" + | Keep_Patch -> "only allow updates that preserve the patch version" + | Touch_Affected_Refs -> "touch project files referencing affected dependencies to help incremental build tools detecting the change" type ConfigArgs = | [] AddCredentials of string @@ -95,7 +95,7 @@ with type InstallArgs = | [] Force | Redirects - | CreateNewBindingFiles + | [] Create_New_Binding_Files | Clean_Redirects | Keep_Major | Keep_Minor @@ -112,7 +112,7 @@ with match this with | Force -> "Forces the download and reinstallation of all packages." | Redirects -> "Creates binding redirects for the NuGet packages." - | CreateNewBindingFiles -> "Creates binding redirect files if needed." + | Create_New_Binding_Files -> "Creates binding redirect files if needed." | Clean_Redirects -> "Removes all binding redirects that are not specified by Paket." | Install_Only_Referenced -> "Only install packages that are referenced in paket.references files, instead of all packages in paket.dependencies." | Generate_Load_Scripts -> "Allows to generate C# and F# include scripts which references installed packages in a interactive environment like F# Interactive or ScriptCS." @@ -199,7 +199,7 @@ type UpdateArgs = | [] Group of name:string | [] Force | Redirects - | CreateNewBindingFiles + | [] Create_New_Binding_Files | Clean_Redirects | No_Install | Keep_Major @@ -216,7 +216,7 @@ with | Version(_) -> "Allows to specify version of the package." | Force -> "Forces the download and reinstallation of all packages." | Redirects -> "Creates binding redirects for the NuGet packages." - | CreateNewBindingFiles -> "Creates binding redirect files if needed." + | Create_New_Binding_Files -> "Creates binding redirect files if needed." | Clean_Redirects -> "Removes all binding redirects that are not specified by Paket." | No_Install -> "Skips paket install process (patching of csproj, fsproj, ... files) after the generation of paket.lock file." | Keep_Major -> "Allows only updates that are not changing the major version of the NuGet packages." diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs index 1b5ad7deaf..1bffc4477e 100644 --- a/src/Paket/Program.fs +++ b/src/Paket/Program.fs @@ -98,18 +98,18 @@ let processWithValidation silent validateF commandF (result : ParseResults<'T>) | Profile.Category.Other -> tracefn " - Other: %s" (Utils.TimeSpanToReadableString elapsed) ) - + tracefn " - Runtime: %s" (Utils.TimeSpanToReadableString realTime) let processCommand silent commandF result = processWithValidation silent (fun _ -> true) commandF result let add (results : ParseResults<_>) = - let packageName = results.GetResult <@ AddArgs.Nuget @> + let packageName = results.GetResult <@ AddArgs.NuGet @> let version = defaultArg (results.TryGetResult <@ AddArgs.Version @>) "" let force = results.Contains <@ AddArgs.Force @> let redirects = results.Contains <@ AddArgs.Redirects @> - let createNewBindingFiles = results.Contains <@ AddArgs.CreateNewBindingFiles @> + let createNewBindingFiles = results.Contains <@ AddArgs.Create_New_Binding_Files @> let cleanBindingRedirects = results.Contains <@ AddArgs.Clean_Redirects @> let group = results.TryGetResult <@ AddArgs.Group @> let noInstall = results.Contains <@ AddArgs.No_Install @> @@ -181,7 +181,7 @@ let clearCache (results : ParseResults) = let install (results : ParseResults<_>) = let force = results.Contains <@ InstallArgs.Force @> let withBindingRedirects = results.Contains <@ InstallArgs.Redirects @> - let createNewBindingFiles = results.Contains <@ InstallArgs.CreateNewBindingFiles @> + let createNewBindingFiles = results.Contains <@ InstallArgs.Create_New_Binding_Files @> let cleanBindingRedirects = results.Contains <@ InstallArgs.Clean_Redirects @> let installOnlyReferenced = results.Contains <@ InstallArgs.Install_Only_Referenced @> let generateLoadScripts = results.Contains <@ InstallArgs.Generate_Load_Scripts @> @@ -257,7 +257,7 @@ let update (results : ParseResults<_>) = let group = results.TryGetResult <@ UpdateArgs.Group @> let withBindingRedirects = results.Contains <@ UpdateArgs.Redirects @> let cleanBindingRedirects = results.Contains <@ UpdateArgs.Clean_Redirects @> - let createNewBindingFiles = results.Contains <@ UpdateArgs.CreateNewBindingFiles @> + let createNewBindingFiles = results.Contains <@ UpdateArgs.Create_New_Binding_Files @> let semVerUpdateMode = if results.Contains <@ UpdateArgs.Keep_Patch @> then SemVerUpdateMode.KeepPatch else if results.Contains <@ UpdateArgs.Keep_Minor @> then SemVerUpdateMode.KeepMinor else From fa7b6c7a43d739ceaec2f91f4c7fd07ea011b1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 12:12:49 +0200 Subject: [PATCH 06/88] why --- src/Paket/Commands.fs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 455de9d171..1020438b84 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -363,16 +363,16 @@ with | ScriptType _ -> "Language to generate scripts for, must be one of 'fsx' or 'csx'." type WhyArgs = - | [][] NuGet of package_id:string - | [] Group of name:string + | [][] NuGet of package_id:string + | [] Group of name:string | Details with interface IArgParserTemplate with member this.Usage = match this with - | NuGet _ -> "Name of the NuGet package." - | Group _ -> "Allows to specify the dependency group." - | Details -> "Display detailed info with all possible paths, versions and framework constraints." + | NuGet(_) -> "NuGet package ID" + | Group(_) -> "specifiy dependency group (default: Main group)" + | Details -> "display detailed information with all paths, versions and framework restrictions" type Command = // global options From 84922196f7226c84ac4cfc894eafc94e2e542493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 17:00:50 +0200 Subject: [PATCH 07/88] Stay backward compatible with add and why: * do not report old-style options in help text * issue warnings when old style is used * fail when an option is given in old style and new style at the same time --- src/Paket/Commands.fs | 39 +++++++++++--- src/Paket/Program.fs | 119 ++++++++++++++++++++++++++++-------------- 2 files changed, 111 insertions(+), 47 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 1020438b84..3b4db7a932 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -5,14 +5,24 @@ open System open Argu type AddArgs = - | [][] NuGet of package_id:string + | [] NuGet of package_id:string + | [] NuGet_Legacy of package_id:string + | [] Version of version:string + | [] Version_Legacy of version:string + | [] Project of name:string + | [] Project_Legacy of name:string + | [] Group of name:string + | [] Group_Legacy of name:string + + | Create_New_Binding_Files + | [] Create_New_Binding_Files_Legacy + | [] Force | [] Interactive | Redirects - | [] Create_New_Binding_Files | Clean_Redirects | No_Install | Keep_Major @@ -24,13 +34,23 @@ with member this.Usage = match this with | NuGet(_) -> "NuGet package ID" + | NuGet_Legacy(_) -> "[obsolete]" + | Group(_) -> "add the package to a group (default: Main group)" + | Group_Legacy(_) -> "[obsolete]" + | Version(_) -> "package version constraint" + | Version_Legacy(_) -> "[obsolete]" + | Project(_) -> "add the package to a single project only" + | Project_Legacy(_) -> "[obsolete]" + + | Create_New_Binding_Files -> "create binding redirect files if needed" + | Create_New_Binding_Files_Legacy -> "[obsolete]" + | Force -> "force download and reinstallation of all dependencies" | Interactive -> "ask for every project whether to add the dependency" | Redirects -> "create binding redirects" - | Create_New_Binding_Files -> "create binding redirect files if needed" | Clean_Redirects -> "remove binding redirects that were not created by Paket" | No_Install -> "skip install process after resolving dependencies" | Keep_Major -> "only allow updates that preserve the major version" @@ -154,7 +174,6 @@ with | Interactive -> "Asks the user for every project if he or she wants to remove the package from the projects's paket.references file. By default every installation of the package is removed." | No_Install -> "Skips paket install process (patching of csproj, fsproj, ... files) after the generation of paket.lock file." - type ClearCacheArgs = | [] NoArg with @@ -237,7 +256,6 @@ with | Source _ -> "Allows to specify the package source feed." | MaxResults _ -> "Maximum number of results." - type FixNuspecArgs = | [][] File of text:string | [][] ReferencesFile of text:string @@ -258,7 +276,6 @@ with | Files _ -> "List of .nuspec files to fix transitive dependencies within." | ReferencesFile _ -> "FileName of the nuspec file." - type GenerateNuspecArgs = | [][] Project of project:string | [][] DependenciesFile of dependenciesPath:string @@ -363,15 +380,23 @@ with | ScriptType _ -> "Language to generate scripts for, must be one of 'fsx' or 'csx'." type WhyArgs = - | [][] NuGet of package_id:string + | [] NuGet of package_id:string + | [] NuGet_Legacy of package_id:string + | [] Group of name:string + | [] Group_Legacy of name:string + | Details with interface IArgParserTemplate with member this.Usage = match this with | NuGet(_) -> "NuGet package ID" + | NuGet_Legacy(_) -> "[obsolete]" + | Group(_) -> "specifiy dependency group (default: Main group)" + | Group_Legacy(_) -> "[obsolete]" + | Details -> "display detailed information with all paths, versions and framework restrictions" type Command = diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs index 1bffc4477e..e165f6773c 100644 --- a/src/Paket/Program.fs +++ b/src/Paket/Program.fs @@ -47,14 +47,14 @@ let processWithValidation silent validateF commandF (result : ParseResults<'T>) let l = group |> Seq.toList cat, l.Length, l |> Seq.map (fun ev -> ev.Duration) |> Seq.fold (+) (TimeSpan())) |> Seq.toList - let blockedRaw = + let blockedRaw = groupedResults |> List.filter (function Profile.Category.ResolverAlgorithmBlocked _, _, _ -> true | _ -> false) let blocked = blockedRaw |> List.map (fun (_,_,t) -> t) |> Seq.fold (+) (TimeSpan()) - let resolver = + let resolver = match groupedResults |> List.tryPick (function Profile.Category.ResolverAlgorithm, _, s -> Some s | _ -> None) with | Some s -> s | None -> TimeSpan() @@ -104,14 +104,48 @@ let processWithValidation silent validateF commandF (result : ParseResults<'T>) let processCommand silent commandF result = processWithValidation silent (fun _ -> true) commandF result +let warnObsolete o n = + traceWarn (sprintf "Please use the new syntax: %s -> %s" o n) + +let failObsolete o n = + failwithf "You cannot use the old and new syntax at the same time: %s <-> %s" o n + +let legacyBool (results : ParseResults<_>) newSyntax oldSyntax (list : bool*bool) = + match list with + | (true, false) -> + true + | (false, true) -> + warnObsolete oldSyntax newSyntax + true + | (true, true) -> + failObsolete oldSyntax newSyntax + | (false, false) -> + false + +let legacyOption (results : ParseResults<_>) newSyntax oldSyntax list = + match list with + | (Some id, None) -> + Some id + | (None, Some id) -> + warnObsolete oldSyntax newSyntax + Some id + | (Some _, Some _) -> + failObsolete oldSyntax newSyntax + | (_, _) -> None + let add (results : ParseResults<_>) = - let packageName = results.GetResult <@ AddArgs.NuGet @> - let version = defaultArg (results.TryGetResult <@ AddArgs.Version @>) "" + let packageNameOld = results.GetResults <@ AddArgs.NuGet_Legacy @> |> List.tryLast + let packageNameNew = results.GetResults <@ AddArgs.NuGet @> |> List.tryLast + let packageName = match (packageNameNew, packageNameOld) |> legacyOption results "(omit, option is the new default argument)" "nuget" with + | Some(id) -> + id + | _ -> results.GetResult <@ AddArgs.NuGet @> + let version = defaultArg ((results.TryGetResult <@ AddArgs.Version @>, results.TryGetResult <@ AddArgs.Version_Legacy @>) |> legacyOption results "--version" "version") "" let force = results.Contains <@ AddArgs.Force @> let redirects = results.Contains <@ AddArgs.Redirects @> - let createNewBindingFiles = results.Contains <@ AddArgs.Create_New_Binding_Files @> + let createNewBindingFiles = (results.Contains <@ AddArgs.Create_New_Binding_Files @>, results.Contains <@ AddArgs.Create_New_Binding_Files_Legacy @>) |> legacyBool results "--create-new-binding-files" "--createnewbindingfiles" let cleanBindingRedirects = results.Contains <@ AddArgs.Clean_Redirects @> - let group = results.TryGetResult <@ AddArgs.Group @> + let group = (results.TryGetResult <@ AddArgs.Group @>, results.TryGetResult <@ AddArgs.Group_Legacy @>) |> legacyOption results "--group" "group" let noInstall = results.Contains <@ AddArgs.No_Install @> let semVerUpdateMode = if results.Contains <@ AddArgs.Keep_Patch @> then SemVerUpdateMode.KeepPatch else @@ -119,8 +153,9 @@ let add (results : ParseResults<_>) = if results.Contains <@ AddArgs.Keep_Major @> then SemVerUpdateMode.KeepMajor else SemVerUpdateMode.NoRestriction let touchAffectedRefs = results.Contains <@ AddArgs.Touch_Affected_Refs @> + let project = (results.TryGetResult <@ AddArgs.Project @>, results.TryGetResult <@ AddArgs.Project_Legacy @>) |> legacyOption results "--project" "project" - match results.TryGetResult <@ AddArgs.Project @> with + match project with | Some projectName -> Dependencies.Locate().AddToProject(group, packageName, version, force, redirects, cleanBindingRedirects, createNewBindingFiles, projectName, noInstall |> not, semVerUpdateMode, touchAffectedRefs) | None -> @@ -196,15 +231,15 @@ let install (results : ParseResults<_>) = let touchAffectedRefs = results.Contains <@ InstallArgs.Touch_Affected_Refs @> Dependencies.Locate().Install( - force, - withBindingRedirects, - cleanBindingRedirects, - createNewBindingFiles, - installOnlyReferenced, - semVerUpdateMode, - touchAffectedRefs, - generateLoadScripts, - providedFrameworks, + force, + withBindingRedirects, + cleanBindingRedirects, + createNewBindingFiles, + installOnlyReferenced, + semVerUpdateMode, + touchAffectedRefs, + generateLoadScripts, + providedFrameworks, providedScriptTypes, alternativeProjectRoot) @@ -237,14 +272,14 @@ let restore (results : ParseResults<_>) = let ignoreChecks = results.Contains <@ RestoreArgs.Ignore_Checks @> let failOnChecks = results.Contains <@ RestoreArgs.Fail_On_Checks @> let targetFramework = results.TryGetResult <@ RestoreArgs.Target_Framework @> - + match project with | Some project -> Dependencies.Locate().Restore(force, group, project, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework) | None -> - if List.isEmpty files then + if List.isEmpty files then Dependencies.Locate().Restore(force, group, installOnlyReferenced, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework) - else + else Dependencies.Locate().Restore(force, group, files, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework) let simplify (results : ParseResults<_>) = @@ -317,7 +352,11 @@ let findPackages silent (results : ParseResults<_>) = for p in Dependencies.FindPackagesByName(sources,searchText,maxResults) do tracefn "%s" p - match results.TryGetResult <@ FindPackagesArgs.SearchText @> with + let searchOld = results.GetResults <@ FindPackagesArgs.Search_Legacy @> |> List.tryLast + let searchNew = results.GetResults <@ FindPackagesArgs.Search @> |> List.tryLast + let search = (searchNew, searchOld) |> legacyOption results "(option was removed)" "searchtext" + + match search with | None -> let rec repl () = if not silent then @@ -333,20 +372,17 @@ let findPackages silent (results : ParseResults<_>) = | Some searchText -> searchAndPrint searchText - let fixNuspecs silent (results : ParseResults<_>) = let referenceFile = results.GetResult <@ FixNuspecsArgs.ReferencesFile @> - let nuspecFiles = results.GetResult <@ FixNuspecsArgs.Files @> + let nuspecFiles = results.GetResult <@ FixNuspecsArgs.Files @> Dependencies.FixNuspecs (referenceFile, nuspecFiles) - // For Backwards compatibility let fixNuspec silent (results : ParseResults<_>) = - let fileString = results.GetResult <@ FixNuspecArgs.File @> - let refFile = results.GetResult <@ FixNuspecArgs.ReferencesFile @> + let fileString = results.GetResult <@ FixNuspecArgs.File @> + let refFile = results.GetResult <@ FixNuspecArgs.ReferencesFile @> let nuspecList = fileString.Split([|';'|])|>List.ofArray Dependencies.FixNuspecs (refFile, nuspecList) - // separated out from showInstalledPackages to allow Paket.PowerShell to get the types let getInstalledPackages (results : ParseResults<_>) = @@ -407,42 +443,45 @@ let push (results : ParseResults<_>) = ?endPoint = results.TryGetResult <@ PushArgs.EndPoint @>, ?apiKey = results.TryGetResult <@ PushArgs.ApiKey @>) - let generateLoadScripts (results : ParseResults) = let providedFrameworks = results.GetResults <@ GenerateLoadScriptsArgs.Framework @> let providedScriptTypes = results.GetResults <@ GenerateLoadScriptsArgs.ScriptType @> - let providedGroups = defaultArg (results.TryGetResult<@ GenerateLoadScriptsArgs.Groups @>) [] + let providedGroups = defaultArg (results.TryGetResult<@ GenerateLoadScriptsArgs.Groups @>) [] Dependencies.Locate().GenerateLoadScripts providedGroups providedFrameworks providedScriptTypes - let generateNuspec (results:ParseResults) = let projectFile = results.GetResult <@ GenerateNuspecArgs.Project @> let dependencies = results.GetResult <@ GenerateNuspecArgs.DependenciesFile @> let output = defaultArg (results.TryGetResult <@ GenerateNuspecArgs.Output @>) (Directory.GetCurrentDirectory()) - let filename, nuspec = Nuspec.FromProject(projectFile,dependencies) + let filename, nuspec = Nuspec.FromProject(projectFile,dependencies) let nuspecString = nuspec.ToString() File.WriteAllText (Path.Combine (output,filename), nuspecString) let why (results: ParseResults) = - let packageName = results.GetResult <@ WhyArgs.NuGet @> |> Domain.PackageName - let groupName = - defaultArg - (results.TryGetResult <@ WhyArgs.Group @> |> Option.map Domain.GroupName) + let packageNameOld = results.GetResults <@ WhyArgs.NuGet_Legacy @> |> List.tryLast + let packageNameNew = results.GetResults <@ WhyArgs.NuGet @> |> List.tryLast + let packageName = match (packageNameNew, packageNameOld) |> legacyOption results "(omit, option is the new default argument)" "nuget" with + | Some(id) -> + id + | _ -> results.GetResult <@ WhyArgs.NuGet @> + |> Domain.PackageName + let groupName = + defaultArg + ((results.TryGetResult <@ WhyArgs.Group @>, results.TryGetResult <@ WhyArgs.Group_Legacy @>) |> legacyOption results "--group" "group" |> Option.map Domain.GroupName) Constants.MainDependencyGroup let dependencies = Dependencies.Locate() let lockFile = dependencies.GetLockFile() - let directDeps = + let directDeps = dependencies .GetDependenciesFile() .GetDependenciesInGroup(groupName) |> Seq.map (fun pair -> pair.Key) |> Set.ofSeq - let options = + let options = { Why.WhyOptions.Details = results.Contains <@ WhyArgs.Details @> } Why.ohWhy(packageName, directDeps, lockFile, groupName, results.Parser.PrintUsage(), options) - let main() = let resolution = Environment.GetEnvironmentVariable ("PAKET_DISABLE_RUNTIME_RESOLUTION") if System.String.IsNullOrEmpty resolution then @@ -465,7 +504,7 @@ let main() = let fromBootstrapper = results.Contains <@ From_Bootstrapper @> - let version = results.Contains <@ Version @> + let version = results.Contains <@ Version @> if not version then use fileTrace = @@ -509,7 +548,7 @@ let main() = with | exn when not (exn :? System.NullReferenceException) -> -#if NETCOREAPP1_0 +#if NETCOREAPP1_0 // Environment.ExitCode not supported #else Environment.ExitCode <- 1 @@ -519,4 +558,4 @@ let main() = printErrorExt true true false exn else printError exn -main() \ No newline at end of file +main() From fba4d1c75c4ba567697c53d6255b5995ac4758a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 18:30:19 +0200 Subject: [PATCH 08/88] Docs: review --- Paket.sln | 8 +++ docs/content/analyzers.md | 6 +- docs/content/bootstrapper.md | 2 +- docs/content/caches.md | 2 +- docs/content/commands/add.md | 14 ++--- docs/content/commands/find-packages.md | 2 +- docs/content/commands/remove.md | 2 +- docs/content/commands/why.md | 2 +- docs/content/convert-from-nuget-tutorial.md | 4 +- docs/content/faq.md | 6 +- docs/content/getting-started.md | 48 +++++++-------- docs/content/github-dependencies.md | 30 +++++----- docs/content/glossary.md | 4 +- docs/content/installation.md | 8 +-- docs/content/local-file.md | 2 +- docs/content/nuget-dependencies.md | 6 +- docs/content/paket-folder.md | 2 +- docs/content/paket-push.md | 25 -------- docs/content/references-files.md | 28 ++++----- docs/content/template-files.md | 66 ++++++++++----------- 20 files changed, 125 insertions(+), 142 deletions(-) delete mode 100644 docs/content/paket-push.md diff --git a/Paket.sln b/Paket.sln index 9320683307..02405909f5 100644 --- a/Paket.sln +++ b/Paket.sln @@ -37,6 +37,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D docs\content\analyzers.md = docs\content\analyzers.md docs\content\bootstrapper.md = docs\content\bootstrapper.md docs\content\caches.md = docs\content\caches.md + docs\content\controlling-nuget-resolution.md = docs\content\controlling-nuget-resolution.md docs\content\convert-from-nuget-tutorial.md = docs\content\convert-from-nuget-tutorial.md docs\content\dependencies-file.md = docs\content\dependencies-file.md docs\content\editor-support.md = docs\content\editor-support.md @@ -49,13 +50,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D docs\content\http-dependencies.md = docs\content\http-dependencies.md docs\content\index.md = docs\content\index.md docs\content\installation.md = docs\content\installation.md + docs\content\license.md = docs\content\license.md docs\content\local-file.md = docs\content\local-file.md docs\content\lock-file.md = docs\content\lock-file.md docs\content\nuget-dependencies.md = docs\content\nuget-dependencies.md docs\content\paket-folder.md = docs\content\paket-folder.md docs\content\paket.dependencies = docs\content\paket.dependencies + docs\content\paket.lock = docs\content\paket.lock docs\content\reference-from-repl.fsx = docs\content\reference-from-repl.fsx docs\content\references-files.md = docs\content\references-files.md + docs\content\release-notes.md = docs\content\release-notes.md docs\content\resolver.fsx = docs\content\resolver.fsx docs\content\template-files.md = docs\content\template-files.md docs\content\testimonials.md = docs\content\testimonials.md @@ -82,12 +86,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "commands", "commands", "{44 docs\content\commands\find-packages.md = docs\content\commands\find-packages.md docs\content\commands\find-refs.md = docs\content\commands\find-refs.md docs\content\commands\generate-include-scripts.md = docs\content\commands\generate-include-scripts.md + docs\content\commands\generate-load-scripts.md = docs\content\commands\generate-load-scripts.md + docs\content\commands\install.md = docs\content\commands\install.md docs\content\commands\outdated.md = docs\content\commands\outdated.md docs\content\commands\pack.md = docs\content\commands\pack.md docs\content\commands\remove.md = docs\content\commands\remove.md + docs\content\commands\restore.md = docs\content\commands\restore.md docs\content\commands\show-installed-packages.md = docs\content\commands\show-installed-packages.md docs\content\commands\simplify.md = docs\content\commands\simplify.md docs\content\commands\update.md = docs\content\commands\update.md + docs\content\commands\why.md = docs\content\commands\why.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Paket.Bootstrapper.Tests", "tests\Paket.Bootstrapper.Tests\Paket.Bootstrapper.Tests.csproj", "{7C622582-E281-4EAB-AADA-B5893BB89B45}" diff --git a/docs/content/analyzers.md b/docs/content/analyzers.md index 577b272caf..8d5c34208f 100644 --- a/docs/content/analyzers.md +++ b/docs/content/analyzers.md @@ -17,8 +17,8 @@ automated migration from now-Obsolete constructs or warnings on incorrect usage. ## Referencing analyzers -When a NuGet package containing analyzers is added to a [`paket.references`](references-files.html) -file, the analyzers will be installed in the corresponding projects automatically by Paket. +When a NuGet package containing analyzers is added to a [`paket.references` file](references-files.html), +the analyzers will be installed in the corresponding projects automatically by Paket. ![Analyzer node in Visual Studio project](img/analyzers-in-vs.png) @@ -43,7 +43,7 @@ The structure look like : | | |- My.SharedAnalyzer.dll ``` -The general structure is : +The general structure is: /analyzers/dotnet/*language*/*my_analyzer*.dll diff --git a/docs/content/bootstrapper.md b/docs/content/bootstrapper.md index e542f45a2f..62543fd197 100644 --- a/docs/content/bootstrapper.md +++ b/docs/content/bootstrapper.md @@ -72,7 +72,7 @@ Example file: ### In paket.dependencies -If a [`paket.dependencies`](dependencies-file.html) file can be found in the current directory it can contain a +If a [`paket.dependencies` file](dependencies-file.html) can be found in the current directory it can contain a special line containing options for the bootstrapper. The line must start with `version` followed by a requested `paket.exe` version and optionally bootstrapper command line arguments: diff --git a/docs/content/caches.md b/docs/content/caches.md index 0d8509d599..69be8f5fe8 100644 --- a/docs/content/caches.md +++ b/docs/content/caches.md @@ -37,7 +37,7 @@ The configuration can be done in the [`paket.dependencies` file](dependencies-f [lang=paket] source https://nuget.org/api/v2 - cache ./nupkgs versions: current + cache ./nupkgs versions: current nuget Newtonsoft.Json nuget UnionArgParser diff --git a/docs/content/commands/add.md b/docs/content/commands/add.md index 1f95907ebe..57dfd0805f 100644 --- a/docs/content/commands/add.md +++ b/docs/content/commands/add.md @@ -3,24 +3,24 @@ By default a package is only added to the solution, but not on any of its projects. It's possible to add the package to a specified project at the same: [lang=batchfile] - $ paket add nuget PACKAGENAME [version VERSION] [project PROJECT] [--force] + $ paket add PACKAGEID [--version VERSION] [--project PROJECT] [--force] -See also [paket remove](paket-remove.html). +See also [`paket remove`](paket-remove.html). -## Sample +## Example -Consider the following paket.dependencies file: +Consider the following [`paket.dependencies` file](dependencies-file.html): [lang=paket] source https://nuget.org/api/v2 nuget FAKE -Now we run `paket add nuget xunit --interactive` to install the package: +Now we run `paket add xunit --interactive` to install the package: -![alt text](img/interactive-add.png "Interactive paket add") +![paket add --interactive](img/interactive-add.png "paket add --interactive") -This will add the package to the selected paket.references files and also to the paket.dependencies file: +This will add the package to the selected [`paket.references` files](references-files.html) and also to the [`paket.dependencies` file](dependencies-file.html): [lang=paket] source https://nuget.org/api/v2 diff --git a/docs/content/commands/find-packages.md b/docs/content/commands/find-packages.md index 3e9d699d55..18a33aa144 100644 --- a/docs/content/commands/find-packages.md +++ b/docs/content/commands/find-packages.md @@ -11,7 +11,7 @@ and then enter search text and press enter: ## Silent mode -The silent mode can be used for additional tooling support in various editors. It allows to create suggestions for `paket add`: +The silent mode can be used for additional tooling support in various editors. It allows to create suggestions for [`paket add`](paket-add.html): [lang=batchfile] paket find-packages -s diff --git a/docs/content/commands/remove.md b/docs/content/commands/remove.md index fd89fd4b17..6e328bed64 100644 --- a/docs/content/commands/remove.md +++ b/docs/content/commands/remove.md @@ -5,4 +5,4 @@ It's also possible to remove a package from a specified project only: [lang=batchfile] $ paket remove nuget PACKAGENAME [project PROJECT] [--force] -See also [paket add](paket-add.html). +See also [`paket add`](paket-add.html). diff --git a/docs/content/commands/why.md b/docs/content/commands/why.md index bd3836509b..5661df7df3 100644 --- a/docs/content/commands/why.md +++ b/docs/content/commands/why.md @@ -1,3 +1,3 @@ ## Example -Have a look at [this](http://theimowski.com/blog/2016/10-30-paket-why-command/index.html) blog post. \ No newline at end of file +Have a look at [this blog post](http://theimowski.com/blog/2016/10-30-paket-why-command/index.html). diff --git a/docs/content/convert-from-nuget-tutorial.md b/docs/content/convert-from-nuget-tutorial.md index 143f1a20ee..214a584239 100644 --- a/docs/content/convert-from-nuget-tutorial.md +++ b/docs/content/convert-from-nuget-tutorial.md @@ -65,7 +65,7 @@ The `paket convert-from-nuget` command: 1. Finds all `packages.config` files, generates a paket.dependencies file in the solution root and replaces each `packages.config` with an equivalent paket.references file. 2. If there is a solution-level `packages.config`, then it will be removed and its dependencies will be included into the paket.dependencies file. 3. If you use NuGet Package Restore ([MSBuild-Integrated or Automatic Visual Studio Package Restore](http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore)), then the [`paket auto-restore`](paket-auto-restore.html) command will be invoked. -4. Next (unless `--no-install` is specified), the [paket install](paket-install.html) process will be executed. This will: +4. Next (unless `--no-install` is specified), the [`paket install`](paket-install.html) process will be executed. This will: - analyze the dependencies. - generate a paket.lock file. @@ -81,7 +81,7 @@ The `paket convert-from-nuget` command: If you are using authorized NuGet feeds, convert-from-nuget command will automatically migrate the credentials for you. Following are valid modes for the `--creds-migration` option: -1. `encrypt` - Encrypt your credentials and save them in the [paket configuration file](paket-config-file.html). +1. `encrypt` - Encrypt your credentials and save them in the [Paket configuration file](paket-config-file.html). 2. `plaintext` - Include your credentials in plaintext in the paket.dependencies file. See [example](nuget-dependencies.html#plaintext-credentials). 3. `selective` - Use this switch if you're using more than one authorized NuGet feed, and you want to apply different modes for each of them. diff --git a/docs/content/faq.md b/docs/content/faq.md index addacb183c..c4111f930c 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -103,14 +103,14 @@ This will ensure that you get notified whenever a dependency update breaks your ## I'm already using NuGet. How can I convert to Paket? -The process can be automated with [paket convert-from-nuget](paket-convert-from-nuget.html) command. +The process can be automated with [`paket convert-from-nuget`](paket-convert-from-nuget.html) command. In case of the command's failure, you can fallback to manual approach: 1. Analyse your `packages.config` files and extract the referenced packages into a paket.dependencies file. 2. Convert each `packages.config` file to a paket.references file. This is very easy - you just have to remove all the XML and keep the package names. -3. Run [paket install](paket-install.html). This will analyze the dependencies, generate a paket.lock file, remove all the old package references from your project files and replace them with equivalent `Reference`s in a syntax that can be managed automatically by Paket. -4. (Optional) Raise corresponding issue [here](https://github.com/fsprojects/Paket/issues) so that we can make the command even better. +3. Run [`paket install`](paket-install.html). This will analyze the dependencies, generate a paket.lock file, remove all the old package references from your project files and replace them with equivalent `Reference`s in a syntax that can be managed automatically by Paket. +4. (Optional) Raise [a corresponding issue](https://github.com/fsprojects/Paket/issues) so that we can make the command even better. ## How do I convert a new project to Paket when my solution is already using Paket diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 2b7de2ca80..bc9f3ecd09 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -17,7 +17,7 @@ This project helps you get started with a new .NET/Mono project solution with ev ### Downloading Paket and its Bootstrapper * Create a `.paket` folder in the root of your solution. - * Download the latest [paket.bootstrapper.exe](https://github.com/fsprojects/Paket/releases/latest) into that folder. + * Download the latest [`paket.bootstrapper.exe`](https://github.com/fsprojects/Paket/releases/latest) into that folder. * Run `.paket/paket.bootstrapper.exe`. This will download the latest `paket.exe`. * Commit `.paket/paket.bootstrapper.exe` into your repo and add `.paket/paket.exe` to your `.gitignore` file. @@ -33,7 +33,7 @@ The file might look like this: nuget Castle.Windsor-log4net >= 3.2 nuget NUnit - github forki/FsUnit FsUnit.fs + github forki/FsUnit FsUnit.fs
If you use a Paket plugin for your editor, you may get autocompletion for paket.dependencies files.
@@ -48,26 +48,26 @@ Install all of the required packages from the specified sources: The [`paket install` command](paket-install.html) will analyze your dependencies and automatically generate a [`paket.lock` file](lock-file.html) like: - [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Castle.Core (3.3.3) - Castle.Core-log4net (3.3.3) - Castle.Core (>= 3.3.3) - log4net (1.2.10) - Castle.LoggingFacility (3.3.0) - Castle.Core (>= 3.3.0) - Castle.Windsor (>= 3.3.0) - Castle.Windsor (3.3.0) - Castle.Core (>= 3.3.0) - Castle.Windsor-log4net (3.3.0) - Castle.Core-log4net (>= 3.3.0) - Castle.LoggingFacility (>= 3.3.0) - log4net (1.2.10) - NUnit (2.6.4) - GITHUB - remote: forki/FsUnit - FsUnit.fs (81d27fd09575a32c4ed52eadb2eeac5f365b8348) + [lang=paket] + NUGET + remote: https://nuget.org/api/v2 + Castle.Core (3.3.3) + Castle.Core-log4net (3.3.3) + Castle.Core (>= 3.3.3) + log4net (1.2.10) + Castle.LoggingFacility (3.3.0) + Castle.Core (>= 3.3.0) + Castle.Windsor (>= 3.3.0) + Castle.Windsor (3.3.0) + Castle.Core (>= 3.3.0) + Castle.Windsor-log4net (3.3.0) + Castle.Core-log4net (>= 3.3.0) + Castle.LoggingFacility (>= 3.3.0) + log4net (1.2.10) + NUnit (2.6.4) + GITHUB + remote: forki/FsUnit + FsUnit.fs (81d27fd09575a32c4ed52eadb2eeac5f365b8348) This file shows all direct and [transitive dependencies](faq.html#transitive) and pins every dependency to a concrete version. In most cases you want to commit this file to your version control system ([read why](faq.html#Why-should-I-commit-the-lock-file)). @@ -95,12 +95,12 @@ Like all of the files above, you should [commit](faq.html#Why-should-I-commit-th ### Updating packages -If you want to check if your dependencies have updates you can run the [`outdated` command](paket-outdated.html): +If you want to check if your dependencies have updates you can run the [`paket outdated` command](paket-outdated.html): [lang=batchfile] $ .paket/paket.exe outdated -If you want to update all packages you can use the [`update` command](paket-update.html): +If you want to update all packages you can use the [`paket update` command](paket-update.html): [lang=batchfile] $ .paket/paket.exe update diff --git a/docs/content/github-dependencies.md b/docs/content/github-dependencies.md index bd959c5a88..235698e880 100644 --- a/docs/content/github-dependencies.md +++ b/docs/content/github-dependencies.md @@ -27,7 +27,7 @@ By default the `master` branch is used to determine the commit to reference, you github fsharp/fsfoundation:gh-pages img/logo/fsharp.svg github forki/FsUnit:7623fc13439f0e60bd05c1ed3b5f6dcb937fe468 FsUnit.fs -If you want to reference the file in one of your project files then add an entry to the project's [`paket.references` file.](references-files.html): +If you want to reference the file in one of your project files then add an entry to the project's [`paket.references` file](references-files.html): [lang=paket] File: FsUnit.fs @@ -83,20 +83,20 @@ And we reference this in our own [`paket.dependencies` file.](dependencies-file. This generates the following [`paket.lock` file](lock-file.html): [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Microsoft.Bcl (1.1.9) - Microsoft.Bcl.Build (>= 1.0.14) - Microsoft.Bcl.Build (1.0.21) - Microsoft.Net.Http (2.2.28) - Microsoft.Bcl (>= 1.1.9) - Microsoft.Bcl.Build (>= 1.0.14) - Octokit (0.4.1) - Microsoft.Net.Http (>= 0) - GITHUB - remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (a25c2f256a99242c1106b5a3478aae6bb68c7a93) - Octokit (>= 0) + NUGET + remote: https://nuget.org/api/v2 + Microsoft.Bcl (1.1.9) + Microsoft.Bcl.Build (>= 1.0.14) + Microsoft.Bcl.Build (1.0.21) + Microsoft.Net.Http (2.2.28) + Microsoft.Bcl (>= 1.1.9) + Microsoft.Bcl.Build (>= 1.0.14) + Octokit (0.4.1) + Microsoft.Net.Http (>= 0) + GITHUB + remote: fsharp/FAKE + modules/Octokit/Octokit.fsx (a25c2f256a99242c1106b5a3478aae6bb68c7a93) + Octokit (>= 0) As you can see Paket also resolved the Octokit dependency. diff --git a/docs/content/glossary.md b/docs/content/glossary.md index 34b739b4d0..b0d56ce704 100644 --- a/docs/content/glossary.md +++ b/docs/content/glossary.md @@ -19,5 +19,5 @@ The [`paket.template` files](template-files.html) are used to specify rules to c ### .paket folder This folder is used the same way a `.nuget` folder is used for the NuGet package restore, that is to cache package archives for reference by the development project. Place this folder into the root of your solution. -It should include the paket.targets and [paket.bootstrapper.exe](https://github.com/fsprojects/Paket/releases/latest) files which can be downloaded from GitHub. -The bootstrapper.exe will always download the latest version of the paket.exe file into this folder. +It should include the paket.targets and [`paket.bootstrapper.exe`](https://github.com/fsprojects/Paket/releases/latest) files which can be downloaded from GitHub. +The bootstrapper executable will always download the latest version of the `paket.exe` file into this folder. diff --git a/docs/content/installation.md b/docs/content/installation.md index 88d538398f..cfe36bbb73 100644 --- a/docs/content/installation.md +++ b/docs/content/installation.md @@ -3,8 +3,8 @@ This guide will show you * How to set up Paket for a specific repository. - * How to install Paket for Windows, Linux, or OS-X. - * How to ensure `paket` is available via command line and other methods of use. + * How to install Paket for Windows, Linux, or macOS. + * How to ensure `paket.exe` is available via command line and other methods of use. ## Installation per repository @@ -43,9 +43,9 @@ After that completes execute the install, to install Paket as a command line uti The install.sh script will add Paket as a command line option into bash and most other shells available. If you are using a unique shell and run into problems, please post an issue so we can take a look. -### Installation on OS-X +### Installation on macOS -For OS-X the build and installation process is as follows. +For macOS the build and installation process is as follows. ./build.sh diff --git a/docs/content/local-file.md b/docs/content/local-file.md index dcd26c9e40..73fb55f626 100644 --- a/docs/content/local-file.md +++ b/docs/content/local-file.md @@ -97,7 +97,7 @@ The Format of the source is the same as in [path sources](nuget-dependencies.htm If you happen to have a nupkg in local path, but with a different version than in `paket.lock`, you can optionally specify version which should be used for this override. One use case might be when the package version is determined by your build server, and nupkgs created locally have zero version. -This is currently supported only for [Source override](#Source-override). +This is currently supported only for [source override](#Source-override). ### Groups diff --git a/docs/content/nuget-dependencies.md b/docs/content/nuget-dependencies.md index 8d81916eaa..ad1f542695 100644 --- a/docs/content/nuget-dependencies.md +++ b/docs/content/nuget-dependencies.md @@ -243,8 +243,8 @@ It's possible to influence the `CopyToOutputDirectory` property for content refe source https://nuget.org/api/v2 nuget jQuery copy_content_to_output_dir: always - nuget Fody copy_content_to_output_dir: never - nuget ServiceStack.Swagger copy_content_to_output_dir: preserve-newest + nuget Fody copy_content_to_output_dir: never + nuget ServiceStack.Swagger copy_content_to_output_dir: preserve-newest ### redirects settings @@ -333,7 +333,7 @@ The strategy setting and the corresponding `!` and `@` modifiers are applicable nuget Example-A @> 0 // use "max" version resolution strategy nuget Example-B != 1.2 // use "min" version resolution strategy nuget Example-C !>= 1.2 // use "min" version resolution strategy - nuget Example-C >= 1.2 strategy min + nuget Example-C >= 1.2 strategy min ### Lowest_matching option diff --git a/docs/content/paket-folder.md b/docs/content/paket-folder.md index 740e4ebea3..4a1c3c8210 100644 --- a/docs/content/paket-folder.md +++ b/docs/content/paket-folder.md @@ -9,7 +9,7 @@ Now, to install all the packages from the `paket.dependencies` files, just run t .paket/paket.exe install -The location of .paket folder and Paket related files is not bound to location of Visual Studio solution file. Paket does not read or look for any solution files. +The location of `.paket` folder and Paket related files is not bound to location of Visual Studio solution file. Paket does not read or look for any solution files. In case you have multiple solutions in subfolders of some root folder, then that root folder would be a good place to put .paket folder and the [`paket.dependencies` file](dependencies-file.html) there. `.paket/paket.exe install` command processes all folders under the root recursively and touch only those projects which have `paket.references` file in their folder. When Paket encounters [`paket.dependencies` files](dependencies-file.html) in subfolder it ignores that subfolder (and everything under it) completely, diff --git a/docs/content/paket-push.md b/docs/content/paket-push.md deleted file mode 100644 index f957053622..0000000000 --- a/docs/content/paket-push.md +++ /dev/null @@ -1,25 +0,0 @@ -# paket push - -Pushes the given `.nupkg` file. - - [lang=console] - paket push [--help] url file [apikey ] [endpoint ] - -OPTIONS: - - url Url of the NuGet feed. - file Path to the package. - apikey Optionally specify your API key on the command line. Otherwise uses the - value of the `nugetkey` environment variable. - endpoint Optionally specify a custom api endpoint to push to. Defaults to - `/api/v2/package`. - --verbose, -v Enable verbose console output for the paket process. - --log-file Specify a log file for the paket process. - --silent, -s Suppress console output for the paket process. - --version Display the version. - --from-bootstrapper Call coming from the '--run' feature of the bootstrapper. - --help display this list of options. -If you add the `-v` flag, then Paket will run in verbose mode and show detailed information. - -With `--log-file [FileName]` you can trace the logged information into a file. - diff --git a/docs/content/references-files.md b/docs/content/references-files.md index 2a14a75d3d..7a79d0000a 100644 --- a/docs/content/references-files.md +++ b/docs/content/references-files.md @@ -71,7 +71,7 @@ Sometimes you don't want to generate dependencies for older framework versions. [lang=paket] Newtonsoft.Json framework: net35, net40 - DotNetZip framework: >= net45 + DotNetZip framework: >= net45 > Note: This feature is deprecated and can be seen as an expert feature. > Using framework restrictions on single packages might make you projects uncompilable. @@ -81,8 +81,8 @@ This feature basically tells paket to only consider the specified frameworks for The resolution will not be modified when restrictions are specified in the reference file. It means -> In this project 'Newtonsoft.Json' is only required when compiling against 'net35' or 'net40'. -> I never need this package to compile for another framework like 'net45', therefore don't add references for other frameworks. +> In this project `Newtonsoft.Json` is only required when compiling against `net35` or `net40`. +> I never need this package to compile for another framework like `net45`, therefore don't add references for other frameworks. ## Redirects settings @@ -109,23 +109,23 @@ Redirects settings in [references files](references-files.html#Redirects-setting This option allows you to exclude libraries from being referenced in project files: [lang=paket] - PackageA - exclude A1.dll - exclude A2.dll - Dapper - NUnit - exclude nunit.framework.dll + PackageA + exclude A1.dll + exclude A2.dll + Dapper + NUnit + exclude nunit.framework.dll ## Library aliases This option allows you to specify library aliases: [lang=paket] - PackageA - alias A1.dll Name2,Name3 - alias A2.dll MyAlias1 - Dapper - NUnit + PackageA + alias A1.dll Name2,Name3 + alias A2.dll MyAlias1 + Dapper + NUnit ## File name conventions diff --git a/docs/content/template-files.md b/docs/content/template-files.md index 2005e7fcc5..427c39e69b 100644 --- a/docs/content/template-files.md +++ b/docs/content/template-files.md @@ -9,12 +9,12 @@ values: * project - Paket will look for a matching project file, and infer dependencies and metadata from the project Matching project and template files must be in the same directory. If only one project is in the directory the template file -can be called `paket.template`, otherwise the name of the template file must be the name of the project file with ".paket.template" added to the end. +can be called `paket.template`, otherwise the name of the template file must be the name of the project file with `.paket.template` added to the end. For example: - Paket.Project.fsproj - Paket.Project.fsproj.paket.template + Paket.Project.fsproj + Paket.Project.fsproj.paket.template are matching files. ### Sample 1 @@ -41,7 +41,7 @@ A `paket.template` file using `type file` may look like this: version 1.0 authors Michael Newton description - description of this test package + description of this test package files src/Test.Paket.Package/bin/Debug ==> lib @@ -56,14 +56,14 @@ name (case insensitive), or in an indented block following a line containing not For example: - description This is a valid description + description This is a valid description - DESCRIPTION - So is this - description here + DESCRIPTION + So is this + description here - description This would - cause an error + description This would + cause an error There are 4 compulsory fields required to create a nupkg. These can always be specified in the template file, or in a project based template can be omitted and an attempt will be made to infer @@ -106,9 +106,9 @@ to decide on the files and dependencies added. A files block looks like this: files - relative/to/template/file ==> folder/in/nupkg - second/thing/to/pack ==> folder/in/nupkg - second/thing/**/file.* ==> folder/in/nupkg + relative/to/template/file ==> folder/in/nupkg + second/thing/to/pack ==> folder/in/nupkg + second/thing/**/file.* ==> folder/in/nupkg If the source part refers to a file then it is copied into the target directory. If it refers to a directory, the contents of the directory will be copied into the target folder. @@ -141,8 +141,8 @@ With the include-referenced-projects switch you can tell Paket to pack reference A references block looks like this: references - filename1.dll - filename2.dll + filename1.dll + filename2.dll If you omit the references block then all libraries in the packages will get referenced. @@ -151,8 +151,8 @@ If you omit the references block then all libraries in the packages will get ref A block with framework assembly references looks like this: frameworkAssemblies - System.Xml - System.Xml.Linq + System.Xml + System.Xml.Linq If you omit the references block then all libraries in the packages will get referenced. @@ -160,24 +160,24 @@ If you omit the references block then all libraries in the packages will get ref A dependency block looks like this: - dependencies - FSharp.Core >= 4.3.1 - Other.Dep ~> 2.5 - Any.Version + dependencies + FSharp.Core >= 4.3.1 + Other.Dep ~> 2.5 + Any.Version The syntax for specifying allowed dependency ranges are identical to in the ranges in [`paket.dependencies` files](dependencies-file.html). It's possible to use `CURRENTVERSION` as a placeholder for the current version of the package: - dependencies - FSharp.Core >= 4.3.1 - Other.Dep ~> CURRENTVERSION + dependencies + FSharp.Core >= 4.3.1 + Other.Dep ~> CURRENTVERSION The `LOCKEDVERSION` placeholder allows to reference the currently used dependency version from the paket.lock file: - dependencies - FSharp.Core >= 4.3.1 - Other.Dep ~> LOCKEDVERSION + dependencies + FSharp.Core >= 4.3.1 + Other.Dep ~> LOCKEDVERSION It's possible to add a line to constrain the targetFramework: @@ -198,15 +198,15 @@ In a project file, the following dependencies will be added: If you need to exclude dependencies from the automatic discovery then you can use the `excludeddependencies` block: - excludeddependencies - FSharp.Core - Other.Dep + excludeddependencies + FSharp.Core + Other.Dep Another way to exclude dependencies is to exclude a whole dependency group with the `excludedgroups` block: - excludedgroups - build - test + excludedgroups + build + test #### PDB files From 69845741fe42fc5c347c6993fce33fb073001fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 19:31:13 +0200 Subject: [PATCH 09/88] Improve formatting of command parameters (make it just like the console output displays) --- src/Paket/Commands.fs | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 3b4db7a932..3e153eefa8 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -470,47 +470,35 @@ with let commandParser = ArgumentParser.Create(programName = "paket", errorHandler = new ProcessExiter()) let markdown (subParser : ArgumentParser) (width : int) (additionalText : string) = - let (afterCommandText, afterOptionsText) = - let ensureLineBreak (text : string) = if String.IsNullOrEmpty(text) then text else text + Environment.NewLine + Environment.NewLine - let cleanUp (text : string) = text.Replace("# [after-command]", "") - .Replace("# [after-options]", "") - .Trim('\r', '\n') |> ensureLineBreak - let afterCommandIndex = additionalText.IndexOf("# [after-command]") - let afterOptionsIndex = additionalText.IndexOf("# [after-options]") - - if afterCommandIndex = -1 then "", additionalText |> cleanUp - else if afterOptionsIndex = -1 then additionalText |> cleanUp, "" - else (additionalText.Substring(0, afterCommandIndex) |> cleanUp, additionalText.Substring(afterOptionsIndex) |> cleanUp) + let ensureLineBreak (text : string) = if String.IsNullOrEmpty(text) then text else text + Environment.NewLine + Environment.NewLine + let cleanUp (text : string) = text.Trim('\r', '\n') |> ensureLineBreak let parentMetadata = subParser.ParentInfo |> Option.get - let indentBy spaces (text:string) = - let whitespace = String(' ', spaces) - text.Split([|Environment.NewLine|], StringSplitOptions.None) - |> Seq.map (fun line -> whitespace + line) - |> String.concat Environment.NewLine - - let replace (pattern : string) (replacement : string) input = - System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement) - let syntax = subParser.PrintCommandLineSyntax(usageStringCharacterWidth = width) - |> indentBy 4 let options = subParser.PrintUsage(hideSyntax=true, usageStringCharacterWidth = width) + let makeSentence t = + let upcase (s:string) = + s.Substring(0,1).ToUpper() + s.Substring(1) + + sprintf "%s." (upcase t) + System.Text.StringBuilder() .Append("# paket ") .AppendLine(parentMetadata.Name) .AppendLine() - .AppendLine(parentMetadata.Description) + .AppendLine(parentMetadata.Description |> makeSentence) .AppendLine() - .AppendLine(" [lang=console]") + .AppendLine("```sh") .AppendLine(syntax) .AppendLine() - .Append(afterCommandText) .Append(options) - .Append(afterOptionsText) + .AppendLine("```") + .AppendLine() + .Append(additionalText |> cleanUp) .ToString() let getAllCommands () = commandParser.GetSubCommandParsers() From 604da60e31c0ff380e308a0698367864eb529c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 19:48:31 +0200 Subject: [PATCH 10/88] Be more verbose about the --verbose parameter --- docs/tools/generate.fsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx index 3803f25d72..6dd0b2cbb0 100644 --- a/docs/tools/generate.fsx +++ b/docs/tools/generate.fsx @@ -13,9 +13,9 @@ Paket.Commands.getAllCommands() let additionalText = let verboseOption = """ -If you add the `-v` flag, then Paket will run in verbose mode and show detailed information. +If you add the `--verbose` flag Paket will run in verbose mode and show detailed information. -With `--log-file [FileName]` you can trace the logged information into a file. +With `--log-file [path]` you can trace the logged information into a file. """ let optFile = sprintf "../content/commands/%s.md" metadata.Name From 982d75be7614d96f89de7bcae68ec2e9bf411cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 19:48:57 +0200 Subject: [PATCH 11/88] Docs: correct spelling of my last name --- docs/tools/generate.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx index 6dd0b2cbb0..beb131c1bc 100644 --- a/docs/tools/generate.fsx +++ b/docs/tools/generate.fsx @@ -40,7 +40,7 @@ let githubLink = "http://github.com/fsprojects/Paket" // Specify more information about your project let info = [ "project-name", "Paket" - "project-author", "Steffen Forkmann, Alexander Gross" + "project-author", "Steffen Forkmann, Alexander Groß" "project-summary", "A dependency manager for .NET with support for NuGet packages and git repositories." "project-github", githubLink "project-nuget", "http://nuget.org/packages/Paket" ] From 7bf862fc62f14cd091e172ecf73f158296fa1d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 21:42:08 +0200 Subject: [PATCH 12/88] Docs: reviewed all command docs --- Paket.sln | 1 - docs/content/commands/add.md | 62 ++++++-- docs/content/commands/auto-restore.md | 19 ++- docs/content/commands/clear-cache.md | 0 docs/content/commands/config.md | 49 +++--- docs/content/commands/convert-from-nuget.md | 3 +- .../content/commands/find-package-versions.md | 25 +-- docs/content/commands/find-packages.md | 56 ++++--- docs/content/commands/find-refs.md | 42 ++--- .../content/commands/generate-load-scripts.md | 67 ++++---- docs/content/commands/install.md | 16 +- docs/content/commands/outdated.md | 54 +++++-- docs/content/commands/pack.md | 126 +++++++++------ docs/content/commands/remove.md | 9 +- docs/content/commands/restore.md | 8 +- .../commands/show-installed-packages.md | 24 +-- docs/content/commands/simplify.md | 143 +++++++++++------- docs/content/commands/update.md | 81 ++++------ docs/content/commands/why.md | 3 +- .../files/img/paket-find-package-versions.png | Bin 4426 -> 0 bytes docs/files/img/paket-find-packages.png | Bin 6401 -> 0 bytes .../img/paket-show-installed-packages.png | Bin 7029 -> 0 bytes 22 files changed, 487 insertions(+), 301 deletions(-) delete mode 100644 docs/content/commands/clear-cache.md delete mode 100644 docs/files/img/paket-find-package-versions.png delete mode 100644 docs/files/img/paket-find-packages.png delete mode 100644 docs/files/img/paket-show-installed-packages.png diff --git a/Paket.sln b/Paket.sln index 02405909f5..67b80776cd 100644 --- a/Paket.sln +++ b/Paket.sln @@ -79,7 +79,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "commands", "commands", "{44 ProjectSection(SolutionItems) = preProject docs\content\commands\add.md = docs\content\commands\add.md docs\content\commands\auto-restore.md = docs\content\commands\auto-restore.md - docs\content\commands\clear-cache.md = docs\content\commands\clear-cache.md docs\content\commands\config.md = docs\content\commands\config.md docs\content\commands\convert-from-nuget.md = docs\content\commands\convert-from-nuget.md docs\content\commands\find-package-versions.md = docs\content\commands\find-package-versions.md diff --git a/docs/content/commands/add.md b/docs/content/commands/add.md index 57dfd0805f..3057ed7b0f 100644 --- a/docs/content/commands/add.md +++ b/docs/content/commands/add.md @@ -1,9 +1,11 @@ ## Adding to a project -By default a package is only added to the solution, but not on any of its projects. It's possible to add the package to a specified project at the same: +By default packages are only added to the solution directory, but not on any of +its projects. It's possible to add the package to a specific project: - [lang=batchfile] - $ paket add PACKAGEID [--version VERSION] [--project PROJECT] [--force] +```sh +paket add PACKAGE-ID --project PROJECT +``` See also [`paket remove`](paket-remove.html). @@ -11,19 +13,53 @@ See also [`paket remove`](paket-remove.html). Consider the following [`paket.dependencies` file](dependencies-file.html): - [lang=paket] - source https://nuget.org/api/v2 +```paket +source https:/nuget.org/api/v2 - nuget FAKE +nuget FAKE +``` -Now we run `paket add xunit --interactive` to install the package: +Now we run `paket add NUnit --version '~> 2.6' --interactive` to install the +package: -![paket add --interactive](img/interactive-add.png "paket add --interactive") +```sh +$ paket add NUnit --version '~> 2.6' --interactive +Paket version 5.0.0 +Adding NUnit 2.6.4 to ~/Example/paket.dependencies into group Main +Resolving packages for group Main: + - NUnit 2.6.4 + - FAKE 4.61.3 +Locked version resolution written to ~/Example/paket.lock +Dependencies files saved to ~/Example/paket.dependencies + Install to ~/Example/src/Foo/Foo.fsproj into group Main? + [Y]es/[N]o => y -This will add the package to the selected [`paket.references` files](references-files.html) and also to the [`paket.dependencies` file](dependencies-file.html): +Adding package NUnit to ~/Example/src/Foo/paket.references into group Main +References file saved to ~/Example/src/Foo/paket.references + Install to ~/Example/src/Bar/Bar.fsproj into group Main? + [Y]es/[N]o => n - [lang=paket] - source https://nuget.org/api/v2 +Performance: + - Resolver: 12 seconds (1 runs) + - Runtime: 214 milliseconds + - Blocked (retrieving package details): 86 milliseconds (4 times) + - Blocked (retrieving package versions): 3 seconds (4 times) + - Not Blocked (retrieving package versions): 6 times + - Not Blocked (retrieving package details): 2 times + - Disk IO: 786 milliseconds + - Average Request Time: 1 second + - Number of Requests: 12 + - Runtime: 14 seconds +``` - nuget FAKE - nuget xunit +This will add the package to the selected +[`paket.references` files](references-files.html) and also to the +[`paket.dependencies` file](dependencies-file.html). Note that the version +constraint specified the in the above command was preserved. + +```paket +source https:/nuget.org/api/v2 + +nuget FAKE +nuget NUnit ~> 2.6 +``` diff --git a/docs/content/commands/auto-restore.md b/docs/content/commands/auto-restore.md index efa202572f..20b7d15d35 100644 --- a/docs/content/commands/auto-restore.md +++ b/docs/content/commands/auto-restore.md @@ -1,10 +1,13 @@ -Auto-restore on: +When enabling auto-restore, Paket will - - creates a `.paket` directory in your root directory, - - downloads `paket.targets` and `paket.bootstrapper.exe` into the `.paket` directory, - - adds an `` statement for `paket.targets` to projects that have the [references file](references-files.html). - -Auto-restore off: +- create a `.paket` directory in your root directory, +- download `paket.targets` and `paket.bootstrapper.exe` into the `.paket` + directory, +- add an `` statement for `paket.targets` to projects that have a + [`paket.references` file](references-files.html). - - removes `paket.targets` from the `.paket` directory, - - removes the `` statement for `paket.targets` from projects that have the [references file](references-files.html). +When disabling auto-restore, Paket will + +- remove `paket.targets` from the `.paket` directory, +- remove the `` statement for `paket.targets` from projects that have + a [`paket.references` file](references-files.html). diff --git a/docs/content/commands/clear-cache.md b/docs/content/commands/clear-cache.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/content/commands/config.md b/docs/content/commands/config.md index 1087d74315..cf7be1432b 100644 --- a/docs/content/commands/config.md +++ b/docs/content/commands/config.md @@ -1,38 +1,51 @@ ## Adding credentials -```batchfile -paket config add-credentials SOURCEURL +### URL credentials + +```sh +paket config --add-credentials SOURCE-URL ``` -Paket will then ask you for the username and password that will be used for the specified `SOURCEURL`. +Paket will then ask you for the username and password that will be used for the +specified `SOURCE-URL`. + +The credentials you enter here will then be used for `source`s in the +[`paket.dependencies` file](nuget-dependencies.html) that match `SOURCE-URL` +unless they carry a username and password. -The credentials you enter here will then be used if no username and password for the source are configured in the [`paket.dependencies` file](nuget-dependencies.html). +### GitHub credentials -```batchfile -paket config add-credentials TAG +```sh +paket config --add-credentials CREDENTIAL-KEY ``` -Paket will then ask you for the username and password that will be used for the specified `TAG`. +Paket will then ask you for the username and password that will be used for the +specified `CREDENTIAL-KEY`. -The credentials you enter here will then be used to access any GitHub files specified in the [`paket.dependencies` file](github-dependencies.html) with the specified `TAG`. +The credentials you enter here will then be used to access any GitHub files from +the [`paket.dependencies` file](github-dependencies.html) that carry the +specified `CREDENTIAL-KEY`. -```batchfile -paket config add-token TAG TOKEN +```sh +paket config --add-token CREDENTIAL-KEY TOKEN ``` -The token you enter here will then be used to access any GitHub files specified in the [`paket.dependencies` file](github-dependencies.html) with the specified `TAG`. - +The `TOKEN` you enter here will then be used to access any GitHub files from the +[`paket.dependencies` file](github-dependencies.html) that carry the +specified `CREDENTIAL-KEY`. The configuration file can be found at: - let AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) - let PaketConfigFolder = Path.Combine(AppDataFolder, "Paket") - let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") +```fsharp +let AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +let PaketConfigFolder = Path.Combine(AppDataFolder, "Paket") +let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") +``` -## Examples +## Example ### Adding a NuGet API key -```batchfile -paket config add-token "https://www.nuget.org" 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a +```sh +paket config --add-token 'https://www.nuget.org' '4003d786-cc37-4004-bfdf-c4f3deadbeef' ``` diff --git a/docs/content/commands/convert-from-nuget.md b/docs/content/commands/convert-from-nuget.md index 0534cf03f5..6755cacdea 100644 --- a/docs/content/commands/convert-from-nuget.md +++ b/docs/content/commands/convert-from-nuget.md @@ -1 +1,2 @@ -More details about the conversion process can be found in the ["Convert from NuGet" tutorial](convert-from-nuget-tutorial.html). \ No newline at end of file +More details about the conversion process can be found in the +["Converting from NuGet" tutorial](convert-from-nuget-tutorial.html). diff --git a/docs/content/commands/find-package-versions.md b/docs/content/commands/find-package-versions.md index 175e0f137d..613804bcbb 100644 --- a/docs/content/commands/find-package-versions.md +++ b/docs/content/commands/find-package-versions.md @@ -1,10 +1,15 @@ -## Sample - -Running the command: - - [lang=batchfile] - paket find-package-versions name FAKE -s max 10 - -will result in: - -![alt text](img/paket-find-package-versions.png "paket find-package-versions command") +## Example + +```sh +$ paket find-package-versions FAKE --silent --max 10 +5.0.0-alpha010 +5.0.0-alpha009 +4.61.3 +4.61.2 +4.61.1 +4.61.0 +4.60.0 +4.59.3 +4.59.1 +4.59.0 +``` diff --git a/docs/content/commands/find-packages.md b/docs/content/commands/find-packages.md index 18a33aa144..5ece062944 100644 --- a/docs/content/commands/find-packages.md +++ b/docs/content/commands/find-packages.md @@ -1,19 +1,41 @@ -## Sample - -Running the command: - - [lang=batchfile] - paket find-packages - -and then enter search text and press enter: - -![alt text](img/paket-find-packages.png "paket find-packages command") - ## Silent mode -The silent mode can be used for additional tooling support in various editors. It allows to create suggestions for [`paket add`](paket-add.html): - - [lang=batchfile] - paket find-packages -s - -The command allows runs to suggest package names. It will keep running in a loop until it receives the text ":q". +The silent mode can be used for tooling support in various editors. +It allows to create suggestions for [`paket add`](paket-add.html): + +```sh +paket find-packages --silent +``` + +The command prints package names matching entered text enabling package name +suggestions. It will keep running in a loop until it receives the text `:q`. + +## Example + +Run the command `paket find-packages --silent` and enter a search term (`fake` +was used here). + +```sh +$ paket find-packages --silent +fake +FAKE +FakeSign +Faker +FakeO +FakeHost +FakeData +FAKEX +FAKE.SQL +FAKE.IIS +FAKE.Lib +Fake.AWS +FakeN.Web +FSharp.FakeTargets +FakeHttp +FakeDb +FakeDbSet +FAKE.Core +FAKE.Gallio +Faker.Net +Sitecore.FakeDb +``` diff --git a/docs/content/commands/find-refs.md b/docs/content/commands/find-refs.md index f586aa6276..e012fe47ce 100644 --- a/docs/content/commands/find-refs.md +++ b/docs/content/commands/find-refs.md @@ -1,26 +1,32 @@ -## Sample +## Example -*.src/Paket/paket.references* contains: +* `src/Paket/paket.references` contains: - UnionArgParser - FSharp.Core +```text +UnionArgParser +FSharp.Core +``` -*.src/Paket.Core/paket.references* contains: +* `src/Paket.Core/paket.references` contains: - Newtonsoft.Json - DotNetZip - FSharp.Core +```text +Newtonsoft.Json +DotNetZip +FSharp.Core +``` -Now we run +Now we run: - [lang=batchfile] - paket find-refs DotNetZip FSharp.Core +```sh +$ paket find-refs DotNetZip FSharp.Core +Paket version 5.0.0 +Main DotNetZip +src/Paket.Core/Paket.Core.fsproj -and paket gives the following output: +Main FSharp.Core +src/Paket.Core/Paket.Core.fsproj +src/Paket/Paket.fsproj - DotNetZip - .src/Paket.Core/Paket.Core.fsproj - - FSharp.Core - .src/Paket.Core/Paket.Core.fsproj - .src/Paket/Paket.fsproj +Performance: + - Runtime: 1 second +``` diff --git a/docs/content/commands/generate-load-scripts.md b/docs/content/commands/generate-load-scripts.md index 8701f587d3..2992e75626 100644 --- a/docs/content/commands/generate-load-scripts.md +++ b/docs/content/commands/generate-load-scripts.md @@ -1,47 +1,58 @@ -## Generating load scripts for all NuGet packages +## Generate load scripts for all NuGet packages -It is possible to generate load scripts for all registered NuGet packages defined in the [`paket.dependencies` file](dependencies-file.html). +It is possible to generate load scripts for all registered NuGet packages +defined in the [`paket.dependencies` file](dependencies-file.html). - [lang=batchfile] - $ paket generate-load-scripts framework net45 +```sh +paket generate-load-scripts --framework net45 +``` -This will create .csx and .fsx scripts under `.paket/load/net45/`, those files can now be -used in your scripts without having to bother with the list and order of all dependencies for given package. +This will create `.csx` and `.fsx` scripts under `.paket/load/net45/`. Those +files can now be loaded in your scripts without having to bother with the list +and order of all dependencies for given package. Notes: -* this command only works after packages have been restored, please call `paket restore` before using `paket generate-load-scripts` or `paket install` if you just changed your `paket.dependencies` file -* this command was called `generate-include-scripts` in V3 and used to put files under `paket-files/include-scripts` instead of `.paket/load` +* This command only works after packages have been restored. Please run + `paket restore` before using `paket generate-load-scripts` or `paket install` + if you just changed your `paket.dependencies` file. +* This command was called `generate-include-scripts` in Paket 3.x and used to + put files under `paket-files/include-scripts` instead of `.paket/load`. -## Sample +## Generate load scripts while installing packages -Consider the following [`paket.dependencies` file](dependencies-file.html): +Alternatively, load scripts can be generated automatically while running the +`paket install` command. + +To enable this feature, add the `generate_load_scripts` option to the +[`paket.dependencies` file](dependencies-file.html) - [lang=paket] - source https://nuget.org/api/v2 +```paket +generate_load_scripts: true +source https://nuget.org/api/v2 - nuget FsLab +nuget Suave +``` -Now we run `paket install` to install the packages. +## Example -Then we run `paket generate-load-scripts framework net45` to generate include scripts. +Consider the following [`paket.dependencies` file](dependencies-file.html): -In a .fsx script file you can now use - - [lang=fsharp] - - #load @".paket/load/net45/fslab.fsx" +```paket +source https://nuget.org/api/v2 - // now ready to use FsLab and any of it's dependencies +nuget FsLab +``` - ## Generate load scripts while installing packages +Now we run `paket install` to install the package. -Alternatively, the load scripts can be generated automatically when running the `paket install` command. +Then we run `paket generate-load-scripts --framework net45` to generate include +scripts. -To enable this, add the `generate_load_scripts` option to the `paket.dependencies` file: +In a `.fsx` script file you can now use - [lang=paket] - generate_load_scripts: true - source https://nuget.org/api/v2 +```fsharp +#load @".paket/load/net45/fslab.fsx" - nuget Suave +// Now you are ready to use FsLab and any of its dependencies. +``` diff --git a/docs/content/commands/install.md b/docs/content/commands/install.md index 79178e8ad7..d7ea5bcbb3 100644 --- a/docs/content/commands/install.md +++ b/docs/content/commands/install.md @@ -1,8 +1,12 @@ -# [after-command] +## Notes on changes to [`paket.dependencies`](dependencies-file.html) -If the paket.dependencies file has been changed since the last update of the paket.lock file (e.g. added dependencies or changed version requirements), -Paket will update the paket.lock file to make it match paket.dependencies again. +If the [`paket.dependencies` file](dependencies-file.html) has been changed +since the last update of the [`paket.lock` file](lock-file.html) (e.g. you added +dependencies or changed version constraints), Paket will update the +[`paket.lock` file](lock-file.html) to make it match +[`paket.dependencies`](dependencies-file.html) again. -Unlike [`paket update`](paket-update.html), [`paket install`](paket-install.html) will only look for -new versions of dependencies that have been modified in paket.dependencies, -and use the version from paket.lock for all other dependencies. +Unlike [`paket update`](paket-update.html), [`paket +install`](paket-install.html) will only look for new versions of dependencies +that have been modified in [`paket.dependencies`](dependencies-file.html) and +use the version from [`paket.lock`](lock-file.html) for all other dependencies. diff --git a/docs/content/commands/outdated.md b/docs/content/commands/outdated.md index 1fd80d80e0..e3818087a9 100644 --- a/docs/content/commands/outdated.md +++ b/docs/content/commands/outdated.md @@ -1,22 +1,48 @@ -## Sample +## Example -Consider the following paket.dependencies file: +Consider the following [`paket.dependencies` file](dependencies-file.html) file: - [lang=paket] - source https://nuget.org/api/v2 +```paket +source https://nuget.org/api/v2 - nuget Castle.Core - nuget Castle.Windsor +framework: net40 -and the following paket.lock file: +nuget Castle.Core +nuget Castle.Windsor +``` - [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Castle.Core (2.0.0) - Castle.Windsor (2.0.0) - Castle.Core (>= 2.0.0) +and the following [`paket.lock` file](lock-file.html): + +```paket +RESTRICTION: == net40 +NUGET + remote: https://nuget.org/api/v2 + Castle.Core (2.0.0) + Castle.Windsor (2.0.0) + Castle.Core (>= 2.0.0) +``` Now we run `paket outdated`: -![alt text](img/paket-outdated.png "paket outdated command") +```sh +$ paket outdated +Paket version 5.0.0 +Resolving packages for group Main: + - Castle.Core 4.1.0 + - Castle.Windsor 3.4.0 + Incompatible dependency: Castle.Core >= 3.3 < 4.0 conflicts with resolved version 4.1.0 + - Castle.Windsor 3.3.0 +Outdated packages found: + Group: Main + * Castle.Core 2.0.0 -> 4.1.0 + * Castle.Windsor 2.0.0 -> 3.3.0 +Performance: + - Resolver: 3 seconds (1 runs) + - Runtime: 199 milliseconds + - Blocked (retrieving package details): 1 second (3 times) + - Blocked (retrieving package versions): 1 second (1 times) + - Not Blocked (retrieving package versions): 1 times + - Average Request Time: 884 milliseconds + - Number of Requests: 12 + - Runtime: 4 seconds +``` diff --git a/docs/content/commands/pack.md b/docs/content/commands/pack.md index 226e14b9c3..a104222ed9 100644 --- a/docs/content/commands/pack.md +++ b/docs/content/commands/pack.md @@ -1,39 +1,49 @@ -## Creating NuGet-Packages +## Creating NuGet packages -Consider the following [`paket.dependencies` file][depfile] in your project's root: +Consider the following [`paket.dependencies` file](dependencies-file.html) file: - [lang=paket] - source https://nuget.org/api/v2 +```paket +source https://nuget.org/api/v2 - nuget Castle.Windsor ~> 3.2 - nuget NUnit +nuget Castle.Windsor ~> 3.2 +nuget NUnit +``` -And one of your projects having a [`paket.references` file][reffile] like this: +One of your projects has a [`paket.references` file][reffile]: - [lang=paket] - Castle.Windsor +```paket +Castle.Windsor +``` -Now, when you run `paket install`, your [`paket.lock` file][lockfile] would look like this: +When you run `paket install`, your [`paket.lock` file][lockfile] will look like +this: - [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Castle.Core (3.3.3) - Castle.Windsor (3.3.0) - Castle.Core (>= 3.3.0) - NUnit (2.6.4) +```paket +NUGET + remote: https://nuget.org/api/v2 + Castle.Core (3.3.3) + Castle.Windsor (3.3.0) + Castle.Core (>= 3.3.0) + NUnit (2.6.4) +``` -Now, when you are done programming and wish to create a NuGet-Package of your project, create a [`paket.template`][templatefile] file with `type project` and run: +When you are done programming and wish to create a NuGet package of your +project, create a [`paket.template` file][templatefile] with `type project` and +run: - [lang=batch] - paket pack output nugets version 1.0.0 +```sh +paket pack --output nugets --version 1.0.0 +``` -Or, you could run: +You could aslo run: - [lang=batch] - paket pack output nugets version 1.0.0 lock-dependencies +```sh +paket pack --output nugets --version 1.0.0 --lock-dependencies +``` -Depending on which command you issue, Paket creates different version requirements of the packages you depend on in the resulting `.nuspec` file of your package: +Depending on which command you issue, Paket creates different version +requirements of the packages you depend on in the resulting `.nuspec` file of +your package: @@ -50,41 +60,63 @@ Depending on which command you issue, Paket creates different version requiremen
-As you see here, the first command (without the `lock-dependencies` parameter) creates version requirements as specified in your [`paket.dependencies` file][depfile]. The second command takes the currently resolved versions from your [`paket.lock` file][lockfile] and "locks" them to these specific versions. +The first command (without the `--lock-dependencies` parameter) creates the +version requirements as specified in your [`paket.dependencies` file][depfile]. +The second command takes the currently resolved versions from your +[`paket.lock` file][lockfile] and "locks" them to these specific versions. -### Symbol Packages +### Symbol packages -Visual Studio can be configured to download symbol/source versions of installed packages from a symbol server, allowing the developer to use the debugger to step into the source (see [SymbolSource](http://www.symbolsource.org/Public/Home/VisualStudio)). -These symbol/source packages are the same as the regular packages, but contain the source files (under `src`) and PDBs alongside the DLLs. -Paket can build these symbol/source packages, in addition to the regular packages, using the `symbols` parameter: +Visual Studio can be configured to download symbol/source versions of installed +packages from a symbol server, allowing the developer to use the debugger to +step into the source (see +[SymbolSource](http://www.symbolsource.org/Public/Home/VisualStudio)). These +symbol/source packages are the same as the regular packages, but contain the +source files (under `src`) and PDBs alongside the DLLs. Paket can build these +symbol/source packages, in addition to the regular packages, using the `symbols` +parameter: - [lang=batch] - paket pack output nugets symbols +```sh +paket pack --output nugets --symbols +``` ### Including referenced projects -Paket automatically replaces inter-project dependencies with NuGet dependencies if the dependency has it's own [`paket.template`][templatefile]. -In addition to this the switch `include-referenced-projects` instructs Paket to add project output to the package for inter-project dependencies that don't have a paket.template file. +Paket automatically replaces inter-project dependencies with NuGet dependencies +if the dependency has it's own [`paket.template`][templatefile]. In addition to +this the parameter `--include-referenced-projects` instructs Paket to add +project output to the package for inter-project dependencies that don't have a +[`paket.template` file][templatefile]. -1. It recursively iterates referenced projects and adds their project output to the package -2. When combined with the [symbols switch](paket-pack.html#Symbol-Packages), it will also include the source code of the referenced projects. Also recursively. -3. Any projects that are encountered in this search that have their own project template are ignored. +1. It recursively iterates referenced projects and adds their project output to + the package +1. When combined with the [symbols switch](paket-pack.html#Symbol-Packages), it + will also include the source code of the referenced projects. Also + recursively. +1. Any projects that are encountered in this search that have their own project + template are ignored. ### Version ranges -By default Paket uses the specified version ranges from the [`paket.dependencies` file][depfile] as version ranges for dependencies of the new NuGet package. -by using the `minimum-from-lock-file` parameter the dependencies of the generated NuGet will use the versions from the [`paket.lock` file][lockfile]. +By default Paket uses the specified version ranges from the +[`paket.dependencies` file][depfile] as version ranges for dependencies of the +new NuGet package. The `--minimum-from-lock-file` parameter instructs Paket to +use the version from the [`paket.lock` file][lockfile] and use it as the minimum +version. - [lockfile]: lock-file.html - [depfile]: dependencies-file.html - [reffile]: references-files.html - [templatefile]: template-files.html +### Localized packages -### Localized Packages +When using a [`paket.template` file][templatefile] with `type project` any +localized satellite assemblies are included in the package created. -When using a `.template` with `type project` any localized satellite dlls are included in the created packages. -The following layout is created: -``` +The following layout is used: + +```text lib/net45/Foo.dll /se/Foo.resources.dll -``` \ No newline at end of file +``` + + [lockfile]: lock-file.html + [depfile]: dependencies-file.html + [reffile]: references-files.html + [templatefile]: template-files.html diff --git a/docs/content/commands/remove.md b/docs/content/commands/remove.md index 6e328bed64..0716bcec2e 100644 --- a/docs/content/commands/remove.md +++ b/docs/content/commands/remove.md @@ -1,8 +1,9 @@ -## Removing from a single project +## Removing from a project -It's also possible to remove a package from a specified project only: +It's possible to remove a dependency from a specific project only: - [lang=batchfile] - $ paket remove nuget PACKAGENAME [project PROJECT] [--force] +```sh +paket remove PACKAGE-ID --project PROJECT +``` See also [`paket add`](paket-add.html). diff --git a/docs/content/commands/restore.md b/docs/content/commands/restore.md index 640355dcb9..82d52472f4 100644 --- a/docs/content/commands/restore.md +++ b/docs/content/commands/restore.md @@ -1,4 +1,6 @@ -# [after-command] +## Requires a valid [`paket.lock` file](lock-file.html) -`paket restore` fails with an error if the paket.lock file does not exist. -No packages are downloaded in that case. Please see `paket install` and `paket update` to learn how to create the paket.lock file. +`paket restore` fails with an error if the [`paket.lock` file](lock-file.html) +does not exist. No packages are downloaded in that case. Please see +[`paket install`](paket-install.html) and [`paket update`](paket-update.html) to +learn how to create the [`paket.lock` file](lock-file.html). diff --git a/docs/content/commands/show-installed-packages.md b/docs/content/commands/show-installed-packages.md index 692a52e5b7..8003a641d3 100644 --- a/docs/content/commands/show-installed-packages.md +++ b/docs/content/commands/show-installed-packages.md @@ -1,10 +1,14 @@ -## Sample - -Running the command: - - [lang=batchfile] - paket show-installed-packages --all -s - -will result in: - -![alt text](img/paket-show-installed-packages.png "paket show-installed-packages command") +## Example + +```sh +$ paket show-installed-packages --all --silent +Main Newtonsoft.Json - 6.0.8 +Main NUnit - 2.6.4 +Main RestSharp - 104.5 +Main System.Reactive - 3.1.1 +Main System.Reactive.Core - 3.1.1 +Main System.Reactive.Interfaces - 3.1.1 +Main System.Reactive.Linq - 3.1.1 +Main System.Reactive.PlatformServices - 3.1.1 +Main System.Reactive.Windows.Threading - 3.1.1 +``` diff --git a/docs/content/commands/simplify.md b/docs/content/commands/simplify.md index e4f8400aed..d1353725f4 100644 --- a/docs/content/commands/simplify.md +++ b/docs/content/commands/simplify.md @@ -1,82 +1,121 @@ -Simplify will also affect paket.references files, unless [strict](dependencies-file.html#Strict-references) mode is used. +## A note on `strict` mode -
Important: `paket simplify` is a heuristic approach to dependency simplification. It often works very well, but there are rare cases where simplify can result in changes of the package resolution.
+`paket simplify` will also affect +[`paket.references` files](references-files.html), unless +[`strict` mode](dependencies-file.html#Strict-references) is used. -## Sample +> Important: `paket simplify` is a heuristic approach to dependency +> simplification. It often works very well, but there are rare cases where +> simplify can result in changes of the package resolution. -When you install `Castle.Windsor` package in NuGet to a project, it will generate a following `packages.config` file in the project location: +## Interactive mode - [lang=xml] - - - - - +Sometimes, you may still want to have control over some of the [transitive +dependencies](faq.html#transitive). In this case you can use the `--interactive` +flag, which will ask you to confirm before deleting a dependency from a file. -After converting to Paket with [`paket convert-from-nuget command`](paket-convert-from-nuget.html), you should get a following paket.dependencies file: +## Notes and Warnings - [lang=paket] - source https://nuget.org/api/v2 +It is possible through the use of `paket simplify` to make unintended changes to +your [`paket.lock` file](lock-file.html) if a +[transitive dependency](faq.html#transitive) is removed and a subsequent install +is run. This can occur especially if the version specification that previously +existed for the transitive dependency is different than the version +specification that is automatically generated by Paket based on the primary +dependencies of your project. An example may help illustrate the conditions +where this could occur. - nuget Castle.Core 3.3.1 - nuget Castle.Windsor 3.3.0 +Imagine a [`paket.dependencies` file](dependencies-file.html) with the following +contents: -and the NuGet `packages.config` should be converted to following paket.references file: +```paket +source https://nuget.org/api/v2 - Castle.Core - Castle.Windsor +nuget Foo 1.0.0 +nuget Bar 1.0.0 +``` -As you have already probably guessed, the `Castle.Windsor` package happens to have a dependency on the `Castle.Core` package. -Paket by default (without [strict](dependencies-file.html#Strict-references) mode) adds references to all required dependencies of a package that you define for a specific project in paket.references file. -In other words, you still get the same result if you remove `Castle.Core` from your paket.references file. -And this is exactly what happens after executing `paket simplify` command: +Let us imagine that package `Bar` has a dependency on package `Foo` for any +version from `1.0` through `2.0`. The [`paket.lock` file](lock-file.html) that +results for this combination is: - [lang=paket] - source https://nuget.org/api/v2 +```paket +NUGET + remote: https://nuget.org/api/v2 + Foo (1.0.0) + Bar (1.0.0) + Foo (<= 2.0.0) +``` - nuget Castle.Windsor 3.3.0 +In this situation, if `paket simplify` is run, the Foo dependency will be +removed, resulting in a [`paket.dependencies`](dependencies-file.html) of: -will be the content of your paket.dependencies file, and: +```paket +source https://nuget.org/api/v2 - Castle.Windsor +nuget Bar 1.0.0 +``` -will be the content of your paket.references file. +like we expect. But now, if an install is run, the Foo dependency will be free +to update to the maximum allowed by the `Bar` dependency, which could have +unforseen consequences if the author of Foo has introduced a breaking change. -Unless you are relying heavily on components from `Castle.Core`, you would not care about controlling the required version of `Castle.Core` package. Paket will do the job. +## Example -The simplify command will help you maintain your direct dependencies. +When you install `Castle.Windsor` package in NuGet to a project, it will +generate a following `packages.config` file in the project location: -## Interactive mode +```xml + + + + + +``` -Sometimes, you may still want to have control over some of the [transitive dependencies](faq.html#transitive). In this case you can use the `--interactive` flag, -which will ask you to confirm before deleting a dependency from a file. +After converting to Paket with [`paket +convert-from-nuget`](paket-convert-from-nuget.html), you should get a following +paket.dependencies file: +```paket +source https://nuget.org/api/v2 -## Notes and Warnings -It is possible through the use of simplify to make unintended changes to your paket.lock file if a [transitive dependency](faq.html#transitive) is removed and a subsequent install is run. This can occur especially if the version specification that previously existed for the transitive dependency is different than the version specification that is automatically generated by paket based on the primary dependencies of your project. An example may help illustrate the conditions where this could occur. +nuget Castle.Core 3.3.1 +nuget Castle.Windsor 3.3.0 +``` + +The NuGet `packages.config` should be converted to following +[`paket.references` file](references-files.html): -Imagine a paket.dependencies file with the following contents: +```text +Castle.Core +Castle.Windsor +``` - [lang=paket] - source https://nuget.org/api/v2 +As you have already probably guessed, the `Castle.Windsor` package happens to +have a dependency on the `Castle.Core` package. Paket will by default (without +[`strict`](dependencies-file.html#Strict-references) mode) add references to all +required dependencies of a package that you define for a specific project in +paket.references file. In other words, you still get the same result if you +remove `Castle.Core` from your [`paket.references` file](references-files.html). - nuget Foo 1.0.0 - nuget Bar 1.0.0 +This is exactly what happens after executing `paket simplify` command. After +running it, [`paket.dependencies`](dependencies-file.html) will contain: -Let us imagine that package Bar has a dependency on package Foo for any version from 1.0 through 2.0. The paket.lock file that results for this combination is: +```paket +source https://nuget.org/api/v2 - [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Foo (1.0.0) - Bar (1.0.0) - Foo (<= 2.0.0) +nuget Castle.Windsor 3.3.0 +``` -In this situation, if simplify is run, the Foo dependency will be removed, resulting in a paket.dependencies of: +And [`paket.references` file](references-files.html). contains: - [lang=paket] - source https://nuget.org/api/v2 +```text +Castle.Windsor +``` - nuget Bar 1.0.0 +Unless you are relying heavily on types from `Castle.Core`, you would not care +about controlling the required version of `Castle.Core` package. Paket will do +the job. -like we expect. But now, if an install is run, the Foo dependency will be free to update to the maximum allowed by the Bar dependency, which could have unforseen consequences if the author of Foo has introduced a breaking change. +The simplify command will help you maintain your direct dependencies. diff --git a/docs/content/commands/update.md b/docs/content/commands/update.md index c1e392f0a2..02d8daa24b 100644 --- a/docs/content/commands/update.md +++ b/docs/content/commands/update.md @@ -1,68 +1,49 @@ ## Updating all packages -If you do not specify a package, then all packages from paket.dependencies are updated. +If you do not specify a package, then all packages from +[`paket.dependencies`](dependencies-file.html) are updated. - [lang=batchfile] - paket update [--force|-f] [--redirects] [--no-install] +```sh +paket update +``` -First, the current [`paket.lock` file](lock-file.html) is deleted. `paket update` then recomputes the current dependency resolution, -as explained under [Package resolution algorithm](http://fsprojects.github.io/Paket/resolver.html), and writes it to paket.lock. -It then proceeds to download the packages and to install them into the projects. - -Please see [`paket install`](paket-install.html) if you want to keep the current versions from your paket.lock file. - -### Options: - - `--force [-f]`: Forces the download and reinstallation of all packages. - - `--redirects`: Creates binding redirects for the NuGet packages. - - `--no-install`: Skips paket install process afterward generation of [`paket.lock` file](lock-file.html). +First, the current [`paket.lock` file](lock-file.html) is deleted. `paket +update` then recomputes the current dependency resolution, as explained under +[Package resolution algorithm](http://fsprojects.github.io/Paket/resolver.html), +and writes it to [`paket.lock` file](lock-file.html). It then proceeds to +download the packages and to install them into the projects. +Please see [`paket install`](paket-install.html) if you want to keep the current +versions from your [`paket.lock` file](lock-file.html). ## Updating a single package, or packages matching a pattern -It's also possible to update only specified packages and to keep all other dependencies fixed: - - [lang=batchfile] - paket update nuget PACKAGENAME [version VERSION] [group GROUPNAME] [--force|-f] [--redirects] [--no-install] - -### Options: - - `nuget `: Nuget package id - - `version `: Allows to specify version of the package. +It's also possible to update only specified packages and to keep all other +dependencies fixed: - `group `: Allows to specify the group where the package is located. If omitted then Paket defaults to the Main group. +```sh +paket update PACKAGE-ID +paket update PACKAGE-ID --filter +``` - `--force [-f]`: Forces the download and reinstallation of all packages. - - `--redirects`: Creates binding redirects for the NuGet packages. - - `--no-install`: Skips paket install process afterward generation of [`paket.lock` file](lock-file.html). - - `--filter`: Treat PACKAGENAME as a regex pattern to match against, rather than a single package. Enforces a "total" match (i.e. an implicit ^ and $ at beginning and end of PACKAGENAME) +The `--filter` parameter makes Paket interpret the `PACKAGE-ID` as a regular +expression pattern to match against, rather than a single package. Paket +enforces a "total" match (i.e. an implicit `^` and `$` at beginning and end of +`PACKAGE-ID` as added). ## Updating a single group If you want to update a single group you can use the following command: - [lang=batchfile] - paket update group GROUPNAME [--force|-f] [--redirects] [--no-install] - -### Options: - - `group `: Group name - - `--force [-f]`: Forces the download and reinstallation of all packages. - - `--redirects`: Creates binding redirects for the NuGet packages. - - `--no-install`: Skips paket install process afterward generation of [`paket.lock` file](lock-file.html). - -## Updating http dependencies +```sh +paket update --group GROUP-NAME +``` -If you want to update a file you need to use the [`paket install` command](paket-install.html) or [`paket update` command](paket-update.html) with `--force [-f]` option. +## Updating `http` dependencies -Using [groups](groups.html) for http dependent files can be helpful in order to reduce the number of files that are re-installed. +If you want to update a file you need to use the +[`paket install` command](paket-install.html) or +[`paket update` command](paket-update.html) with the `--force` parameter. +Using [groups](groups.html) for `http` dependent files can be helpful in order +to reduce the number of files that are reinstalled. diff --git a/docs/content/commands/why.md b/docs/content/commands/why.md index 5661df7df3..ecd6cf01f5 100644 --- a/docs/content/commands/why.md +++ b/docs/content/commands/why.md @@ -1,3 +1,4 @@ ## Example -Have a look at [this blog post](http://theimowski.com/blog/2016/10-30-paket-why-command/index.html). +Have a look at +[this blog post](http://theimowski.com/blog/2016/10-30-paket-why-command/index.html). diff --git a/docs/files/img/paket-find-package-versions.png b/docs/files/img/paket-find-package-versions.png deleted file mode 100644 index ec33b80648f645c102283b241080059069c4cb2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4426 zcmeHKX;f2LwhmH?N+EVh356i-NQ43$0)k*L$e0L`0AUCc5GjldkwIoi*)lw2Duoc{ zNZSz+LQrN5!vZ0;7($03Kp;#4h7ci!IfV4Z>i4JX@B8&uo%Nl2*WK%^v-ke?zTZ7J z^`?W3(n0luAP`8&&ejqI0_~xIKyt48P1jCc=Mn6H|IRS|e5Q!voJ_(gbM^hUE z5=jC1qyTCoERloB{ueB94FMp34NYD1p>hJK93Sdh0CkOV^JdmlQhR&*hmTBP^p8v~ zFE7hvG9c7H$Da)R-!fq2bRq-T@xXms_b?FXQ0MNHW8h!j0gP(lR&L==_+P>!eM0>} z_kD1|;rhXT;eUnbpVv3^OSym>S`OPF(%myoLzd+KsiiilbNGbQP8f!^D|hdFx< zzJnXl=Ou)TE4En>_2{Da$It9Ang|-P)&(Nt`A=29u){NXT+31-|s< z#kz^?d*bv3qVdu#gkB%THqv>Em5h{6;a5OTH>>fh;Icw#?@rj?h+fHsEMx+`MY_VA z2#gXzTM6qXLhNwqsGnKuM}yboie;%*oMdMTF}5yc!Tc#by8K?a>}psjkynICcIEi2 zcX%|lyb&=sRZrv=h7|^nVeFdUJ*~)-KE+C-Bz%E@TexJNB20r?1edu*x}TqTY)v&G zwN|S~afAZfy0%et>+|&Gd4GRSAxC7_`DrgC&eyA5s9RNdsb{@xW(q~}*_n%LesfTF zV553kVGr5u6=ZL7PC4P1x9qp3f=jK%o)pneaNzijo}3nJ-2WtXw}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A_;a?1Yx`4K;^7 z+#kvvsu+l(*ylMv7RBg}dz_vb)+tW0qo^(Q)j=|*E#Q=>I|}H9M~xk*bI0AW6sL54 zFPY&tDTacQ7d#O&)bUU7_>*{UwD+?=xDSedrYSGK;&N|xaCJ7MsNztquXo~(X@VwM zh@|naneMZ8Tc2Pk(?;}KHRVrLN|t6YM4SPR(Y`;Wih@&7?OoViV_c2WdiP`fmA=e} zf7#M0o=(&3mR_944+clcck?|F*AvTIJf9;!QCUde|EAz5ZnzguR;V0uEvIni@+JhE zLh-MwTT2^a_5Qo%aGkEZDJ}&z&X3FbFgOXFe;woOuP_R%7@|^E9jsrdWxz{mKnV>7 zNlTxbx^MxeYq|cvI$q(hzi#9Qtfa0$g&UCbD4C{~@ll;5s7_LAJQi9ra86KyZ>CgG_n zSTX+o{b3Z{+)}$o zpozvEuOrr<@=oNzxmN5H4B+mz+0eIW1r_11E=){`??xY2D-YAtW07$Ioo{L&z`{9m%T(4-BwA<@Ehc~udDn{C6?4=+GxF^mKxrD!b{juls*(5W zd#9*TCCkLRl2rRPyfpKU4&jvD1l90DNIYZXuYq&(@+ksk;N34`;9&;iCX?Cd~3VYf2;Q?b!jAIe1V=)y#TYu!I_78Uuh8E6a+6!a;f71or7^tvdRIJGJnc}V%Sbb;&kz!4`nMOi z&9G*W?)}99{7e4)-&o?+i#l~@GHuB;Rn)l>!*2osXvClR|HMG68=pJuA5(^UZ%6ca zCdz=Hc&{6O4C{Q*j^6}1z3>EeZe;_DJcH6nI!+sqg&%yW5*kX`OSCxjO=AF=0aW+b tqXsoqDu=E9aQp!dM5;P_YvZ>!2*x&nOWI1drMrKTc2*9SRTkcV`!_t@j`IKj diff --git a/docs/files/img/paket-find-packages.png b/docs/files/img/paket-find-packages.png deleted file mode 100644 index 086cbfc499cb0302b0ac47a8b07ada91aaa8d490..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6401 zcmeHrXIvAByY55;g;iV?5UDC45C}y90i{Y!s38GDk!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ht;jF!mqvcp-8#{7(j8i}BUhyVM%x(Bu1xtoJ8FZwTd~J4{Nthyy{+;R zjmN?+kE6I~6IV2uak`h?IjTw=Hh}rOf6ct}Eia5{TO~XSVCUXuMUl8eM zLWbUWb5~fdSn#%V>PcK|4Xdi;_JU|+wH;_3PZ3;hBOjhA0u0aL%Q@%0r>z#%QNp`K zNuPc&F{`SS4rqYCegl^3=Oyg{CeYem)neSQDE$pT1t$%h0zLJgaFroPI3{%=ue$&V tTxI+v<^RdC|M!0e6t=MXfKQK(7`#S`Kjl&af?{}*wMxPkxx diff --git a/docs/files/img/paket-show-installed-packages.png b/docs/files/img/paket-show-installed-packages.png deleted file mode 100644 index a8813e9b68b778c730292daff0a62c7eb5a6cd10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7029 zcmeHMXEj3<5h9FX2tjnwf)Q=ZXrl!~7>q7zw1`CXGP;P2UZM-41R(@r zl<1<2PJ-y=PX6!vKKI_|-jDag{qXK*?Q@>Jo_*HY>$le0d!2P&>glM{)3DP3004ST z4OJKbK#BtZNQ|h+h@8@z?pWfD!~>?T3@9JqSR)R|?Ul5Z0D#I^+Ox+L000?4?-5*$ z$OnNy;=~Tp7YFHsKwjcRQU-}D>w}cNlt3UQkiHVgOGz1|r3_Ls0U7=wFGGy}V~oC) zl@&-C3o^lq|G74ZV~8}aWr9`0V4wKLYhlLG;a*zdSi>|dEWFvUtN|U4MWBS~s+uGWCzxERweq#RT&!3lB0LljNU;0u~seIQvSI)f^KV{lo9 z&7<_s`*ZEzzjyUXCBhp3HF;?`t0~@9{r7 zJ3H>cTt0lMtFC(JZAE&W7isu(t>pADwS8uA~ zuIvnB*td0Xm}0-|XS|2U<7zpBtrvJ6J#T+W1kdeu39oW_Fk$o|(9+-qC}#--@k4YCan)1x6J?N1R3Bv&^q> zeA#;M41ykCLe(P&dj+c!A21|&h_9|;EL#13|2jqn;csn{LUNw4NdEvN#E|ic^=C55PU5p#x7JYwb*Njp|pCF>e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@(OanU5N*he9-^6^-Tz)G`S<(@IJ<#`WmxCfCbwNuYaVw4D;m=j?>GDC4v#7aZLR+qB~XAcARLu0>ezvF?*Q0ogwjH zW&D?B1_B>%c<;OrtcY3^Z?(u?Jg>^RM>R#)aAlx$SR$H^GLtlx%HyOmkaPM9e~D+0 z)KZ^1xn9 z@7MO~p4{tl*jyM+g>81LW!wiI8MF9Ynzt6wM3Fc64wS)?>9=-YV4V`irC236_XJ&y z3KOSlF`1P0z02D$^yDjAXX8B;W^vZalyjLkl{C6H# z%dbScek%;MrcMtq&$LTV6}l`Em34%eJ!jtx?y`jlr_eVD@*(_q-d$g%41iz}4j(rF zQdzVmtikv0o^BO=WI3H%YPxSH-#S+`5ZSd-`jtM=e@|Jkr+2@;fZ&!mCpVL&&UxY^ z`(+R=aS>Q4T{S9bgvkqxC(zbHmCmn|DgS#D}9&V3t`y2Y^ z7D@9fCW+aE=7o^uCchm1>PdV0l=wgg8?NiSLf+zZfwo^7RD4|#46``YkOwWd$m9tJ zq(H&R`@}CY!>@-noyu3R`ggOevoZc*bb4dHJf+d{d#DMI#E7WhN}S0EIcLyy=CcPp9+snDEQy zpq8^Vh@X5{n_ft1mgbwh%R;LwBJ5!ulfq;zS^YbXO`K`h&~C%mCtyXkGCz89WTbDb zQ|DRjcGo-y5%X-(b4$x;IXZWAcHPxJckw~VeQ97KB)cZO`4cXcU(2Edi^3wtO_TC*00WB7|i&0C)5(AI=*J%K*88Ep6+({EQZd%_A?r^WRI zdKmw?p+3OfQvCPu{|g!=`;ZL-??TphDsU+2GCi1rnph`VrbrG=>hX7oFMP#HEPQ># z=nBJ#JBd^uHPQ=ZAx)nvQC@vQ_AR0LWEt{r~^~ From ce753f7bb37e41edac99678ceea4f2c9765a8774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 21:49:06 +0200 Subject: [PATCH 13/88] Docs: review testimonials --- docs/content/testimonials.md | 113 +++++++++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 24 deletions(-) diff --git a/docs/content/testimonials.md b/docs/content/testimonials.md index b63c237440..ad6e063d7e 100644 --- a/docs/content/testimonials.md +++ b/docs/content/testimonials.md @@ -2,60 +2,125 @@ ## GROSSWEBER -

Paket solves dependency resolution very elegantly.

+> Paket solves dependency resolution very elegantly. -We at [GROSSWEBER](http://grossweber.com/en) are fans of command line tools that serve a single purpose, like [git](http://grossweber.com/git). Paket is such a tool that works extremely well when compared to other solutions available on the .NET platform. We use Paket not only to manage dependencies, but also to create our own NuGet packages. All in an easy-to-use, consistent, reliable and fast way. Anybody who has been working with dependency managers on other platforms like npm, bundler and pip will be pleased to find a similar workflow with Paket. +We at [GROSSWEBER](https://grossweber.com/en) are fans of command line tools +that serve a single purpose, like [git](https://grossweber.com/git). Paket is +such a tool that works extremely well when compared to other solutions available +on the .NET platform. We use Paket not only to manage dependencies, but also to +create our own NuGet packages. All in an easy-to-use, consistent, reliable and +fast way. Anybody who has been working with dependency managers on other +platforms like npm, bundler and pip will be pleased to find a similar workflow +with Paket. -We love what we do and with love comes passion. This passion drives us to actively engage in our client projects and to design and develop as if they were our own. Spreading the word about Paket in our [trainings](http://grossweber.com/trainings) comes naturally. +We love what we do and with love comes passion. This passion drives us to +actively engage in our client projects and to design and develop as if they were +our own. Spreading the word about Paket in our +[trainings](http://grossweber.com/trainings) comes naturally. -[@agross](https://github.com/agross), [GROSSWEBER](http://grossweber.com/en), Germany/Leipzig +[Alexander Groß](https://github.com/agross), +[GROSSWEBER](https://grossweber.com/en) -![alt text](img/testimonials-grossweber.png "GROSSWEBER likes Paket") +![GROSSWEBER likes Paket](img/testimonials-grossweber.png "GROSSWEBER likes Paket") ## 15below > Paket has removed the pain from disciplined dependency management. -[15below](http://15below.com) started moving from copying binary dependencies around to nuget dependencies several years ago, and it's been a massive help with our internal coding discipline. But the time overheads added to development by versioned path merge conflicts and the confusion caused by multiple versions within solutions was becoming more and more of a pain point. It reached the stage where we were considering moving back to a method of working we knew was less efficient just to avoid the pain of the tooling. +[15below](http://15below.com) started moving from copying binary dependencies +around to nuget dependencies several years ago, and it's been a massive help +with our internal coding discipline. But the time overheads added to development +by versioned path merge conflicts and the confusion caused by multiple versions +within solutions was becoming more and more of a pain point. It reached the +stage where we were considering moving back to a method of working we knew was +less efficient just to avoid the pain of the tooling. -Paket has removed the pain from disciplined dependency management. Sensible design for large, shared projects protects us from insane merge conflicts and on the few occasions that we have discovered bugs or missing features the clean codebase and responsive maintainers have enabled us to fill those gaps rapidly - often with a new release the same day. +Paket has removed the pain from disciplined dependency management. Sensible +design for large, shared projects protects us from insane merge conflicts and on +the few occasions that we have discovered bugs or missing features the clean +codebase and responsive maintainers have enabled us to fill those gaps rapidly - +often with a new release the same day. -Michael Newton (Technical Architect) [@mavnn](https://twitter.com/mavnn), [15below](http://15below.com) +Michael Newton (Technical Architect) [@mavnn](https://twitter.com/mavnn), +[15below](http://15below.com) ## Basware -> Paket is a tool which makes it easy to manage enterprise application dependencies and component upgrades. +> Paket is a tool which makes it easy to manage enterprise application +> dependencies and component upgrades. -[Basware](http://www.basware.com/) Purchase to Pay is a large scale enterprise application for simplifying and streamlining key financial processes. +[Basware](http://www.basware.com/) Purchase to Pay is a large scale enterprise +application for simplifying and streamlining key financial processes. -Managing the 3rd-party component dependencies over more than 100 solutions can be challenging, however Paket handles this well, and guarantees that the dll-libraries are all the correct version. +Managing the 3rd-party component dependencies over more than 100 solutions can +be challenging, however Paket handles this well, and guarantees that the +dll-libraries are all the correct version. -With over 80 third party components in use, Paket gives us a clear vision of the dependency tree. This helps when making work estimates for major component version upgrades. Before taking Paket into use, making work estimates for component upgrades was painful, as the dependencies were not always clearly understood. +With over 80 third party components in use, Paket gives us a clear vision of the +dependency tree. This helps when making work estimates for major component +version upgrades. Before taking Paket into use, making work estimates for +component upgrades was painful, as the dependencies were not always clearly +understood. Tuomas Hietanen (Lead Software Engineer) [Basware](http://www.basware.com/) ## Betgenius -> Paket has improved the productivity of our teams by reducing the dependency management overhead we had been experiencing with NuGet. - -[Betgenius](http://www.betgenius.com) is a data provider to the sports betting industry with peak load exceeding 100,000 messages/second. Our software architecture is highly distributed to facilitate business demands for scalability which means we are currently building around 150 .NET solutions. Using an internal NuGet repository we share our internal and 3rd party dependencies. Trying to achieve continuous integration with the out-of-the-box NuGet client is next to impossible at this scale due to NuGet's clumsy version management implementation. - -Paket has enabled us to explicitly define our constraints and forces us to think about how we want our dependencies to look. The Paket client is much more intuitive. It is vastly quicker at performing updates than the NuGet client and we don't have a constant stream of csproj updates to change the reference paths. Another huge benefit we got from using Paket is that the paket pack command creates a much better defined package than the NuGet pack. Paket inspects your dependencies file and uses that to put strict constraints into the nuspec file unlike the much less advanced NuGet client. - -Chris Haines (Development Team Lead) [@cjbhaines](https://twitter.com/cjbhaines), [Betgenius](http://www.betgenius.com) +> Paket has improved the productivity of our teams by reducing the dependency +> management overhead we had been experiencing with NuGet. + +[Betgenius](http://www.betgenius.com) is a data provider to the sports betting +industry with peak load exceeding 100,000 messages/second. Our software +architecture is highly distributed to facilitate business demands for +scalability which means we are currently building around 150 .NET solutions. +Using an internal NuGet repository we share our internal and 3rd party +dependencies. Trying to achieve continuous integration with the out-of-the-box +NuGet client is next to impossible at this scale due to NuGet's clumsy version +management implementation. + +Paket has enabled us to explicitly define our constraints and forces us to think +about how we want our dependencies to look. The Paket client is much more +intuitive. It is vastly quicker at performing updates than the NuGet client and +we don't have a constant stream of csproj updates to change the reference paths. +Another huge benefit we got from using Paket is that the paket pack command +creates a much better defined package than the NuGet pack. Paket inspects your +dependencies file and uses that to put strict constraints into the nuspec file +unlike the much less advanced NuGet client. + +Chris Haines (Development Team Lead) [@cjbhaines](https://twitter.com/cjbhaines), +[Betgenius](http://www.betgenius.com) ## Nessos -> Paket is an excellent dependency management and package authoring tool that has greatly improved our productivity. +> Paket is an excellent dependency management and package authoring tool that +> has greatly improved our productivity. -[Nessos](http://www.nessos.gr/) is an Athens, Greece based ISV and consultancy focused on .NET/F# technologies with expertise in tailored business applications and scalable computation. Nessos is a [major contributor](https://github.com/nessos) in .NET open source software and is author and primary contributor of the [MBrace](http://www.m-brace.net/) distributed computation library. +[Nessos](http://www.nessos.gr/) is an Athens, Greece based ISV and consultancy +focused on .NET/F# technologies with expertise in tailored business applications +and scalable computation. Nessos is a [major +contributor](https://github.com/nessos) in .NET open source software and is +author and primary contributor of the [MBrace](http://www.m-brace.net/) +distributed computation library. -Paket has enabled us to quickly and effectively control dependencies in large and complicated projects we have been developing both in-house and in our open source development. Its simple design philosophy is an excellent match to FAKE and git and is ideal for cross platform development. Special mention needs to made of paket pack: we heavily modularize our code in small nuget packages that need to be updated often. The default nuget tooling for authoring packages was cumbersome to use since dependency constraints needed to be edited by hand. This often resulted in accidental releases of dud packages. Packet pack does away with that concern; authoring a package update now takes less than 10 seconds of manual work. +Paket has enabled us to quickly and effectively control dependencies in large +and complicated projects we have been developing both in-house and in our open +source development. Its simple design philosophy is an excellent match to FAKE +and git and is ideal for cross platform development. Special mention needs to +made of paket pack: we heavily modularize our code in small nuget packages that +need to be updated often. The default nuget tooling for authoring packages was +cumbersome to use since dependency constraints needed to be edited by hand. This +often resulted in accidental releases of dud packages. Packet pack does away +with that concern; authoring a package update now takes less than 10 seconds of +manual work. -Eirik Tsarpalis (Nessos R&D) [@eiriktsarpalis](https://twitter.com/eiriktsarpalis), [Nessos](http://www.nessos.gr) +Eirik Tsarpalis (Nessos R&D) +[@eiriktsarpalis](https://twitter.com/eiriktsarpalis), +[Nessos](http://www.nessos.gr) ## Please contribute your testimonials! -Adding new testimonials to this page is easy. Just write your quote in plain text, using some Markdown formatting and send a pull request to [docs/content/testimonials.md](https://github.com/fsprojects/Paket/blob/master/docs/content/testimonials.md). +Adding new testimonials to this page is easy. Just write your quote in plain +text, using some Markdown formatting and send a pull request to +[docs/content/testimonials.md](https://github.com/fsprojects/Paket/blob/master/docs/content/testimonials.md). Look at the existing examples to see how this works. From 109baf1c3d4a9007b3d9aea9f2c77f88cd1548f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Wed, 14 Jun 2017 22:16:00 +0200 Subject: [PATCH 14/88] Docs: review Git(Hub) dependencies --- docs/content/git-dependencies.md | 123 ++++++++++------- docs/content/github-dependencies.md | 203 +++++++++++++++++----------- 2 files changed, 194 insertions(+), 132 deletions(-) diff --git a/docs/content/git-dependencies.md b/docs/content/git-dependencies.md index 4759d0a49b..85109be35a 100644 --- a/docs/content/git-dependencies.md +++ b/docs/content/git-dependencies.md @@ -1,83 +1,106 @@ # Git dependencies -Paket allows you to automatically manage the linking of files from any git repo. +Paket allows you to automatically manage the linking of files from any Git +repository. -
This feature assumes that you have git installed. -If you don't have git installed then Paket still allows you to reference files from GitHub.
+> This feature assumes that you have [git](https://git-scm.com/) installed. +> If you don't have git installed then Paket still allows you to +> [reference files from GitHub](github-dependencies.html). ## Referencing a Git repository -You can also reference a complete git repository by specifying the clone URL in the [`paket.dependencies` file](dependencies-file.html): +You can reference a complete Git repository by specifying the clone URL in the +[`paket.dependencies` file](dependencies-file.html): - [lang=paket] - git https://github.com/fsprojects/Paket.git - git git@github.com:fsharp/FAKE.git +```paket +git https://github.com/fsprojects/Paket.git +git git@github.com:fsharp/FAKE.git +``` -This will clone the repository, checkout the latest version of the default branch and put it into your `paket-files` folder. +This will clone the repository, checkout the latest version of the default +branch and put it into your `paket-files` folder. -If you want to restrict Paket to a special branch, tag or a concrete commit then this is also possible: +If you want to restrict Paket to a special branch, tag or a concrete commit then +this is also possible: - [lang=paket] - git https://github.com/fsprojects/Paket.git master - git http://github.com/forki/AskMe.git 97ee5ae7074bdb414a3e5dd7d2f2d752547d0542 - git http://github.com/forki/AskMe.git 97ee5ae7074b // short hash - git https://github.com/forki/FsUnit.git 1.0 // tag - git file:///C:\Users\Steffen\AskMe master // local git repo +```paket +git https://github.com/fsprojects/Paket.git master +git https://github.com/forki/AskMe.git 97ee5ae7074bdb414a3e5dd7d2f2d752547d0542 +git https://github.com/forki/AskMe.git 97ee5ae7074b // short hash +git https://github.com/forki/FsUnit.git 1.0 // tag +git file:///C:\Users\Steffen\AskMe master // local git repo +``` ### Referencing Git tags -Paket allows you to specify version ranges for git tags similar to [NuGet version ranges](nuget-dependencies.html#Version-constraints): +Paket allows you to specify version ranges for Git tags similar to +[NuGet version ranges](nuget-dependencies.html#Version-constraints): - [lang=paket] - git https://github.com/fsprojects/Paket.git >= 1.0 // at least 1.0 - git http://github.com/forki/AskMe.git < 3.0 // lower than version 3.0 - git http://github.com/forki/AskMe.git ~> 2.0 // 2.0 <= x < 3.0 - git https://github.com/forki/FsUnit.git 1.0 // exactly 1.0 - git file:///C:\Users\Steffen\AskMe >= 1 alpha // at least 1.0 including alpha versions - git file:///C:\Users\Steffen\AskMe >= 1 prerelease // at least 1.0 including prereleases +```paket +git https://github.com/fsprojects/Paket.git >= 1.0 // at least 1.0 +git http://github.com/forki/AskMe.git < 3.0 // lower than version 3.0 +git http://github.com/forki/AskMe.git ~> 2.0 // 2.0 <= x < 3.0 +git https://github.com/forki/FsUnit.git 1.0 // exactly 1.0 +git file:///C:\Users\Steffen\AskMe >= 1 alpha // at least 1.0 including alpha versions +git file:///C:\Users\Steffen\AskMe >= 1 prerelease // at least 1.0 including prereleases +``` -You can read more about the version range details in the corresponding [NuGet reference section](nuget-dependencies.html#Version-constraints). +You can read more about the version range details in the corresponding +[NuGet reference section](nuget-dependencies.html#Version-constraints). -## Running a build in git repositories +## Running a build in Git repositories -If your referenced git repository contains a build script then Paket can execute this script after restore: +If your referenced Git repository contains a build script then Paket can execute +this script after restore: - [lang=paket] - git https://github.com/forki/nupkgtest.git master build: "build.cmd", OS: windows - git https://github.com/forki/nupkgtest.git master build: "build.sh", OS: mono +```paket +git https://github.com/forki/nupkgtest.git master build: "build.cmd", OS: windows +git https://github.com/forki/nupkgtest.git master build: "build.sh", OS: mono +``` This allows you to execute arbitrary commands after restore. -NOTE: This functionality uses the .Net Process API, with UseShellExecute set to true. This means that on Windows your command will execute in a cmd context. If your build is not a .bat file, you will need to fully qualify the command with the shell program to run as well, like this: - - [lang=paket] - git https://uri/to/repo.git master build: "powershell build.ps1", OS: windows +NOTE: This functionality uses the .NET `Process` API, with `UseShellExecute` set +to `true`. This means that on Windows your command will execute in a `cmd.exe` +context. If your build is not a `.bat` file, you will need to fully qualify the +command with the shell program to run as well, like this: + +```paket +git https://uri/to/repo.git master build: "powershell build.ps1", OS: windows +``` ## Using Git repositories as NuGet source -If you have NuGet packages inside a git repository you can easily use the repository as a NuGet source from the [`paket.dependencies` file](dependencies-file.html): +If you have NuGet packages inside a git repository you can easily use the +repository as a NuGet source from the [`paket.dependencies` +file](dependencies-file.html): - [lang=paket] - git https://github.com/forki/nupkgtest.git master Packages: /source/ +```paket +git https://github.com/forki/nupkgtest.git master Packages: /source/ - nuget Argu +nuget Argu +``` The generated [`paket.lock` file](lock-file.html) will look like this: - [lang=paket] - NUGET - remote: paket-files/github.com/forki/nupkgtest/source - Argu (1.1.3) - GIT - remote: https://github.com/forki/nupkgtest.git - (05366e390e7552a569f3f328a0f3094249f3b93b) +```paket +NUGET + remote: paket-files/github.com/forki/nupkgtest/source + Argu (1.1.3) +GIT + remote: https://github.com/forki/nupkgtest.git + (05366e390e7552a569f3f328a0f3094249f3b93b) +``` -It's also possible to [run build scripts](git-dependencies.html#Running-a-build-in-git-repositories) to create the NuGet packages: +It's also possible to +[run build scripts](git-dependencies.html#Running-a-build-in-git-repositories) +to create the NuGet packages: - [lang=paket] - git https://github.com/forki/nupkgtest.git master build: "build.cmd", Packages: /source/, OS: windows - git https://github.com/forki/nupkgtest.git master build: "build.sh", Packages: /source/, OS: mono +```paket +git https://github.com/forki/nupkgtest.git master build: "build.cmd", Packages: /source/, OS: windows +git https://github.com/forki/nupkgtest.git master build: "build.sh", Packages: /source/, OS: mono - nuget Argu +nuget Argu +``` -In this sample we have different build scripts for mono and windows. +In this sample we have different build scripts for Mono and Windows. diff --git a/docs/content/github-dependencies.md b/docs/content/github-dependencies.md index 235698e880..f56cbc34e2 100644 --- a/docs/content/github-dependencies.md +++ b/docs/content/github-dependencies.md @@ -1,133 +1,172 @@ # GitHub dependencies -Paket allows you to automatically manage the linking of files from [github.com](http://www.github.com) or [gist.github.com](https://gist.github.com/) into your projects. +Paket allows you to automatically manage the linking of files from +[github.com](http://www.github.com) or +[gist.github.com](https://gist.github.com/) into your projects. - -If you have git installed then Paket also allows you to [reference files from other git repositories](git-dependencies.html). +If you have Git installed then Paket also allows you to +[reference files from other git repositories](git-dependencies.html). ## Referencing a single file -You can reference a single file from [github.com](http://www.github.com) simply by specifying the source repository and the file name in the [`paket.dependencies` file](dependencies-file.html): +You can reference a single file from [github.com](http://www.github.com) simply +by specifying the source repository and the file name in the +[`paket.dependencies` file](dependencies-file.html): - [lang=paket] - github forki/FsUnit FsUnit.fs +```paket +github forki/FsUnit FsUnit.fs +``` -If you run the [`paket update` command](paket-update.html), it will download the file to a sub folder in ``paket-files`` and also add a new section to your [`paket.lock` file](lock-file.html): +If you run the [`paket update` command](paket-update.html), it will download the +file to a subdirectory in `paket-files` and also add a new section to your +[`paket.lock` file](lock-file.html): - [lang=paket] - GITHUB - remote: forki/FsUnit - FsUnit.fs (7623fc13439f0e60bd05c1ed3b5f6dcb937fe468) +```paket +GITHUB + remote: forki/FsUnit + FsUnit.fs (7623fc13439f0e60bd05c1ed3b5f6dcb937fe468) +``` -As you can see the file is pinned to a concrete commit. This allows you to reliably use the same file version in succeeding builds until you elect to perform a [`paket update` command](paket-update.html) at a time of your choosing. +As you can see the file is pinned to a concrete commit. This allows you to +reliably use the same file version in succeeding builds until you elect to +perform a [`paket update` command](paket-update.html) at a time of your +choosing. -By default the `master` branch is used to determine the commit to reference, you can specify the desired branch or commit in the [`paket.dependencies` file](dependencies-file.html): +By default the `master` branch is used to determine the commit to reference, you +can specify the desired branch or commit in the [`paket.dependencies` +file](dependencies-file.html): - [lang=paket] - github fsharp/fsfoundation:gh-pages img/logo/fsharp.svg - github forki/FsUnit:7623fc13439f0e60bd05c1ed3b5f6dcb937fe468 FsUnit.fs +```paket +github fsharp/fsfoundation:gh-pages img/logo/fsharp.svg +github forki/FsUnit:7623fc13439f0e60bd05c1ed3b5f6dcb937fe468 FsUnit.fs +``` -If you want to reference the file in one of your project files then add an entry to the project's [`paket.references` file](references-files.html): +If you want to reference the file in one of your project files then add an entry +to the project's [`paket.references` file](references-files.html): - [lang=paket] - File: FsUnit.fs +```paket +File: FsUnit.fs +``` -and run [`paket install` command](paket-install.html). This will reference the linked file directly into your project and by default, be visible under ``paket-files`` folder in project. +and run [`paket install` command](paket-install.html). This will reference the +linked file directly into your project and by default, be visible under +`paket-files` directory in project. -![alt text](img/github_ref_default_link.png "GitHub file referenced in project with default link") +![GitHub file referenced in project with default link](img/github_ref_default_link.png "GitHub file referenced in project with default link") -You can specify custom folder for the file: +You can specify custom directory for the file: - [lang=paket] - File: FsUnit.fs Tests\FsUnit +```paket +File: FsUnit.fs Tests\FsUnit +``` -![alt text](img/github_ref_custom_link.png "GitHub file referenced in project with custom link") +![GitHub file referenced in project with custom link](img/github_ref_custom_link.png "GitHub file referenced in project with custom link") -Or if you use ``.`` for the directory, the file will be placed under the root of the project: +Or if you use `.` for the directory, the file will be placed under the root of the project: - [lang=paket] - File: FsUnit.fs . +```paket +File: FsUnit.fs . +``` -![alt text](img/github_ref_root.png "GitHub file referenced in project under root of project") +![GitHub file referenced in project under root of project](img/github_ref_root.png "GitHub file referenced in project under root of project") ## Referencing a GitHub repository -You can also reference a complete [github.com](http://www.github.com) repository by specifying the repository id in the [`paket.dependencies` file](dependencies-file.html): +You can also reference a complete [github.com](http://www.github.com) repository +by specifying the repository id in the [`paket.dependencies` +file](dependencies-file.html): + +```paket +// master branch +github tpetricek/FSharp.Formatting - [lang=paket] - github tpetricek/FSharp.Formatting // master branch - github tpetricek/FSharp.Formatting:2.13.5 // version 2.13.5 - github tpetricek/FSharp.Formatting:30cd5366a4f3f25a443ca4cd62cd592fd16ac69 // specific commit 30cd5366a4f3f25a443ca4cd62cd592fd16ac69 +// version 2.13.5 +github tpetricek/FSharp.Formatting:2.13.5 -This will download the given repository and put it into your `paket-files` folder. In this case we download the source of [reveal.js](http://lab.hakim.se/reveal-js/#/). +// specific commit 30cd5366a4f3f25a443ca4cd62cd592fd16ac69 +github tpetricek/FSharp.Formatting:30cd5366a4f3f25a443ca4cd62cd592fd16ac69 +``` -## Recognizing Build Action +This will download the given repository and put it into your `paket-files` +directory. In this case we download the source of +[reveal.js](http://lab.hakim.se/reveal-js/). + +## Recognizing build action Paket will recognize build action for referenced file based on the project type. -As example, for a ``*.csproj`` project file, it will use ``Compile`` Build Action if you reference ``*.cs`` file -and ``Content`` Build Action if you reference file with any other extension. +As example, for a `*.csproj` project file, it will use `Compile` build action if +you reference `*.cs` file and `Content` build action if you reference file with +any other extension. ## Remote dependencies -If the remote file needs further dependencies then you can just put a [`paket.dependencies` file.](dependencies-file.html) into the same GitHub repo folder. -Let's look at a sample: - -![alt text](img/octokit-module.png "Octokit module") +If the remote file needs further dependencies then you can just put a +[`paket.dependencies` file](dependencies-file.html) into the same GitHub +repository directory. Let's look at a sample: -And we reference this in our own [`paket.dependencies` file.](dependencies-file.html): +![Octokit module](img/octokit-module.png "Octokit module") - [lang=paket] - github fsharp/FAKE modules/Octokit/Octokit.fsx +And we reference this in our own +[`paket.dependencies` file](dependencies-file.html): +```paket +github fsharp/FAKE modules/Octokit/Octokit.fsx +``` This generates the following [`paket.lock` file](lock-file.html): - [lang=paket] - NUGET - remote: https://nuget.org/api/v2 - Microsoft.Bcl (1.1.9) - Microsoft.Bcl.Build (>= 1.0.14) - Microsoft.Bcl.Build (1.0.21) - Microsoft.Net.Http (2.2.28) - Microsoft.Bcl (>= 1.1.9) - Microsoft.Bcl.Build (>= 1.0.14) - Octokit (0.4.1) - Microsoft.Net.Http (>= 0) - GITHUB - remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (a25c2f256a99242c1106b5a3478aae6bb68c7a93) - Octokit (>= 0) - -As you can see Paket also resolved the Octokit dependency. +```paket +NUGET + remote: https://nuget.org/api/v2 + Microsoft.Bcl (1.1.9) + Microsoft.Bcl.Build (>= 1.0.14) + Microsoft.Bcl.Build (1.0.21) + Microsoft.Net.Http (2.2.28) + Microsoft.Bcl (>= 1.1.9) + Microsoft.Bcl.Build (>= 1.0.14) + Octokit (0.4.1) + Microsoft.Net.Http (>= 0) +GITHUB + remote: fsharp/FAKE + modules/Octokit/Octokit.fsx (a25c2f256a99242c1106b5a3478aae6bb68c7a93) + Octokit (>= 0) +``` + +As you can see Paket also resolved the `Octokit` dependency. ## Referencing a private GitHub repository -To reference a private GitHub repository the syntax is identical to -above and supports the same branch and file definitions the only extra -item to add is an identifier which defines which credential key to -use (see [`paket config`](paket-config.html)). +To reference a private GitHub repository the syntax is identical to above and +supports the same branch and file definitions the only extra item to add is an +identifier which defines which credential key to use (see [`paket +config`](paket-config.html)). - [lang=paket] - github fsharp/private src/myprivate/file.fs githubAuthKey +```paket +github fsharp/private src/myprivate/file.fs githubAuthKey +``` -## Using a GitHub auth key from environment variable +## Using a GitHub authentication key from environment variable -Paket will use a GitHub token from a enviroment variable `PAKET_GITHUB_API_TOKEN`. -This will allow you to access private repos and to work around the GitHub API limit on public repos. +Paket will use a GitHub token from a enviroment variable +`PAKET_GITHUB_API_TOKEN`. This will allow you to access private repos and to +work around the GitHub API limit on public repositories. ## Gist -Gist works the same way. You can fetch single files or multi-file-gists as well: +Gist works the same way. You can fetch single files or multi-file Gists as well: - [lang=paket] - gist Thorium/1972308 gistfile1.fs - gist Thorium/6088882 +```paket +gist Thorium/1972308 gistfile1.fs +gist Thorium/6088882 +``` -If you run the [`paket update` command](paket-update.html), it will add a new section to your [`paket.lock` file](lock-file.html): +If you run the [`paket update` command](paket-update.html), it will add a new +section to your [`paket.lock` file](lock-file.html): - [lang=paket] - GIST - remote: Thorium/1972308 - gistfile1.fs - remote: Thorium/6088882 - FULLPROJECT +```paket +GIST + remote: Thorium/1972308 + gistfile1.fs + remote: Thorium/6088882 + FULLPROJECT +``` From e79ddfdc43335d2aa9ae8f92714bdf487d8b6221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Thu, 15 Jun 2017 15:19:44 +0200 Subject: [PATCH 15/88] find-packages --- src/Paket/Commands.fs | 24 +++++++++++++++++------- src/Paket/Program.fs | 18 +++++++++--------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 3e153eefa8..fbecc48f7f 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -245,16 +245,26 @@ with | Touch_Affected_Refs -> "Touches project files referencing packages which are affected, to help incremental build tools detecting the change." type FindPackagesArgs = - | [] SearchText of text:string - | [] Source of source_feed:string - | [] MaxResults of int + | [] Search of package_id:string + | [] Search_Legacy of package_id:string + + | Source of source_feed:string + | [] Source_Legacy of text:string + + | Max of int + | [] Max_Legacy of int with interface IArgParserTemplate with member this.Usage = match this with - | SearchText _ -> "Search text of a Package." - | Source _ -> "Allows to specify the package source feed." - | MaxResults _ -> "Maximum number of results." + | Search(_) -> "search for NuGet package ID" + | Search_Legacy(_) -> "[obsolete]" + + | Source(_) -> "specifiy source feed" + | Source_Legacy(_) -> "[obsolete]" + + | Max(_) -> "limit maximum number of results" + | Max_Legacy(_) -> "[obsolete]" type FixNuspecArgs = | [][] File of text:string @@ -449,7 +459,7 @@ with | Restore _ -> "download the computed dependency graph" | Simplify _ -> "simplify declared dependencies by removing transitive dependencies" | Update _ -> "update dependencies to their latest version" - | FindPackages _ -> "search for dependencies" + | FindPackages _ -> "search for NuGet packages" | FindPackageVersions _ -> "search for dependency versions" | FixNuspec _ -> "obsolete, see fix-nuspecs" | FixNuspecs _ -> "patch a list of .nuspec files to correct transitive dependencies" diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs index e165f6773c..481f58ba64 100644 --- a/src/Paket/Program.fs +++ b/src/Paket/Program.fs @@ -335,17 +335,17 @@ let pack (results : ParseResults<_>) = ?projectUrl = results.TryGetResult <@ PackArgs.ProjectUrl @>) let findPackages silent (results : ParseResults<_>) = - let maxResults = defaultArg (results.TryGetResult <@ FindPackagesArgs.MaxResults @>) 10000 + let maxResults = defaultArg ((results.TryGetResult <@ FindPackagesArgs.Max @>, results.TryGetResult <@ FindPackagesArgs.Max_Legacy @>) |> legacyOption results "--max" "max") 10000 let sources = let dependencies = Dependencies.TryLocate() - match results.TryGetResult <@ FindPackagesArgs.Source @>, dependencies with + match (results.TryGetResult <@ FindPackagesArgs.Source @>, results.TryGetResult <@ FindPackagesArgs.Source_Legacy @>) |> legacyOption results "--source" "source" , dependencies with | Some source, _ -> [PackageSource.NuGetV2Source source] | _, Some dependencies -> dependencies.GetSources() |> Seq.map (fun kv -> kv.Value) |> List.concat | _ -> - failwithf "Could not find '%s' at or above current directory, and no explicit source was given as parameter (e.g. 'paket.exe find-packages source https://www.nuget.org/api/v2')." + failwithf "Could not find '%s' at or above current directory, and no explicit source was given as parameter (e.g. 'paket.exe find-packages --source https://www.nuget.org/api/v2')." Constants.DependenciesFileName let searchAndPrint searchText = @@ -419,18 +419,18 @@ let findPackageVersions (results : ParseResults<_>) = | None -> results.GetResult <@ FindPackageVersionsArgs.Name @> let sources = match results.TryGetResult <@ FindPackageVersionsArgs.Source @>, dependencies with - | Some source, _ -> + | Some source, _ -> [PackageSource.NuGetV2Source source] - | _, Some dependencies -> + | _, Some dependencies -> dependencies.GetSources() |> Seq.map (fun kv -> kv.Value) |> List.concat - | _ -> + | _ -> failwithf "Could not find '%s' at or above current directory, and no explicit source was given as parameter (e.g. 'paket.exe find-package-versions source https://www.nuget.org/api/v2')." Constants.DependenciesFileName - let root = + let root = match dependencies with - | Some d -> + | Some d -> d.RootPath - | None -> + | None -> traceWarnfn "Could not find '%s' at or above current directory. Using current directory as project root." Constants.DependenciesFileName Directory.GetCurrentDirectory() From 0dd7064b3e94d7c5537bb9e0739f512bbeacf469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Sun, 18 Jun 2017 16:08:05 +0200 Subject: [PATCH 16/88] config --- docs/content/commands/config.md | 8 ++++---- src/Paket/Commands.fs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/content/commands/config.md b/docs/content/commands/config.md index cf7be1432b..dded3a9815 100644 --- a/docs/content/commands/config.md +++ b/docs/content/commands/config.md @@ -3,7 +3,7 @@ ### URL credentials ```sh -paket config --add-credentials SOURCE-URL +paket config add-credentials SOURCE-URL ``` Paket will then ask you for the username and password that will be used for the @@ -16,7 +16,7 @@ unless they carry a username and password. ### GitHub credentials ```sh -paket config --add-credentials CREDENTIAL-KEY +paket config add-credentials CREDENTIAL-KEY ``` Paket will then ask you for the username and password that will be used for the @@ -27,7 +27,7 @@ the [`paket.dependencies` file](github-dependencies.html) that carry the specified `CREDENTIAL-KEY`. ```sh -paket config --add-token CREDENTIAL-KEY TOKEN +paket config add-token CREDENTIAL-KEY TOKEN ``` The `TOKEN` you enter here will then be used to access any GitHub files from the @@ -47,5 +47,5 @@ let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") ### Adding a NuGet API key ```sh -paket config --add-token 'https://www.nuget.org' '4003d786-cc37-4004-bfdf-c4f3deadbeef' +paket config add-token 'https://www.nuget.org' '4003d786-cc37-4004-bfdf-c4f3deadbeef' ``` diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index fbecc48f7f..3fbd7b8dc4 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -67,10 +67,10 @@ with interface IArgParserTemplate with member this.Usage = match this with - | AddCredentials(_) -> "Add credentials for the specified NuGet feed." - | AddToken(_) -> "Add token for the specified source." - | Username(_) -> "Provide a username (for scripting)" - | Password(_) -> "provide a password on the commandline (for scripting)" + | AddCredentials(_) -> "add credentials for URL or credential key" + | AddToken(_) -> "add token for URL or credential key" + | Username(_) -> "provide username" + | Password(_) -> "provide password" type ConvertFromNugetArgs = | [] Force From 57fcc8f23376ceec5c2895b8a95a55ba5289f4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Sun, 18 Jun 2017 17:16:26 +0200 Subject: [PATCH 17/88] convert-from-nuget --- docs/content/convert-from-nuget-tutorial.md | 164 +++++++++++--------- src/Paket/Commands.fs | 22 +-- src/Paket/Program.fs | 2 +- 3 files changed, 108 insertions(+), 80 deletions(-) diff --git a/docs/content/convert-from-nuget-tutorial.md b/docs/content/convert-from-nuget-tutorial.md index 214a584239..1a2ec3d8bc 100644 --- a/docs/content/convert-from-nuget-tutorial.md +++ b/docs/content/convert-from-nuget-tutorial.md @@ -2,96 +2,120 @@ ## Automatic NuGet conversion -Paket comes with a command that helps to convert existing solution from NuGet's `packages.config` format to Paket's format. -If you want to use the command then: +Paket comes with a command that helps to convert existing solution from NuGet's +`packages.config` format to Paket's format. If you want to use the command then: - * Please start by making a **back-up of your repository** - * Download Paket and it's bootstrapper as described in the ["Getting started" tutorial](getting-started.html#Downloading-Paket-and-it-s-BootStrapper) - * Run the `convert-from-nuget` command: +* Please start by making a **back-up of your repository** +* Download Paket and it's bootstrapper as described in the ["Getting started" tutorial](getting-started.html#Downloading-Paket-and-it-s-BootStrapper) +* Run the `convert-from-nuget` command: +```sh +$ .paket/paket.exe convert-from-nuget +``` - [lang=batchfile] - $ .paket/paket.exe convert-from-nuget - -You can read more about the details and specific parameters for `convert-from-nuget` in the [docs](paket-convert-from-nuget.html). +You can read more about the details and specific parameters for +`convert-from-nuget` in the [docs](paket-convert-from-nuget.html). ### Preparation -Choose a folder to run the conversion from that is parent to **all** the projects to be converted. - -When using NuGet package restore, the ``packages`` folder is alongside the solution. It is possible with a solution that the folder parent to ``packages`` is **not** also parent to all the projects in the solution. - -A solution is in effect acting as a symlink but this indirection via the solution is not possible with Paket because Paket manages projects and not solutions. In the example below, it would not be possible to run the ``paket convert-from-nuget`` command from the ``Build`` folder but it would be from the root folder. - -
-+---Build
-|   |   Numbers.sln
-|   |   
-|   +---.nuget
-|   |   NuGet.Config
-|   |   NuGet.exe
-|   |   NuGet.targets
-|   |   
-|   +---packages
-|   
-+---Encoding
-|   |   Encoding.fsproj
-|   |   packages.config
-
+Choose a folder to run the conversion from that is parent to **all** the +projects to be converted. + +When NuGet package restore is enabled, the `packages` folder is next to the +solution. It is possible with a solution that the folder parent to `packages` is +**not** also parent to all the projects in the solution. + +A solution is in effect acting as a symlink but this indirection via the +solution is not possible with Paket because Paket manages projects and not +solutions. In the example below, it would not be possible to run the `paket +convert-from-nuget` command from the `Build` folder but it would be from the +root folder. + +```text +. +├── Build +│ ├── Numbers.sln +│ ├── .nuget +│ │ ├── NuGet.Config +│ │ ├── NuGet.exe +│ │ └── NuGet.targets +│ └── packages +└── Encoding + ├── Encoding.fsproj + └── packages.config +``` After running the conversion from the root folder: -
-+---.paket
-|   |   paket.bootstrapper.exe
-|   |   paket.exe
-|   |   paket.targets
-|
-+---packages
-|
-+---Build
-|   |   Numbers.sln
-|   
-+---Encoding
-|   |   Encoding.fsproj
-|   |   paket.references
-
- +```text +. +├── .paket +│ ├── paket.bootstrapper.exe +│ ├── paket.exe +│ └── paket.targets +├── packages +├── Build +│ └── Numbers.sln +└── Encoding + ├── Encoding.fsproj + └── paket.references +``` ### Command steps The `paket convert-from-nuget` command: -1. Finds all `packages.config` files, generates a paket.dependencies file in the solution root and replaces each `packages.config` with an equivalent paket.references file. -2. If there is a solution-level `packages.config`, then it will be removed and its dependencies will be included into the paket.dependencies file. -3. If you use NuGet Package Restore ([MSBuild-Integrated or Automatic Visual Studio Package Restore](http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore)), then the [`paket auto-restore`](paket-auto-restore.html) command will be invoked. -4. Next (unless `--no-install` is specified), the [`paket install`](paket-install.html) process will be executed. This will: - - - analyze the dependencies. - - generate a paket.lock file. - - remove all the old package references from your project files and install new references in Paket's syntax. +1. Finds all `packages.config` files, generates a paket.dependencies file in the + solution root and replaces each `packages.config` with an equivalent + [`paket.references` file](references-files.html). +1. If there is a solution-level `packages.config`, then it will be removed and + its dependencies will be included in the [`paket.dependencies` file](dependencies-file.html). +1. If you use NuGet Package Restore + ([MSBuild-Integrated or Automatic Visual Studio Package Restore](http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore)), + then the [`paket auto-restore`](paket-auto-restore.html) command will be + invoked. +1. Unless `--no-install` is specified, the [`paket + install`](paket-install.html) process will be executed. This will + + * analyze the dependencies, + * generate a [`paket.lock` file](lock-files), + * remove all the old package references from your project files and install + new references in Paket's syntax. + +1. If you specify `--force`, the conversion will attempt to infer additional + dependencies from newly added / previously unprocessed `packages.config` + files and + + * add any newly discovered dependencies to the end of an existing + [`paket.dependencies` file](dependencies-file.html), + * transfer/append references from the `packages.config` files into + [`paket.references` files](references-files.html) alongside. -5. If you specify `--force`, the conversion will attempt to infer additional dependencies from newly added / previously unprocessed `packages.config` files and - - - add any newly discovered dependencies to the end of an existing `paket.dependencies` file. - - transfer/append references from the `packages.config` files into `paket.references` files alongside. - ### Migrating NuGet source credentials -If you are using authorized NuGet feeds, convert-from-nuget command will automatically migrate the credentials for you. -Following are valid modes for the `--creds-migration` option: - -1. `encrypt` - Encrypt your credentials and save them in the [Paket configuration file](paket-config-file.html). -2. `plaintext` - Include your credentials in plaintext in the paket.dependencies file. See [example](nuget-dependencies.html#plaintext-credentials). -3. `selective` - Use this switch if you're using more than one authorized NuGet feed, and you want to apply different modes for each of them. +If you are using authorized NuGet feeds, `convert-from-nuget` will automatically +migrate the credentials for you. Following are valid modes for the +`--migrate-credentials` option: -## Simplify direct dependencies +1. `encrypt` - Encrypt your credentials and save them in the + [Paket configuration file](paket-config-file.html). +1. `plaintext` - Include your credentials in plaintext in the paket.dependencies + file. See [example](nuget-dependencies.html#plaintext-credentials). +1. `selective` - Use this option if you're using more than one authorized NuGet + feed and you want to apply different modes for each of them. -After converting your solution from NuGet, you may end up with many [transitive dependencies](faq.html#transitive)in your Paket files. -Consider using [`paket simplify`](paket-simplify.html) to remove unnecessary [transitive dependencies](faq.html#transitive) from your paket.dependencies and paket.references files. +## Simplify to direct dependencies +After converting your solution from NuGet, you may end up with many +[transitive dependencies](faq.html#transitive)in your Paket files. Consider +using [`paket simplify`](paket-simplify.html) to remove unnecessary +[transitive dependencies](faq.html#transitive) from your [`paket.dependencies`](dependencies-file.html) and +[`paket.references` files](reference-files.html). ## Partial NuGet conversion -The `convert-from-nuget` will not work if it discovers that the codebase already utilizes Paket (when [`paket.dependencies` file](dependencies-file.html) is found). -However, if for some reason you happen to have a mixture of projects already migrated to Paket and projects still using NuGet, you can pass the `--force` flag to `convert-from-nuget` for the remaining projects. +The `convert-from-nuget` will not work if it discovers that the codebase already +utilizes Paket (if [`paket.dependencies` file](dependencies-file.html) is +found). However, if for some reason you happen to have a mixture of projects +already migrated to Paket and projects still using NuGet, you can pass the +`--force` flag to `convert-from-nuget` for the remaining projects. diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 3fbd7b8dc4..4c5d8fa2dd 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -36,13 +36,13 @@ with | NuGet(_) -> "NuGet package ID" | NuGet_Legacy(_) -> "[obsolete]" - | Group(_) -> "add the package to a group (default: Main group)" + | Group(_) -> "add the dependency to a group (default: Main group)" | Group_Legacy(_) -> "[obsolete]" - | Version(_) -> "package version constraint" + | Version(_) -> "dependency version constraint" | Version_Legacy(_) -> "[obsolete]" - | Project(_) -> "add the package to a single project only" + | Project(_) -> "add the dependency to a single project only" | Project_Legacy(_) -> "[obsolete]" | Create_New_Binding_Files -> "create binding redirect files if needed" @@ -52,7 +52,7 @@ with | Interactive -> "ask for every project whether to add the dependency" | Redirects -> "create binding redirects" | Clean_Redirects -> "remove binding redirects that were not created by Paket" - | No_Install -> "skip install process after resolving dependencies" + | No_Install -> "do not add dependencies to projects" | Keep_Major -> "only allow updates that preserve the major version" | Keep_Minor -> "only allow updates that preserve the minor version" | Keep_Patch -> "only allow updates that preserve the patch version" @@ -76,15 +76,19 @@ type ConvertFromNugetArgs = | [] Force | No_Install | No_Auto_Restore - | Creds_Migration of mode:string + + | Migrate_Credentials of mode:string + | [] Migrate_Credentials_Legacy of mode:string with interface IArgParserTemplate with member this.Usage = match this with - | Force -> "Forces the conversion, even if paket.dependencies or paket.references files are present." - | No_Install -> "Skips paket install process (patching of csproj, fsproj, ... files) after the generation of paket.lock file." - | No_Auto_Restore -> "Skips paket auto-restore process afterward generation of dependencies / references files." - | Creds_Migration(_) -> "Specify a mode for migrating NuGet source credentials. Possible values are [`encrypt`|`plaintext`|`selective`]. The default mode is `encrypt`." + | Force -> "force the conversion even if paket.dependencies or paket.references files are present" + | No_Install -> "do not add dependencies to projects" + | No_Auto_Restore -> "do not enable Paket's auto-restore" + + | Migrate_Credentials(_) -> "specify mode for NuGet source credential migration: encrypt|plaintext|selective (default: encrypt)" + | Migrate_Credentials_Legacy(_) -> "[obsolete]" type FindRefsArgs = | [] Group of name:string diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs index 481f58ba64..1d10e83a1d 100644 --- a/src/Paket/Program.fs +++ b/src/Paket/Program.fs @@ -198,7 +198,7 @@ let convert (fromBootstrapper:bool) (results : ParseResults<_>) = let force = results.Contains <@ ConvertFromNugetArgs.Force @> let noInstall = results.Contains <@ ConvertFromNugetArgs.No_Install @> let noAutoRestore = results.Contains <@ ConvertFromNugetArgs.No_Auto_Restore @> - let credsMigrationMode = results.TryGetResult <@ ConvertFromNugetArgs.Creds_Migration @> + let credsMigrationMode = (results.TryGetResult <@ ConvertFromNugetArgs.Migrate_Credentials @>, results.TryGetResult <@ ConvertFromNugetArgs.Migrate_Credentials @>) |> legacyOption results "--migrate-credentials" "--creds-migration" Dependencies.ConvertFromNuget(force, noInstall |> not, noAutoRestore |> not, credsMigrationMode, fromBootstrapper=fromBootstrapper) let findRefs (results : ParseResults<_>) = From a66641d61d6c6c5e286b1ffa71259cb96c516809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Gro=C3=9F?= Date: Sun, 18 Jun 2017 20:57:38 +0200 Subject: [PATCH 18/88] find-package-versions --- src/Paket/Commands.fs | 30 +++++++++++++++++++----------- src/Paket/Program.fs | 22 ++++++++++++++++------ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 4c5d8fa2dd..3b644c6fe7 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -253,7 +253,7 @@ type FindPackagesArgs = | [] Search_Legacy of package_id:string | Source of source_feed:string - | [] Source_Legacy of text:string + | [] Source_Legacy of source_feed:string | Max of int | [] Max_Legacy of int @@ -264,7 +264,7 @@ with | Search(_) -> "search for NuGet package ID" | Search_Legacy(_) -> "[obsolete]" - | Source(_) -> "specifiy source feed" + | Source(_) -> "specify source feed" | Source_Legacy(_) -> "[obsolete]" | Max(_) -> "limit maximum number of results" @@ -320,18 +320,26 @@ with | PlaceHolder -> "Doesn't trace other output than installed packages." type FindPackageVersionsArgs = - | [