begriffs / haskell-vim-now

One-line Haskell Vim install
MIT License
988 stars 100 forks source link

Installing with homebrew happen Error #206

Closed jiakai0419 closed 8 years ago

jiakai0419 commented 8 years ago

BRIEF

Error: Invalid usage: This command requires a formula argument

LOG

➜  ~ bash /tmp/haskell-vim-now.sh
ENV: [HVN_INSTALL_BASIC=]
--> Existing Haskell-Vim-Now installation detected at /Users/jiakai/.config/haskell-vim-now.
--- Syncing Haskell-Vim-Now with upstream...
Current branch master is up to date.
--- Installing system packages [] using [BREW]...
--- Installing with homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
mvtools                                                      tin                                                          wxmac
==> Renamed Formulae
stash-cli -> atlassian-cli

brew install [--debug] [--env=std|super] [--ignore-dependencies] [--only-dependencies] [--cc=compiler] [--build-from-source] [--devel|--HEAD] [--keep-tmp] formula:
    Install formula.

    formula is usually the name of the formula to install, but it can be specified
    in several different ways. See [SPECIFYING FORMULAE][].

    If --debug is passed and brewing fails, open an interactive debugging
    session with access to IRB or a shell inside the temporary build directory.

    If --env=std is passed, use the standard build environment instead of superenv.

    If --env=super is passed, use superenv even if the formula specifies the
    standard build environment.

    If --ignore-dependencies is passed, skip installing any dependencies of
    any kind. If they are not already present, the formula will probably fail
    to install.

    If --only-dependencies is passed, install the dependencies with specified
    options but do not install the specified formula.

    If --cc=compiler is passed, attempt to compile using compiler.
    compiler should be the name of the compiler's executable, for instance
    gcc-4.2 for Apple's GCC 4.2, or gcc-4.9 for a Homebrew-provided GCC
    4.9.

    If --build-from-source or -s is passed, compile the specified formula from
    source even if a bottle is provided. Dependencies will still be installed
    from bottles if they are available.

    If HOMEBREW_BUILD_FROM_SOURCE is set, regardless of whether --build-from-source was
    passed, then both formula and the dependencies installed as part of this process
    are built from source even if bottles are available.

    If --devel is passed, and formula defines it, install the development version.

    If --HEAD is passed, and formula defines it, install the HEAD version,
    aka master, trunk, unstable.

    If --keep-tmp is passed, the temporary files created during installation
    are not deleted.

    To install a newer version of HEAD use
    brew rm foo && brew install --HEAD foo.

brew install --interactive [--git] formula:
    Download and patch formula, then open a shell. This allows the user to
    run ./configure --help and otherwise determine how to turn the software
    package into a Homebrew formula.

    If --git is passed, Homebrew will create a Git repository, useful for
    creating patches to the software.

Error: Invalid usage: This command requires a formula argument
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Testing for broken Ruby interface in vim...
--- Test passed. Ruby interface is OK.
--- Backing up current vim config using timestamp 20161024_173347...
    /Users/jiakai/.config/haskell-vim-now/backup/.vim.20161024_173347
    /Users/jiakai/.config/haskell-vim-now/backup/.vimrc.20161024_173347
--- Creating vim config symlinks
    ~/.vimrc -> /Users/jiakai/.config/haskell-vim-now/.vimrc
    ~/.vim   -> /Users/jiakai/.config/haskell-vim-now/.vim
--- Installing plugins using vim-plug...
--- Setting up GHC if needed...
    Stack bin path: /Users/jiakai/.local/bin
    Stack global path: /Users/jiakai/.stack
    Stack global config location: /Users/jiakai/.stack/global-project/stack.yaml
    Stack resolver: nightly-2016-08-13
    /Users/jiakai/.config/haskell-vim-now/.stack-bin -> /Users/jiakai/.local/bin
--- Installing helper binaries...
--- Installing git-hscope...
--- Building Hoogle database...
0 warnings, saved to .warnings
Data generation complete
--- Configuring codex to search in stack...

--- <---- HASKELL VIM NOW installation successfully finished ---->

--> If you are using NeoVim
    Run /Users/jiakai/.config/haskell-vim-now/scripts/neovim.sh to backup your existing
    configuration and symlink the new one.
--> Note for a good-looking vim experience:
    Configure your terminal to use a font with Powerline symbols.
    https://powerline.readthedocs.org/en/master/installation.html#fonts-installation

ENV

➜  ~ brew --version
Homebrew 1.0.8
Homebrew/homebrew-core (git revision 245e; last commit 2016-10-24)
➜  ~ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  1 2016 19:37:21)
Included patches: 1-898
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_netterm   +syntax
-arabic          +file_in_path    -mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           -mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
+builtin_terms   -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    -keymap          +postscript      +virtualedit
+comments        -langmap         +printer         +visual
-conceal         +libcall         -profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             -rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
-emacs_tags      -mouseshape      -sniff           -xsmp
+eval            -mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv

macOS Sierra 10.12

begriffs commented 8 years ago

Thanks for reporting this. I've added a note for myself to look into it tomorrow night.

begriffs commented 8 years ago

OK here's what I think is going on: you already have git, vim, make, ctags, and par installed on your system. Hence the package_list function returns no results and we end up calling brew install with no program arguments. Can you verify whether your system has those utilities installed?

jiakai0419 commented 8 years ago

those utilities all installed.

➜  ~ which git vim make ctags par
/usr/local/git/bin/git
/usr/bin/vim
/usr/bin/make
/usr/local/bin/ctags
/usr/local/bin/par

this error make ,y Yank to OS clipboard ,p Paste from OS clipboard in Misc not work but , Clear search highlights in Misc is work

this error also make unicode symbols highlight DSLs not work

i think there exist some other thing is also not work, but i haven't found them.

begriffs commented 8 years ago

I think I have a PR that fixes your original problem. Please report other problems as separate issues, one problem per github issue.

Thanks for your help debugging this!