SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
.
       Cabal の話
.   – Cabal の依存関係解決 –


         日比野 啓


         2012-05-27



                      .   .   .   .   .   .
自己紹介



  twitter: @khibino
  仕事: Java とか Haskell で
  プログラム書いてます
  関数型言語とか
  プログラミング言語処理系とか好きです




                  .   .   .   .   .   .
Haskell のパッケージ

 Hackage
 - Haskell のパッケージを蓄積しているサイト
   http://hackage.haskell.org/
   packages/archive/pkg-list.html
       パッケージの一覧
   http://hackage.haskell.org/
   package/PACKAGE NAME
       個々のパッケージの情報




                                 .   .   .   .   .   .
Cabal - install



  % cabal install PACKAGE_NAME

      必要となるパッケージが
      全てインストールされる
      うまくいっているときは便利だが            ...




                         .   .    .    .   .   .
Cabal の問題点 - 依存解決 - 1

      B
            C >= 1
            … バージョンの制約付き依存関係
            D >= 1




                     .   .   .   .   .   .
Cabal の問題点 - 依存解決 - 2
      B
            C >= 1
            D >= 1
      A
            B >= 1
            C >= 1 ∧ C < 2




                      .   .   .   .   .   .
Cabal の問題点 - 依存解決 - 3
      B
            C >= 1
            D >= 1
      A
            B >= 1
            C >= 1 ∧ C < 2




                      .   .   .   .   .   .
Cabal の問題点 - 依存解決 - 4
      B
            C >= 1
            D >= 1
      A
            B >= 1
            C >= 1 ∧ C < 2




                      .   .   .   .   .   .
Cabal の問題点 - 依存解決 - 5



   必要なバックトラックの回数が多くなりす
   ぎる
      依存関係の段数
      パッケージのバージョンの数
   Cabal はデフォルトでは途中で試行をやめる




                      .   .   .   .   .   .
Cabal - 依存解決 - 物量で解決



      cabal のバックトラック回数を明示的に指定
      デフォルトは 200

 % c a b a l i n s t a l l [−−dry−r u n ] 
      −−max−backjumps =1000




                                    .   .     .   .   .   .
Cabal の問題点 - 壊れる依存関係 - 1

      B
           C >= 1 ∧ C < 2
           D >= 1




                     .   .   .   .   .   .
Cabal の問題点 - 壊れる依存関係 - 2
      B
           C >= 1 ∧ C < 2
           D >= 1
      A
           C >= 2




                     .   .   .   .   .   .
Cabal の問題点 - 壊れる依存関係 - 3


 cabal に同時に与えれば、
 両方を満たすように依存関係を解決してくれる
 % c a b a l i n s t a l l A−1 B−1 . . .
 過去にインストールしたもののうち壊れるものを
 全て与える必要があり大変




                                    .      .   .   .   .   .
Cabal - バージョンを指定する

 個別にバージョンを指定しつつ
 インストールすることもできる
 %   c a b a l unpack A−1.0
 %   cd A−1.0
 %   cabal configure
 %   cabal build
 %   c a b a l copy
 %   cabal r e g i s t e r
 依存関係を自前で解決しなくてはならなくて面倒


                              .   .   .   .   .   .
Debian sid - 1


     Debian のパッケージシステムが
     依存関係を壊さないように保ってくれる
     475 個の hackage (2012-05-27 現在) のライブ
     ラリが
     Debian package 化されている
         yesod や snap もあるよ
     haskell-platform が更新されない期間も、
     相当するパッケージが提供される



                             .   .   .   .   .   .
Debian sid - 2



     Haskell 以外の依存関係も管理されている
         Haskell 以外にも依存しているような
         複合的な依存関係でも大丈夫
     豊富なパッケージ
     (2012-05-27 現在、 37526 個)




                                .   .   .   .   .   .
まとめ



  cabal は便利
  でも複雑な依存関係を
  壊さないようにするのは大変
  Debian sid おすすめです




                      .   .   .   .   .   .
Q&A




 Q&A


       .   .   .   .   .   .

Contenu connexe

En vedette

Mengenal Hardware pada PC
Mengenal Hardware pada PCMengenal Hardware pada PC
Mengenal Hardware pada PCSofyan Purba
 
Kaedah Fonetik Bahasa Melayu
Kaedah Fonetik Bahasa Melayu Kaedah Fonetik Bahasa Melayu
Kaedah Fonetik Bahasa Melayu AzZurah Md Noor
 
Découvrir google maps api
Découvrir google maps apiDécouvrir google maps api
Découvrir google maps apiMouafa Ahmed
 
Sains jilid 3 bab 1 ( 28 10-14 )
Sains jilid 3 bab 1 ( 28 10-14 )Sains jilid 3 bab 1 ( 28 10-14 )
Sains jilid 3 bab 1 ( 28 10-14 )Sofyan Purba
 
Google day ISI - android IOIO
Google day ISI - android IOIOGoogle day ISI - android IOIO
Google day ISI - android IOIOMouafa Ahmed
 
Internationalisation (Case: Cummins)
Internationalisation (Case: Cummins)Internationalisation (Case: Cummins)
Internationalisation (Case: Cummins)Vishal Gholap
 
Case: Carrefour In Japan
Case: Carrefour In JapanCase: Carrefour In Japan
Case: Carrefour In JapanVishal Gholap
 
Examining trends in Internationalisation of small firms
Examining trends in Internationalisation of small firmsExamining trends in Internationalisation of small firms
Examining trends in Internationalisation of small firmsVishal Gholap
 
Branding Starbucks in India
Branding Starbucks in IndiaBranding Starbucks in India
Branding Starbucks in IndiaVishal Gholap
 
Entering a European Market
Entering a European MarketEntering a European Market
Entering a European MarketVishal Gholap
 

En vedette (12)

Html5 101
Html5 101Html5 101
Html5 101
 
Mengenal Hardware pada PC
Mengenal Hardware pada PCMengenal Hardware pada PC
Mengenal Hardware pada PC
 
Kaedah Fonetik Bahasa Melayu
Kaedah Fonetik Bahasa Melayu Kaedah Fonetik Bahasa Melayu
Kaedah Fonetik Bahasa Melayu
 
Découvrir google maps api
Découvrir google maps apiDécouvrir google maps api
Découvrir google maps api
 
Sains jilid 3 bab 1 ( 28 10-14 )
Sains jilid 3 bab 1 ( 28 10-14 )Sains jilid 3 bab 1 ( 28 10-14 )
Sains jilid 3 bab 1 ( 28 10-14 )
 
Google day ISI - android IOIO
Google day ISI - android IOIOGoogle day ISI - android IOIO
Google day ISI - android IOIO
 
Internationalisation (Case: Cummins)
Internationalisation (Case: Cummins)Internationalisation (Case: Cummins)
Internationalisation (Case: Cummins)
 
Risk Management
Risk ManagementRisk Management
Risk Management
 
Case: Carrefour In Japan
Case: Carrefour In JapanCase: Carrefour In Japan
Case: Carrefour In Japan
 
Examining trends in Internationalisation of small firms
Examining trends in Internationalisation of small firmsExamining trends in Internationalisation of small firms
Examining trends in Internationalisation of small firms
 
Branding Starbucks in India
Branding Starbucks in IndiaBranding Starbucks in India
Branding Starbucks in India
 
Entering a European Market
Entering a European MarketEntering a European Market
Entering a European Market
 

Dernier

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 

Dernier (10)

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 

Cabal debian

  • 1. . Cabal の話 . – Cabal の依存関係解決 – 日比野 啓 2012-05-27 . . . . . .
  • 2. 自己紹介 twitter: @khibino 仕事: Java とか Haskell で プログラム書いてます 関数型言語とか プログラミング言語処理系とか好きです . . . . . .
  • 3. Haskell のパッケージ Hackage - Haskell のパッケージを蓄積しているサイト http://hackage.haskell.org/ packages/archive/pkg-list.html パッケージの一覧 http://hackage.haskell.org/ package/PACKAGE NAME 個々のパッケージの情報 . . . . . .
  • 4. Cabal - install % cabal install PACKAGE_NAME 必要となるパッケージが 全てインストールされる うまくいっているときは便利だが ... . . . . . .
  • 5. Cabal の問題点 - 依存解決 - 1 B C >= 1 … バージョンの制約付き依存関係 D >= 1 . . . . . .
  • 6. Cabal の問題点 - 依存解決 - 2 B C >= 1 D >= 1 A B >= 1 C >= 1 ∧ C < 2 . . . . . .
  • 7. Cabal の問題点 - 依存解決 - 3 B C >= 1 D >= 1 A B >= 1 C >= 1 ∧ C < 2 . . . . . .
  • 8. Cabal の問題点 - 依存解決 - 4 B C >= 1 D >= 1 A B >= 1 C >= 1 ∧ C < 2 . . . . . .
  • 9. Cabal の問題点 - 依存解決 - 5 必要なバックトラックの回数が多くなりす ぎる 依存関係の段数 パッケージのバージョンの数 Cabal はデフォルトでは途中で試行をやめる . . . . . .
  • 10. Cabal - 依存解決 - 物量で解決 cabal のバックトラック回数を明示的に指定 デフォルトは 200 % c a b a l i n s t a l l [−−dry−r u n ] −−max−backjumps =1000 . . . . . .
  • 11. Cabal の問題点 - 壊れる依存関係 - 1 B C >= 1 ∧ C < 2 D >= 1 . . . . . .
  • 12. Cabal の問題点 - 壊れる依存関係 - 2 B C >= 1 ∧ C < 2 D >= 1 A C >= 2 . . . . . .
  • 13. Cabal の問題点 - 壊れる依存関係 - 3 cabal に同時に与えれば、 両方を満たすように依存関係を解決してくれる % c a b a l i n s t a l l A−1 B−1 . . . 過去にインストールしたもののうち壊れるものを 全て与える必要があり大変 . . . . . .
  • 14. Cabal - バージョンを指定する 個別にバージョンを指定しつつ インストールすることもできる % c a b a l unpack A−1.0 % cd A−1.0 % cabal configure % cabal build % c a b a l copy % cabal r e g i s t e r 依存関係を自前で解決しなくてはならなくて面倒 . . . . . .
  • 15. Debian sid - 1 Debian のパッケージシステムが 依存関係を壊さないように保ってくれる 475 個の hackage (2012-05-27 現在) のライブ ラリが Debian package 化されている yesod や snap もあるよ haskell-platform が更新されない期間も、 相当するパッケージが提供される . . . . . .
  • 16. Debian sid - 2 Haskell 以外の依存関係も管理されている Haskell 以外にも依存しているような 複合的な依存関係でも大丈夫 豊富なパッケージ (2012-05-27 現在、 37526 個) . . . . . .
  • 17. まとめ cabal は便利 でも複雑な依存関係を 壊さないようにするのは大変 Debian sid おすすめです . . . . . .
  • 18. Q&A Q&A . . . . . .