Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

ライブラリの依存関係で困ったときにやってみたことLt

1,290 views

Published on

Scala関西Summit2016 懇親会LT資料です

Published in: Technology
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes ,Download or read Ebooks here ... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

ライブラリの依存関係で困ったときにやってみたことLt

  1. 1. ライブラリの依存関係で困ったとき にやってみたことLT hiraiva @ Scala 関西 Summit 2016/10/08
  2. 2. あんた誰?  平岩二郎 / @hiraiva  株式会社オプト勤務エンジニア兼アドテクおじさん(自称)  大学時代は関西でした!(露骨な迎合アピール)  株式会社オプト  東京のインターネット広告代理店  Scala関西サミット Silverスポンサー  チラシにだいたい言いたいこと書いたので見たってや〜  株式会社オプト 大阪支社  堂島エリアにあります  セールス、マーケティングコンサルタント募集中!  (開発室はありません)
  3. 3. eviction warnings
  4. 4. eviction warnings  sbt compile 時にこういう warning が出たら…  sbt 0.13.6 以降の eviction warning  同じライブラリの複数バージョンへの依存が見つかった ので、sbt が推論によりどちらかを追い出し(eviction)した よという warning  何もしなくてもコンパイルできた!やったね! (解決したとは言ってない) [warn] There may be incompatibilities among your library dependencies. [warn] Here are some of the libraries that were evicted: [warn] * com.typesafe.play:twirl-api_2.11:1.0.2 -> 1.1.1 [warn] Run 'evicted' to see detailed eviction warnings
  5. 5. sbt-assembly利用時
  6. 6. Merge Strategy  assembleするときにファイルが重複すると怒られる  fat jar 内のパスを指定し、 どのような戦略でファイルを採用するか指定する  依存関係によりぶつかっているパスだけ指定すれば良い  依存の解決以外にもファイルをマージしたりなどできる  assembleできるようになった!やったね! (解決したとは言ってない) Project(name, file(path.getOrElse(name))) .settings( sbt.Keys.test in assembly := {}, mainClass in assembly := MyMainClass, assemblyMergeStrategy in assembly := { case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.last case "application.conf" | "production.conf" | "staging.conf" => MergeStrategy.concat } )
  7. 7.
  8. 8. コンパイルできても 実は内部APIが incompatibleだったら… 実行時例外が発生する
  9. 9. Google Cloud for Java が Play 2.5 と コンフリクトする?
  10. 10. GCP for Java 入りの Play 2.5 アプリ  アクセス時に上記のような実行時例外が出る  Play2.5は最新のNettyなのに対し、GCP for Java(が依存してい るgrpc)が古いNettyに依存してるからっぽい  (2016/11/2修正)正しくはplay2.5がNetty4.0系で、GCP4J(が依存してい るgrpc)がNetty4.1系に依存していました。(Playの方が古い)  似た事例はあるっぽいがよくわかりませんでした http://stackoverflow.com/questions/35827782/conflict-between-play-framework-2-5-and-grpc-0-13  結局、Playを2.4系にダウングレードして(一時的)解決 [error] p.c.s.n.PlayRequestHandler - Exception caught in Netty java.lang.AbstractMethodError: null at io.netty.util.ReferenceCountUtil.touch(ReferenceCountUtil.java:73) at io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:107) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:331 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at com.typesafe.netty.http.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:129) at com.typesafe.netty.http.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:96) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
  11. 11. ライブラリの依存関係が コンフリクトした場合に 僕たちができること
  12. 12. バージョンを変える OR プルリクを送る
  13. 13. 【未承諾広告※】 株式会社オプトのエンジニア組織 Opt Technologies では Scalaに興味のあるエンジニアを募(中略) Scalaでやろうぜ!! ご清聴ありがとうございました

×