joshuaclayton / unused

Deprecated; see https://github.com/unused-code/unused
https://unused.codes
MIT License
856 stars 24 forks source link

Can't install on OSX 10.11.6 via homebrew #64

Closed julienXX closed 8 years ago

julienXX commented 8 years ago

Hello, I have trouble installing unused on OSX 10.11.6 via Homebrew, installing via Stack is working.

Here's what I get:

2016-08-16 10:25:49 +0200

cabal
install
--jobs=4
--max-backjumps=100000
--prefix=/usr/local/Cellar/unused/0.6.0.1

clang: warning: -Wl,-headerpad_max_install_names: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
clang: warning: argument unused during compilation: '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries'
Resolving dependencies...
Notice: installing into a sandbox located at
/private/tmp/unused-20160816-11091-79s5cn/unused-0.6.0.1/.cabal-sandbox
Configuring unused-0.6.0.1...
Building unused-0.6.0.1...
Failed to install unused-0.6.0.1
Build log ( /private/tmp/unused-20160816-11091-79s5cn/unused-0.6.0.1/.cabal-sandbox/logs/unused-0.6.0.1.log ):
cabal: Entering directory '.'
Configuring unused-0.6.0.1...
clang: warning: -Wl,-headerpad_max_install_names: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
clang: warning: argument unused during compilation: '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries'
Building unused-0.6.0.1...
Preprocessing library unused-0.6.0.1...
[ 1 of 45] Compiling Unused.CLI.ProgressIndicator.Types ( src/Unused/CLI/ProgressIndicator/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/ProgressIndicator/Types.o )
[ 2 of 45] Compiling Unused.CLI.Util  ( src/Unused/CLI/Util.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Util.o )
[ 3 of 45] Compiling Unused.CLI.Views.AnalysisHeader ( src/Unused/CLI/Views/AnalysisHeader.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/AnalysisHeader.o )
[ 4 of 45] Compiling Unused.CLI.Views.GitSHAsHeader ( src/Unused/CLI/Views/GitSHAsHeader.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/GitSHAsHeader.o )
[ 5 of 45] Compiling Unused.CLI.Views.NoResultsFound ( src/Unused/CLI/Views/NoResultsFound.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/NoResultsFound.o )
[ 6 of 45] Compiling Unused.CLI.Views.Error ( src/Unused/CLI/Views/Error.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/Error.o )
[ 7 of 45] Compiling Unused.CLI.ProgressIndicator.Internal ( src/Unused/CLI/ProgressIndicator/Internal.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/ProgressIndicator/Internal.o )
[ 8 of 45] Compiling Unused.CLI.ProgressIndicator ( src/Unused/CLI/ProgressIndicator.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/ProgressIndicator.o )
[ 9 of 45] Compiling Unused.Cache.FindArgsFromIgnoredPaths ( src/Unused/Cache/FindArgsFromIgnoredPaths.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Cache/FindArgsFromIgnoredPaths.o )
[10 of 45] Compiling Paths_unused     ( dist/dist-sandbox-3f92c8f5/build/autogen/Paths_unused.hs, dist/dist-sandbox-3f92c8f5/build/Paths_unused.o )
[11 of 45] Compiling Unused.Regex     ( src/Unused/Regex.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Regex.o )
[12 of 45] Compiling Unused.Util      ( src/Unused/Util.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Util.o )
[13 of 45] Compiling Unused.Projection.Transform ( src/Unused/Projection/Transform.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Projection/Transform.o )
[14 of 45] Compiling Unused.Projection ( src/Unused/Projection.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Projection.o )
[15 of 45] Compiling Unused.ResultsClassifier.Types ( src/Unused/ResultsClassifier/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/ResultsClassifier/Types.o )
[16 of 45] Compiling Unused.ResultsClassifier.Config ( src/Unused/ResultsClassifier/Config.hs, dist/dist-sandbox-3f92c8f5/build/Unused/ResultsClassifier/Config.o )
[17 of 45] Compiling Unused.ResultsClassifier ( src/Unused/ResultsClassifier.hs, dist/dist-sandbox-3f92c8f5/build/Unused/ResultsClassifier.o )
[18 of 45] Compiling Unused.CLI.Views.InvalidConfigError ( src/Unused/CLI/Views/InvalidConfigError.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/InvalidConfigError.o )
[19 of 45] Compiling Unused.Cache.DirectoryFingerprint ( src/Unused/Cache/DirectoryFingerprint.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Cache/DirectoryFingerprint.o )
[20 of 45] Compiling Unused.Cache     ( src/Unused/Cache.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Cache.o )
[21 of 45] Compiling Unused.CLI.Views.FingerprintError ( src/Unused/CLI/Views/FingerprintError.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/FingerprintError.o )
[22 of 45] Compiling Unused.TagsSource ( src/Unused/TagsSource.hs, dist/dist-sandbox-3f92c8f5/build/Unused/TagsSource.o )
[23 of 45] Compiling Unused.CLI.Views.MissingTagsFileError ( src/Unused/CLI/Views/MissingTagsFileError.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/MissingTagsFileError.o )
[24 of 45] Compiling Unused.Types     ( src/Unused/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Types.o )
[25 of 45] Compiling Unused.Aliases   ( src/Unused/Aliases.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Aliases.o )
[26 of 45] Compiling Unused.GitContext ( src/Unused/GitContext.hs, dist/dist-sandbox-3f92c8f5/build/Unused/GitContext.o )
[27 of 45] Compiling Unused.ResponseFilter ( src/Unused/ResponseFilter.hs, dist/dist-sandbox-3f92c8f5/build/Unused/ResponseFilter.o )
[28 of 45] Compiling Unused.LikelihoodCalculator ( src/Unused/LikelihoodCalculator.hs, dist/dist-sandbox-3f92c8f5/build/Unused/LikelihoodCalculator.o )
[29 of 45] Compiling Unused.Grouping.Types ( src/Unused/Grouping/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Grouping/Types.o )
[30 of 45] Compiling Unused.Grouping.Internal ( src/Unused/Grouping/Internal.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Grouping/Internal.o )
[31 of 45] Compiling Unused.Grouping  ( src/Unused/Grouping.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Grouping.o )
[32 of 45] Compiling Unused.CLI.Views.SearchResult.ColumnFormatter ( src/Unused/CLI/Views/SearchResult/ColumnFormatter.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult/ColumnFormatter.o )
[33 of 45] Compiling Unused.CLI.Views.SearchResult.Types ( src/Unused/CLI/Views/SearchResult/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult/Types.o )
[34 of 45] Compiling Unused.CLI.Views.SearchResult.Internal ( src/Unused/CLI/Views/SearchResult/Internal.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult/Internal.o )
[35 of 45] Compiling Unused.CLI.Views.SearchResult.ListResult ( src/Unused/CLI/Views/SearchResult/ListResult.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult/ListResult.o )
[36 of 45] Compiling Unused.CLI.Views.SearchResult.TableResult ( src/Unused/CLI/Views/SearchResult/TableResult.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult/TableResult.o )
[37 of 45] Compiling Unused.CLI.Views.SearchResult ( src/Unused/CLI/Views/SearchResult.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views/SearchResult.o )
[38 of 45] Compiling Unused.CLI.Views ( src/Unused/CLI/Views.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Views.o )
[39 of 45] Compiling Unused.CLI.GitContext ( src/Unused/CLI/GitContext.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/GitContext.o )
[40 of 45] Compiling Unused.TermSearch.Types ( src/Unused/TermSearch/Types.hs, dist/dist-sandbox-3f92c8f5/build/Unused/TermSearch/Types.o )
[41 of 45] Compiling Unused.TermSearch.Internal ( src/Unused/TermSearch/Internal.hs, dist/dist-sandbox-3f92c8f5/build/Unused/TermSearch/Internal.o )
[42 of 45] Compiling Unused.TermSearch ( src/Unused/TermSearch.hs, dist/dist-sandbox-3f92c8f5/build/Unused/TermSearch.o )
[43 of 45] Compiling Unused.Parser    ( src/Unused/Parser.hs, dist/dist-sandbox-3f92c8f5/build/Unused/Parser.o )
[44 of 45] Compiling Unused.CLI.Search ( src/Unused/CLI/Search.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI/Search.o )
[45 of 45] Compiling Unused.CLI       ( src/Unused/CLI.hs, dist/dist-sandbox-3f92c8f5/build/Unused/CLI.o )
Preprocessing executable 'unused' for unused-0.6.0.1...
[1 of 2] Compiling App              ( app/App.hs, dist/dist-sandbox-3f92c8f5/build/unused/unused-tmp/App.o )
[2 of 2] Compiling Main             ( app/Main.hs, dist/dist-sandbox-3f92c8f5/build/unused/unused-tmp/Main.o )

app/Main.hs:26:39: error:
    • Variable not in scope: (<>) :: ParserInfo a -> InfoMod a16 -> t7
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:26:53: error:
    • Variable not in scope: (<>) :: t7 -> InfoMod a17 -> ParserInfo a
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:45:9: error:
    • Variable not in scope:
        (<>) :: Parser SearchRunner -> Mod f14 a14 -> t6
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:46:9: error:
    • Variable not in scope:
        (<>) :: t6 -> Mod f15 a15 -> Parser SearchRunner
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:51:5: error:
    • Variable not in scope: (<>) :: Parser Bool -> Mod f12 a12 -> t5
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:52:5: error:
    • Variable not in scope: (<>) :: t5 -> Mod f13 a13 -> Parser Bool
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:66:5: error:
    • Variable not in scope: (<>) :: Parser String -> Mod f10 a10 -> t4
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:67:5: error:
    • Variable not in scope: (<>) :: t4 -> Mod f11 a11 -> Parser String
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:72:5: error:
    • Variable not in scope: (<>) :: Parser Bool -> Mod f8 a8 -> t3
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:73:5: error:
    • Variable not in scope: (<>) :: t3 -> Mod f9 a9 -> Parser Bool
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:78:5: error:
    • Variable not in scope: (<>) :: Parser [String] -> Mod f6 a6 -> t2
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:79:5: error:
    • Variable not in scope: (<>) :: t2 -> Mod f7 a7 -> Parser [String]
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:97:5: error:
    • Variable not in scope: (<>) :: Parser String -> Mod f4 a4 -> t1
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:98:5: error:
    • Variable not in scope: (<>) :: t1 -> Mod f5 a5 -> Parser String
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:103:5: error:
    • Variable not in scope: (<>) :: Parser Bool -> Mod f2 a2 -> t0
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:104:5: error:
    • Variable not in scope: (<>) :: t0 -> Mod f3 a3 -> Parser Bool
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Options.Applicative),
        ‘<*>’ (imported from Options.Applicative),
        ‘*>’ (imported from Options.Applicative)

app/Main.hs:109:5: error:
    • Variable not in scope:
        (<>) :: Parser Bool -> Mod f1 a1 -> Parser Bool
    • Perhaps you meant one of these:
        ‘<$>’ (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

HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: b630ab3d1717c1a436610a1542c71ebaadcf3bc0
Last commit: 25 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1e1be4517826366a608065d4823320aa8fa6d252
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
GCC-4.2: build 0
Clang: 7.3 build 703
Git: 2.8.2 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_77
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: N/A
X11: N/A

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/apache2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/Homebrew/os/mac/pkgconfig/10.11
HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /private/tmp/unused-20160816-11091-79s5cn/unused-0.6.0.1/.cabal-sandbox/bin:/usr/local/Library/Homebrew/shims/super:/usr/local/opt/ghc/bin:/usr/local/opt/cabal-install/bin:/usr/local/opt/the_silver_searcher/bin:/usr/bin:/bin:/usr/sbin:/sbin
gerhard commented 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
jamesottaway commented 8 years ago

Looks like a workaround is to install unused via Stack:

brew install haskell-stack
stack update
stack install unused
joshuaclayton commented 8 years ago

@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.

julienXX commented 8 years ago

@joshuaclayton I had GHC and Stack previously installed yes.

joshuaclayton commented 8 years ago

@julienXX @gerhard can you report what ghc-pkg list base returns for you?

julienXX commented 8 years ago

@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
joshuaclayton commented 8 years ago

@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.

julienXX commented 8 years ago

@joshuaclayton I tried to remove GHC & Stack and brew install again but no luck.

joshuaclayton commented 8 years ago

@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!

julienXX commented 8 years ago

Sure! Feel free to ping me if you need additional testing.

joshuaclayton commented 8 years ago

@julienXX one last question - what does brew --version give you back?

julienXX commented 8 years ago

@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)
dwmoore commented 8 years ago

@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.

gerhard commented 8 years ago
$ 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.

netikular commented 8 years ago

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)
joshuaclayton commented 8 years ago

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.

cframe-itison commented 8 years ago

@joshuaclayton it's worked for me, thanks!

julienXX commented 8 years ago

@joshuaclayton works for me :)

brendanwb commented 8 years ago

@joshuaclayton worked for me, thanks for the quick turnaround.

netikular commented 8 years ago

@joshuaclayton worked for me as well!

joshuaclayton commented 8 years ago

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 ✂️ !