carymrobbins / intellij-haskforce

Haskell plugin for IntelliJ IDEA
http://carymrobbins.github.io/intellij-haskforce/
Apache License 2.0
486 stars 39 forks source link

stylish-haskell #299

Closed tolysz closed 8 years ago

tolysz commented 8 years ago

stylish-haskell no longer has --version

Haskell Tools
        Nonzero exit status (1) from command: /home/m/.local/bin/stylish-haskell --version
        Process stderr: Invalid option `--version'
        Usage: stylish-haskell [FILENAME]

however version can be recovered via --help

>~/.local/bin/stylish-haskell --help
stylish-haskell v0.5.17.0

Usage: stylish-haskell [FILENAME]

Available options:
  -h,--help                Show this help text
  -c,--config CONFIG       Configuration file
  -v,--verbose             Run in verbose mode
  -d,--defaults            Dump default config and exit
  -i,--inplace             Overwrite the given files in place
  --no-utf8                Don't force UTF-8 stdin/stdout
  FILENAME                 Input file(s)
yawaramin commented 8 years ago

It does as of https://github.com/jaspervdj/stylish-haskell/commit/9f04365e1412aaa0d835649e899aec4f01a497d8 ... which was part of the 0.6.0.0 release.

The current default implicit Stack resolver is lts-6.15 (from stack path), which contains stylish-haskell-0.5.17.0 only.

So, one option is to make the latest nightly resolver the default (e.g. nightly-2016-09-04) and then reinstall GHC and the packages.

tolysz commented 8 years ago

Just saying... it is still there and the change is minimal i.e. --version -> --help and read 1st line...

> stylish-haskell --help
stylish-haskell 0.6.1.0

Usage: stylish-haskell [FILENAME]

Available options:
  -h,--help                Show this help text
  --version                Show version information
  -c,--config CONFIG       Configuration file
  -v,--verbose             Run in verbose mode
  -d,--defaults            Dump default config and exit
  -i,--inplace             Overwrite the given files in place
  --no-utf8                Don't force UTF-8 stdin/stdout
  FILENAME                 Input file(s)
carymrobbins commented 8 years ago

Thanks @yawaramin for pointing out the solution here. If someone wants implement a fall back to parsing it from the --help text I'm fine with that. It would need to be done as part of HaskellToolsConfigurable, namely the Tool.updateVersion method.

tolysz commented 8 years ago

How about: https://github.com/carymrobbins/intellij-haskforce/pull/301

tolysz commented 8 years ago

Changes are merged