Closed julienXX closed 8 years ago
I am having a similar issue on 10.10.5:
$ brew info unused
joshuaclayton/formulae/unused: stable 0.6.0.1, HEAD
A command line tool to identify unused code.
https://github.com/joshuaclayton/unused
Not installed
From: https://github.com/joshuaclayton/homebrew-formulae/blob/master/Formula/unused.rb
==> Dependencies
Build: ghc ✔, cabal-install ✔, ag ✔
$ brew install unused
==> Auto-updated Homebrew!
Updated 2 taps (caskroom/cask, homebrew/core).
==> New Formulae
jxrlib
==> Installing unused from joshuaclayton/formulae
==> Downloading https://github.com/joshuaclayton/unused/archive/v0.6.0.1.tar.gz
Already downloaded: /Users/gerhard/Library/Caches/Homebrew/unused-0.6.0.1.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=8 --max-backjumps=100000 --only-dependencies
==> cabal install --jobs=8 --max-backjumps=100000 --prefix=/usr/local/Cellar/unused/0.6.0.1
Last 15 lines from /Users/gerhard/Library/Logs/Homebrew/unused/04.cabal:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
app/Main.hs:117:9: error:
• Variable not in scope:
(<>) :: Parser (Maybe String) -> Mod f0 a0 -> t
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
unused-0.6.0.1 failed during the building phase. The exception was:
ExitFailure 1
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/joshuaclayton/homebrew-formulae/issues
Looks like a workaround is to install unused
via Stack:
brew install haskell-stack
stack update
stack install unused
@julienXX @gerhard Interesting. Did you previously have Haskell installed? It seems to be that Data.Monoid.<>
isn't available (it was introduced in base-4.5.0
).
I'll do a bit of research in the meantime to see how best to handle this.
@joshuaclayton I had GHC and Stack previously installed yes.
@julienXX @gerhard can you report what ghc-pkg list base
returns for you?
@joshuaclayton
λ ghc-pkg list base
/usr/local/Cellar/ghc/8.0.1/lib/ghc-8.0.1/package.conf.d
base-4.9.0.0
@julienXX hmm, that makes it more interesting. I'm not sure Homebrew's using the same version when installing, and I'm not sure how best to check either.
I might have to do something along the lines of https://github.com/Rufflewind/wigner-symbols/blob/b389caaaf5f0aa0243d817d13fd1b87c17ad33be/src/Common.hs#L14-L20 to be safe. I'll ask at work about how best to handle this, I'm still relatively new to Haskell so there may be something else I'm missing here. I'd like to avoid recommending Stack installation if at all possible, based on the assumption that most developers won't have that environment set up.
@joshuaclayton I tried to remove GHC & Stack and brew install again but no luck.
@julienXX thanks for taking the time to do that work. I'm thinking optional imports might be the best bet; once I have something, I'll try to hash out a way you could test it (as I've not found a way to reproduce) and we can go from there. It'll probably take me a day or two to line everything up.
Thanks for your patience and help with this!
Sure! Feel free to ping me if you need additional testing.
@julienXX one last question - what does brew --version
give you back?
@joshuaclayton
λ brew --version
Homebrew 0.9.9 (git revision 48c4; last commit 2016-08-18)
Homebrew/homebrew-core (git revision d20c; last commit 2016-08-18)
@joshuaclayton I get the same error as @gerhard on install:
~ % brew install unused
==> Installing unused from joshuaclayton/formulae
==> Downloading https://github.com/joshuaclayton/unused/archive/v0.6.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/unused-0.6.0.1.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=8 --max-backjumps=100000 --only-dependencies
==> cabal install --jobs=8 --max-backjumps=100000 --prefix=/usr/local/Cellar/unused/0.6.0.1
Last 15 lines from /Users/davemoore/Library/Logs/Homebrew/unused/04.cabal:
Not in scope: ‘<>’
Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
app/Main.hs:117:9:
Not in scope: ‘<>’
Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
cabal: Error: some packages failed to install:
unused-0.6.0.1 failed during the building phase. The exception was:
ExitFailure 1
Output from ghc-pkg list base
:
~ % ghc-pkg list base
WARNING: cache is out of date: /usr/local/Cellar/ghc/7.10.3b/lib/ghc-7.10.3/package.conf.d/package.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
/usr/local/Cellar/ghc/7.10.3b/lib/ghc-7.10.3/package.conf.d
base-4.8.2.0
~ % ghc-pkg recache
~ % ghc-pkg list base
/usr/local/Cellar/ghc/7.10.3b/lib/ghc-7.10.3/package.conf.d
base-4.8.2.0
On OSX 10.11.3
Thank you for all your work on Unused! Let me know if I can provide any additional info to help out.
$ ghc-pkg list base
/usr/local/Cellar/ghc/8.0.1/lib/ghc-8.0.1/package.conf.d
base-4.9.0.0
$ brew --version
Homebrew 0.9.9 (git revision 5c7c9; last commit 2016-08-18)
Homebrew/homebrew-core (git revision 1479; last commit 2016-08-18)
Is there a reason for ctags-5.8_1? universal-ctags works better for me. Happy to open a new issue if it's a distraction.
Same problems here.
macOS 10.11.6
~ > brew install unused
==> Installing unused from joshuaclayton/formulae
==> Downloading https://github.com/joshuaclayton/unused/archive/v0.6.0.1.tar.gz
Already downloaded: /Users/kevin/Library/Caches/Homebrew/unused-0.6.0.1.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=8 --max-backjumps=100000 --only-dependencies
==> cabal install --jobs=8 --max-backjumps=100000 --prefix=/usr/local/Cellar/unused/0.6.0.1
Last 15 lines from /Users/kevin/Library/Logs/Homebrew/unused/04.cabal:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
app/Main.hs:117:9: error:
• Variable not in scope:
(<>) :: Parser (Maybe String) -> Mod f0 a0 -> t
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘<*>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative)
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
unused-0.6.0.1 failed during the building phase. The exception was:
ExitFailure 1
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/joshuaclayton/homebrew-formulae/issues
~ > ️ghc-pkg list base
/usr/local/Cellar/ghc/8.0.1/lib/ghc-8.0.1/package.conf.d
base-4.9.0.0
~ > ️brew --version
Homebrew 0.9.9 (git revision a5dac5; last commit 2016-08-18)
Homebrew/homebrew-core (git revision 1611b; last commit 2016-08-18)
All,
Thanks for the feedback here. I was able to verify failure when installing via Homebrew, and I've also verified a fix that worked for me.
To test:
brew update
brew install joshuaclayton/formulae/unused --HEAD
This will install via head
, which is currently pointing to #69. I've confirmed locally that this builds correctly. I'd love for you all to try this and let me know if it addresses the issue.
@joshuaclayton it's worked for me, thanks!
@joshuaclayton works for me :)
@joshuaclayton worked for me, thanks for the quick turnaround.
@joshuaclayton worked for me as well!
All, I've released version 0.6.1.0 and updated the Homebrew formulae.
To install a fresh copy, run:
brew update
brew install unused
To upgrade:
brew update
brew upgrade unused
Please let me know if you run into any issues installing, and happy ✂️ !
Hello, I have trouble installing unused on OSX 10.11.6 via Homebrew, installing via Stack is working.
Here's what I get: