stack自体のupdateの作業ログ (2018年01月)

stack buildをすると、cabalのバージョン不整合のエラーがでました。

$ stack build
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing


$ cabal --version
cabal-install version
compiled using version of the Cabal library



$ stack --version
Version 1.1.2, Git revision cebe10e845fed4420b6224d97dcabf20477bbd4b (3646 commits) x86_64 hpack-0.14.0


Install/upgrade - The Haskell Tool Stack


$ curl -sSL | sh
Stack Version 1.1.2 already appears to be installed at:
Use 'stack upgrade' or your OS's package manager to upgrade,
or pass '-f' to this script to over-write the existing binary, e.g.:
  curl -sSL | sh -s - -f


$ stack upgrade
remote: Counting objects: 13480, done.
remote: Compressing objects: 100% (11071/11071), done.
remote: Total 13480 (delta 3490), reused 10929 (delta 2132), pack-reused 0
Receiving objects: 100% (13480/13480), 3.87 MiB | 655.00 KiB/s, done.
Resolving deltas: 100% (3490/3490), completed with 1189 local objects.
 + 89bc508...936cc04 hackage    -> origin/hackage  (forced update)
 - [tag update]      current-hackage -> current-hackage
Fetched package index.
Populated index cache.
stack-1.6.3: download
Downloaded lts-9.14 build plan.


Right Nothing
Did not find .cabal file for Agda-2.5.3 with Git SHA of 82d11286c281716649dc25e0820b3e25214af971
Right Nothing
WARNING: Ignoring unknown field "custom-setup" in package description
WARNING: Ignoring unknown field "custom-setup" in package description
No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of "stack"
No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of "stack"
Missing build-tools may be caused by dependencies of the build-tool being overridden by extra-deps.
This should be fixed soon - see this issue


Configuring stack-1.6.3...
stack-1.6.3: build
Preprocessing library stack-1.6.3...
[  1 of 126] Compiling System.Terminal  ( .stack-work/dist/x86_64-osx/Cabal-, .stack-work/dist/x86_64-osx/Cabal- )
[  2 of 126] Compiling Stack.Prelude    ( src/Stack/Prelude.hs, .stack-work/dist/x86_64-osx/Cabal- )
[  3 of 126] Compiling Stack.StaticBytes ( src/Stack/StaticBytes.hs, .stack-work/dist/x86_64-osx/Cabal- )


[1 of 2] Compiling Paths_stack      ( .stack-work/dist/x86_64-osx/Cabal-, .stack-work/dist/x86_64-osx/Cabal- )
[2 of 2] Compiling Main             ( src/main/Main.hs, .stack-work/dist/x86_64-osx/Cabal- )
Linking .stack-work/dist/x86_64-osx/Cabal- ...
stack-1.6.3: copy/register
Installing library in
Installing executable(s) in
Registering stack-1.6.3...
Completed 179 action(s).
Copying from /private/var/folders/hw/p4bp49hd7v9_1j60sjvmhqnr0000gn/T/stack-upgrade57634/stack-1.6.3/.stack-work/install/x86_64-osx/lts-9.14/8.0.2/bin/stack to /Users/foo/.local/bin/stack

Copied executables to /Users/foo/.local/bin:
- stack

WARNING: Installation path /Users/foo/.local/bin not found on the PATH environment variable


$ /Users/foo/.local/bin/stack  --version
Version 1.6.3 x86_64 hpack-0.20.0


$ ls -al /usr/local/bin | grep stack
lrwxr-xr-x    1 foo  admin        45 11 12  2016 resolve_stack_dump -> ../Cellar/mysql/5.7.16/bin/resolve_stack_dump
lrwxr-xr-x    1 root        admin        43 10 30  2016 stack -> /Library/Haskell/ghc-8.0.1-x86_64/bin/stack
$ ln -s /Users/ogawanaoto/.local/bin/stack /usr/local/bin/stack
ln: /usr/local/bin/stack: File exists
$ ln -sf /Users/ogawanaoto/.local/bin/stack /usr/local/bin/stack
$ stack --version
Version 1.6.3 x86_64 hpack-0.20.0