LoginSignup
1
0

More than 3 years have passed since last update.

haskell-ide-engine

Last updated at Posted at 2020-05-26

毎回失敗するので備忘の為に書き残す

1)環境変数設定
以下コマンドと同等の設定を「システムの詳細設定」で保存しておく事

[共通]
set PATH=%PATH%;C:\Users\ueki5\AppData\Roaming\local\bin
set STACK_ROOT=c:\sr
※PATHはログインユーザに依存。STACK_ROOTは任意

[proxyあり]
set HTTP_PROXY=http://userid%40xxx.com:password@proxy.xxx.com:8080
set HTTPS_PROXY=http://userid%40xxx.com:password@proxy.xxx.com:8080
※URLエンコード @→%40

[proxyなし]
set HTTP_PROXY=
set HTTPS_PROXY=

2)gitのインストール
インストールディレクトリはデフォルトでよい
proxyは環境変数でも動作するが、以下の個別コマンドでも可(ただし、HTTP_PROXYが設定されていると、unsetしてもproxyサーバ経由で接続に行く)

proxy経由

git config --global http.proxy http://userid%40xxx.com:password@proxy.xxx.com:8080
git config --global https.proxy http://userid%40xxx.com:password@proxy.xxx.com:8080
git config --global url."https://".insteadOf git://

直接接続

unset HTTP_PROXY
unset HTTPS_PROXY
git config --global --unset http.proxy
git config --global --unset https.proxy

2-1)PATHへ設定
set PATH=%PATH%;"C:\Program Files\Git\cmd"

3)VSCodeのインストール
インストールディレクトリはデフォルトでよい

4)stackのインストール
Windowsの場合、公式HPよりインストーラをダウンロード
URL:
https://docs.haskellstack.org/en/stable/README/#how-to-install

4-1)resolverの変更
[ファイル]
C:\sr\global-project\stack.yaml
[追加]
resolver: lts-14.27 # ghc-8.6.5

4-2)longpathを有効にする(Windows10の場合)
・gpedit.msc
・Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem set Enable Win32 long pathsをenableに
・管理者でgit bash実行
git config --system core.longpaths true

5)hieのリポジトリクローン
git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules hie
cd hie
※Win10以外の場合も考慮し、pathは短くしています

6)hieのビルド(コマンドプロンプトから)
chcp 65001 # 文字コード回りのエラーを回避する invalid argument (invalid character)
stack ./install.hs hie-8.6.5 # ghc-8.6.5
stack ./install.hs data # hoogle docs

???)stack exec hie-wrapper -- --lsp --debug
試行錯誤。LSPのデバッグモード(?)起動

???)resolv

LTS Haskell 13.15 ((ghc8.6.4) → 2019/03/31リリース(?)
LTS Haskell 13.4 (ghc-8.6.3) → ビルドがハングアップする(×)
LTS Haskell 12.13 (ghc-8.4.3) → ビルドは成功する(◎)

[コマンドで指定する場合]
stack config set resolver lts-13.15
→以下のファイルに追加されるはず
C:\sr\global-project\stack.yaml

???)なんで?
$ stack ./install.hs hie-8.6.5
・・・中略・・・
: commitAndReleaseBuffer: invalid argument (invalid character)
Progress 4/159
$ stack ./install.hs hie-8.6.5
・・・中略・・・
: commitAndReleaseBuffer: invalid argument (invalid character)
Progress 4/158

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0