Improve instrumentation, consistent logs.

This commit is contained in:
Jorge Bucaran 2016-02-25 21:50:21 +09:00
parent 7325acd166
commit 89e9d45e44
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30
7 changed files with 12 additions and 12 deletions

View file

@ -1,6 +1,6 @@
# Change Log
## [0.9.0][v090] - Not released yet
## [0.9.0][v090] - 2016-02-25
* Update plugins with merge conflicts by fetching HEAD and applying a hard reset as a last resort. This strategy is only executed on the `master` branch, other branches are not affected. If branch `my-feature` is checked out at the time of the update, Fisherman first saves the branch name, checks out master, updates and checks out `my-feature` again after the operation is complete. Close #122.
@ -10,7 +10,7 @@
* Make `__fisher_key_bindings_undo` smarter by supporting more complex `bind` expressions, such as those inside conditional statements. Close #121.
* The Quickstart Guide is now available in [Chinese](https://github.com/fisherman/fisherman/wiki/快速上手指南), [Russian](https://github.com/fisherman/fisherman/wiki/Краткое-Руководство) and [Korean](https://github.com/fisherman/fisherman/wiki/빠르게-살펴보기). Thanks to @pickfire, @denji, @dfdgsdfg. You folks are awesome!
* The Quickstart Guide is now available in [Chinese](https://github.com/fisherman/fisherman/wiki/快速上手指南), [Russian](https://github.com/fisherman/fisherman/wiki/Краткое-Руководство) and [Korean](https://github.com/fisherman/fisherman/wiki/빠르게-살펴보기). Thanks to @pickfire, @denji, @dfdgsdfg. You are awesome!
* Add more instrumentation and fix bugs caused by `debug` calls inside plumbing functions such as `__fisher_index_update` which are used by Spin.

View file

@ -8,7 +8,7 @@
<br>
<a href="http://fisherman.sh"><img
alt="Fisherman"
width=650px
width=700px
src="https://rawgit.com/fisherman/logo/master/fisherman-black-white.svg"></a>
<br>
<br>

View file

@ -1,6 +1,7 @@
function __fisher_deps_install -a path
for file in $path/{fishfile,bundle}
if test -s $file
debug "Install dependencies %s" "$file"
fisher_install < $file | sed -En 's/^.+([0-9]+) plugin\/s.*/\1/p'
end
end | awk '{ n = n + $0 } END { print n ? n : 0 }'

View file

@ -6,7 +6,7 @@ function __fisher_file_remove -a plugin file
set pattern "/^$pattern\$/d"
end
debug "Remove '%s' from fishfile '%s'" "$plugin" "$file"
debug "Fishfile remove %s" "$plugin"
sed -E "$pattern" < $file > $file.tmp

View file

@ -1,4 +1,6 @@
function __fisher_plugin_enable -a plugin path
debug "Plugin enable %s" "$plugin"
if __fisher_path_is_prompt $path
if test ! -z "$fisher_prompt"
@ -35,7 +37,7 @@ function __fisher_plugin_enable -a plugin path
__fisher_plugin_walk "$plugin" "$path" | while read -l class source target __unused
switch "$class"
case --bind
debug "Enable key bindings in '%s'" $source
debug "Enable key bindings %s" $source
__fisher_key_bindings_enable $plugin (__fisher_xdg --config
)/fish/functions/fish_user_key_bindings.fish < $source
@ -62,13 +64,12 @@ function __fisher_plugin_enable -a plugin path
if test -s $fisher_file
if __fisher_file_contains "$item" --quiet $fisher_file
debug "Skip '%s' already in fishfile" $item
debug "Fishfile skip %s" "$item"
return
end
end
debug "Adding '%s' to fishfile" $item
debug "Fishfile add %s" "$item"
printf "%s\n" $item >> $fisher_file
end

View file

@ -1,11 +1,11 @@
function __fisher_plugin_walk -a plugin path
debug "Walk tree in '%s'" "$path"
debug "Walk %s" "$path"
for file in $path/{*,{conf.d,modules}/*,functions/**}.{fish,load} $path/completions/*.fish
set -l name (basename $file .fish)
set -l base $name.fish
debug "File '%s'" $file
debug "File %s" $file
switch $file
case \*/{fish_user_,}key_bindings.fish

View file

@ -122,8 +122,6 @@ function fisher_install -d "Install Plugins"
end
end
debug "Resolve dependencies %s" "$path"
set -l deps (__fisher_deps_install "$path")
if test "$deps" -gt 0