2024-11-18
/ scala
æ¬çš¿ã§ã¯ãHedgehog for Scala ãšããããããã£ãŒã»ããŒã¹ã»ãã¹ãã»ãã¬ãŒã ã¯ãŒã¯ãç°¡åã«çŽ¹ä»ããããHedgehog for Scala ã¯ãJacob Stanley ãããš Nikos Baxevanis ããå
±èã® Haskell Hedgehog ãšããã©ã€ãã©ãªãåºã« 2018幎ãã Charles O’Farrell ãããå®è£
ãããã®ã§ãæè¿ã§ã¯ Kevin Lee ãããäž»ã«ã¡ã³ããã³ã¹ãè¡ã£ãŠããã
2024-09-28
/ sbt
æ¬çš¿ã¯ sbt 2.x éçºã«é¢ããèšäºã§ãsbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãBazel äºæ㪠sbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãé
¢é¶ãããŒã4 ãããŒã5 ãªã©ã®ç¶ç·šã ãåã¯å人ã®æéã䜿ã£ãŠ Scala Center ã EngFlow ã® Billy ãããªã©ã®ãã©ã³ãã£ã¢ã®äººãšååã㊠sbt 2.x ã®äœæ¥ãããŠããŠããã®ãããªèšäºã¯ãã«ãªã¯ã³ã¡ã³ãã®æ¡åŒµçã§ãå°æ¥ sbt ã«å®è£
ããããããããªãæ©èœãå
±æã§ããããããšæã£ãŠããã
sbt query
sbt 2.0 ideas ã§åºããã¢ã€ãã£ã¢ãšã㊠sbt query ãšãããã®ããã:
sbt query åç
§ãã¯ãšãªã¯ãµããããžã§ã¯ãããµããåããã®ã«äœ¿ãããšãã§ããã
sbt-projectmatrix ãããã©ã«ãã§äœ¿ãããããã«ãªããšããµããããžã§ã¯ãã®æ°ã¯å¢å ããããšã«ãªãã倧èŠæš¡ãªã³ãŒãããŒã¹ã§äœæ¥ããŠã人ã¯æ¢ã«å€§éã®ãµããããžã§ã¯ããåãæ±ã£ãŠãããããããªãã
sbt 2.0 ã§ã®ã¿ã¹ã¯éçŽã«ããããµããããžã§ã¯ãã®ãµããåãæ©æ§ãããã§ææ¡ããã:
sbt .../test
sbt abc.../test
sbt ...@scalaBinaryVersion= 3/test
Read MoreâŠ
2024-09-08
/ sbt
æ¬çš¿ã¯ sbt 2.x éçºã«é¢ããèšäºã§ãsudori part3 ãsbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãBazel äºæ㪠sbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãé
¢é¶ãããŒã4 ãªã©ã®ç¶ç·šã ãåã¯å人ã®æéã䜿ã£ãŠ Scala Center ã EngFlow ã® Billy ãããªã©ã®ãã©ã³ãã£ã¢ã®äººãšååã㊠sbt 2.x ã®äœæ¥ãããŠããŠããã®ãããªèšäºã¯ãã«ãªã¯ã³ã¡ã³ãã®æ¡åŒµçã§ãå°æ¥ sbt ã«å®è£
ããããããããªãæ©èœãå
±æã§ããããããšæã£ãŠããã
å°å
¥
ä»é±ã¯ã³ããã«ããå·ã®æµèŸºã®çºã§é
ãå€äŒã¿ãåã£ãŠå°å
ã®ã¹ã±ããŒã¹ãããããã§ãã¯ããããå°ãå·ãããªæµ·ã«å
¥ã£ãããããã¹ã¿ãŒã»ããŒã«ãé£ã¹æ¯ã¹ããããŠãããã¹ã±ããŒããããæµ·éã³ã®åéã« sbt ã«ããããã¹ãã®ãªã¢ãŒãã»ãã£ãã·ã¥ã®äœæ¥ãããããé¢é£ããå®éšããããããŠãããéçºçšã®èŠæžãšããŠãããã«çµæãå ±åãããã
é
¢é¶ãããŒã4 ã§ã¯ compile
ã¿ã¹ã¯ã®ãªã¢ãŒãã»ãã£ã·ã¥ãèŠããcompile
ããã£ãã·ã¥ã§ããã°åœ¹ç«ã€ã®ã¯ééãç¡ãããCI (ç¶ç¶ççµ±å) ã·ã¹ãã ã®å€ãã®æéã¯ã³ãŒãã®ã³ã³ãã€ã«ã§ã¯ãªããã¹ãã«å²ãããããšãå€ãã®ã§ã¯ãªãã ããããBazel ã¯æ°æ¡éãã«é«é㪠CI ã®æ§èœãå©ãåºãããšããããããã®äžã€ã®çç±ãšããŠããã©ã«ãã§ã® test
ã³ãã³ãããªã¢ãŒãã»ãã£ãã·ã¥åãããŠãããšããããšãæãããããèšãæãããšãBazel ã䜿ã£ãå Žåããã CI ãã·ã³äžã§ãã¹ããäžåºŠå®è¡ããããšãã€ã³ããããå€ãããŸã§ã¯ãã®ãã¹ãçµæã¯ãã£ãã·ã¥ããç¶ããã
sbt äžçŽè
ã®èªè
ã®çããã¯ãsbt ã«ã¯æ¢ã«ããŒã«ã«ã§å·®åãã¹ããè¡ã testQuick
ããããããªãããšãæ°ã¥ããããããªããtestQuick
ã®é£ç¹ã¯ããã£ãã·ã¥ã®ç¡å¹åã«ã¿ã€ã ã¹ã¿ã³ããçšããããããã«ãçã«éå¯é (non-hermetic) ã§ããã®ãããã·ã³éã§åçŸæ§ãç¡ãããšã ãæ¬çš¿ã§ã¯ããã·ã³éã§å®å
šã«å
±æã§ãã sbt 2.x ã®ãã¹ãã»ãã£ãã·ã¥ãèå¯ããã察å¿ãããã«ãªã¯ã¯ sbt/sbt#7644 ã ã
2024-08-18
/ sbt
æ¬çš¿ã¯ sbt 2.x éçºã«é¢ããèšäºã§ãsudori part3 ãsbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãBazel äºæ㪠sbt 2.x ãªã¢ãŒããã£ãã·ã¥ ãªã©ã®ç¶ç·šã ãåã¯å人ã®æéã䜿ã£ãŠ Scala Center ãšåŒ·åã㊠sbt 2.x ã®äœæ¥ãããŠããŠããã®ãããªèšäºã¯ãã«ãªã¯ã³ã¡ã³ãã®æ¡åŒµçã§ãå°æ¥ sbt ã«å®è£
ããããããããªãæ©èœãå
±æã§ããããããšæã£ãŠããã
2024幎8æçŸåšã§ã®ç¶æ³
2024幎4æã®æ®µéããäžå¿ Bazel äºæã®ãªã¢ãŒããã£ãã·ã¥æ©èœãå
¥ã£ãŠããããã®å®è£
ã¯ãã£ãã·ã¥ãããå¯äœçšãšããŠãã¡ã€ã«ã»ã¢ãŠããããããµããŒããããèšãæãããšããŸã£ãããªãã·ã³ã§ãã«ããè¡ã£ããšããŠãããªã¢ãŒãã»ãã£ãã·ã¥ã最ã£ãŠããã°ãã³ã³ãã€ã©ãå®è¡ãã代ããã« JAR ãããŠã³ããŒãã§ãããšããç®æ®µã ã
ããããå®éã«å·®åã³ã³ãã€ã«ãè¡ãã«ã¯ãã£ã¬ã¯ããªã«ä»»æã®æ°ã®ãã¡ã€ã«ãäœãããšããµããŒãããå¿
èŠããããé 匵ãã°ä»ã®æ¹æ³ãããã®ã ããä»ã®ãšãããã£ã¬ã¯ããªããµããŒãããã®ãçŸå®çãªæ¬¡ã®ã¹ãããã ãšæãã
ãã¡ã€ã«ã»ãã£ã¬ã¯ããªåé¡
ãã¡ã€ã«ã»ãã£ã¬ã¯ããªã®ãã£ãã·ã¥å㯠sbt 2.x ãªã¢ãŒããã£ãã·ã¥ ã§åæããæ§ã
ãªãã£ãã·ã¥é¢é£ã®åé¡ã«åœããããšã«ãªã:
ãã¡ã€ã«ã»ãã£ã¬ã¯ããªã¯çžå¯Ÿãã¹åããã£ã¬ã¯ããªã«é¢ããäžæãªèšŒæããã¡ã€ã«ã»ã·ã¹ãã å
ã®å®éã®ãã£ã¬ã¯ããªãªã©è²ã
ãªãã®ãæãå¯èœæ§ããã
å®éã®ãã¡ã€ã«ã»ãã£ã¬ã¯ããªã¯ä»»æã®æ°ã®ãã¡ã€ã«ãå«ã
æããããã£ã¬ã¯ããªããã£ãã·ã¥ããã®ã«å€§éã®ãããã¯ãŒã¯åŒã³åºãã¯ããããªã
ã¢ãŠããããã®å®£èš
sbt/sbt#7621 ã«ãããŠãDef.declaraOutputDirectory
ãšããæ°ããã¢ãŠãããããå°å
¥ãã:
Def . declareOutputDirectory( dir)
ããã¯ã¿ã¹ã¯å
ã§åŒã³åºãããšãã§ãã£ã¬ã¯ããªã®ã¢ãŠããããã宣èšãããããã¯ãã¿ã¹ã¯ã®è¿ãå€ã®åãšã¯ç°ãªãããšã«æ³šæãäŸãã°ãcompile
ã¿ã¹ã¯ã¯ Analysis
ãè¿ããã暪㧠*.class
ãã¡ã€ã«ãçæããŠãäºåã«åã決ãããããã£ã¬ã¯ããªã䜿ã£ãŠä»ã®ã¿ã¹ã¯ã¯ãã®å
容ã䜿ããšããããšãè¡ãããŠããã宣èšããããšã§ãã®æµããããå°ãæ瀺çã«ãªããå
·äœäŸã ãšãã®ããã«ãªã:
2024-07-20
/ scala
@ifdef
㯠Scala ã³ã³ãã€ã©ã»ãã©ã°ã€ã³ã§ãScala èšèªã«ãããæ¡ä»¶ä»ãã³ã³ãã€ã«ãå®è£
ãããifdef 0.3.0 ã§ã¯ Scala.JS ãš Scala Native ã®ãµããŒããè¿œå ããã
Scala Version
JVM
JS (1.x)
Native (0.5.x)
3.x
â
â
â
2.13.x
â
â
â
2.12.x
â
â
â
2024-06-24
/ scala
äœã§ Scala 3 ããããªã«æšãã®ããšèãããããšãããã®ã§ããªã¹ã圢åŒã§æžãåºããŠã¿ããé ã¯ç¹ã«ç¡ããããã¯åã Scala 3 ãã©ãæžããŠããããšããå°æ¥ã©ãæžãããã®ãã¿ãããªå人çãªå¥œã¿ã«åºã¥ããŠããã®ã§ãããã¯æ³šæããŠã»ããã
2024-04-05
/ sbt
æ¬çš¿ã¯ sbt 2.x ãªã¢ãŒããã£ãã·ã¥é¢é£ã®ç¬¬3éšã ãããæ°å¹Žèªåã®æéã䜿ã£ãŠ sbt 2.x ã®éçºãè¡ã£ãŠããŠãæè¿ã¯ Scala Center ã«ãæäŒã£ãŠããã£ãŠããããããã®èšäºã¯ãã«ãªã¯ã³ã¡ã³ãã®æ¡åŒµçã§å°æ¥ sbt ã«å®è£
ããããããããªãæ©èœãå
±æã§ããããããšæã£ãŠããã
çŽ1幎å sbt 2.x ã«ãããèªåãã£ãã·ã¥ã»ã¿ã¹ã¯ã®èšèšã®ææ¡ã RFC-1: sbt cache ideas ã§è¡ãããsbt 2.x ãªã¢ãŒããã£ãã·ã¥ã ã§ã¯å®è£
ã®è§£èª¬ãè¡ã£ã:
someKey : = Def . cachedTask {
val output = StringVirtualFile1 ( "a.txt" , "foo" )
Def . declareOutput( output)
name. value + version. value + "!"
}
Read MoreâŠ
2023-12-21
ãã㯠Scala Advent Calendar 2023 ã® 23æ¥ç®ã®èšäºã§ãã21æ¥ç®ã¯ããã£ã¡ããã®path äŸååã£ãŠäœ? 調ã¹ãŠã¿ãŸãã! ã§ããã
ã¯ããã«
ãªã¢ãŒããã£ãã·ã¥ã¯ããã«ãã®çµæãå
±æããããšã§åçãªæ§èœã®æ¹åãå¯èœãšãããMokhov 2018 ã§ã¯ã¯ã©ãŠãã»ãã«ãã»ã·ã¹ãã (cloud build system) ãšãåŒã°ããŠãããããã¯ãåã Blaze (çŸåšã¯ Bazel ãšããŠãªãŒãã³ãœãŒã¹åãããŠãã) ã®ããšãèããŠä»¥æ¥é¢å¿ãæã¡ç¶ããŠããæ©èœã ã2020幎ã«ãå㯠sbt 1.x ã®ã³ã³ãã€ã«ãã£ãã·ã¥ ãå®è£
ãããreibitto ããã®å ±åã«ãããšã以åã¯å
šãŠãã³ã³ãã€ã«ããã®ã« 7åããã£ãŠãããã15ç§ ã§çµããããã«ãªã£ããããããä»ã«ã 2x ~ 5x éããªã£ããšããå ±åãä»ã®äººãè¡ã£ãŠããããããã¯æåŸ
ã®æãŠãå
容ã§ããããšã«ééããªãããçŸè¡ã®æ©èœã¯å°ãäžåšçšã§ compile
ã¿ã¹ã¯ã«ãã䜿ããªããšããéçãããã2023幎ã®3æã«ãRFC-1: sbt cache ideas ãšããŠçŸç¶ã®èª²é¡ãšå¯Ÿçã®èšèšã®ã¢ãŠãã©ã€ã³ãæžãåºããŠã¿ãã以äžã«èª²é¡ããŸãšãã:
åé¡1: sbt 1.x 㯠compile
ã®ãªã¢ãŒããã£ãã·ã¥ãããã³ãã®ä»ããã€ãã®ã¿ã¹ã¯ã«å¯ŸããŠãã£ã¹ã¯ãã£ãã·ã¥ãå®è£
ããããã«ã¹ã¿ã ã¿ã¹ã¯ãåå ã§ãããœãªã¥ãŒã·ã§ã³ãæãŸããã
åé¡2: sbt 1.x ã¯ãã£ã¹ã¯ãã£ãã·ã¥ãšãªã¢ãŒããã£ãã·ã¥ã§å¥ã®æ©æ§ãæã€ãããã«ããŠãŒã¶ãããŒã«ã«ããªã¢ãŒãã®ãã£ãã·ã¥ããåãæ¿ããããçµ±äžããæ©æ§ãæãŸããã
åé¡3: sbt 1.x 㯠Ivy resolver ããã£ãã·ã¥ã®æœè±¡åã«çšãããããããªãŒãã³ãªãªã¢ãŒããã£ãã·ã¥ã»ããã¯ãšã³ããæãŸãã
12æäžã¯é©åœã«èªåã§ãããžã§ã¯ããéžã㧠æ¯æ¥å°ãã§ãããããäœæ¥ããŠããããããã°ã«æ°è¡ãã€èšé²ããã #decemberadventure ãšããããã·ã¥ã¿ã°ãã€ããŠæçš¿ãããšããç¬ãã¢ãã³ãã Mastodon çéã®äžéšã§æµè¡ã£ãŠãŠãåã® december adventure 2023 ãšããŠãsbt 2.x ã®ãªã¢ãŒããã£ãã·ã¥ã«ææŠããŠã¿ãããšæã£ããå®è£
ã®ææ¡ã¯ GitHub #7464 ã§ãæ¬çš¿ã§ã¯ãææ¡ããå€æŽç¹ã®è§£èª¬ãè¡ãã泚æ : sbt ã®å
éšæ§é ã«é¢ããäºåç¥èã¯ãããŸãå¿
èŠãšããªããããã«ãªã¯ã³ã¡ã³ãã®æ¡åŒµçã®ãããªãã®ãªã®ã§äžçŽã¬ãã«ã®èªè
ãæ³å®ããŠãããããšããã«ãªã¯æ®µéãªã®ã§æžããŠããå
ãã詳现ã¯ã©ãã©ãå€ãã£ãŠãããããããªãã
2023-07-15
/ bazel / scala
Scalafix ã«ã€ããŠ
ã³ãŒãããŒã¹ã倧ååããã«ã€ããèªåãªãã¡ã¯ã¿ãªã³ã°ãè¡ãããšãã§ããèšèªããŒã«ããããšäŸ¿å©ã ã幞ããªããšã«ã2016幎㫠Scala Center ã Scalafix ãäœã£ãŠããããå
¬éæã®ããã°èšäº ã®äžã§ Ãlafur Geirsson ããã¯:
Scalafix ã¯ãç°¡åãããããªããå調ã«ç¹°ãè¿ãããã³ãŒãå€æãåãæã€ããšã§ãããªããæèãåãã䟡å€ã®ããããšã«éäžããããšãã§ããŸãã倧ãŸãã«èª¬æãããšãScalafix ã¯ãœãŒã¹ãèªãã§ãéæšå¥šæ©èœã®äœ¿çšãæ°ãã代æ¿ãžãšå€æããå
ã®ãœãŒã¹ã«æžã蟌ã¿ãŸãã
ãšè§£èª¬ããŠããŠãScala 3 ãã€ã°ã¬ãŒã·ã§ã³ãåæ©ã«ãªã£ãŠããããšããããããã
çŸåšã¯ãScalafix 㯠Brice Jaglin ãããã«ãã£ãŠã¡ã³ããããŠããŠãScala 3 ãã€ã°ã¬ãŒã·ã§ã³ä»¥å€ã§ãäžè¬ã®ãªã³ãã£ã³ã°ããªãã¡ã¯ã¿ãªã³ã°ã®ããŒã«ãšããŠäœ¿ãããŠãããäŸãã°åç°ãã (xuwei-k) ãªããã¯æ°çŸã® Scalafix ãæžãããããããã®äžéšã¯ xuwei-k/scalafix-rules ã«ãå
¬éãããŠããã
Scalafix ç¬ç¹ã®ç¹åŸŽãšããŠãsyntactic (æ§æç) ãš semantic (æå³è«ç) ãšãã2çš®é¡ã®ã«ãŒã«ãããã
syntactic rule ã¯ãã³ã³ãã€ã«ããããšãªããœãŒã¹ã³ãŒãã«å¯ŸããŠçŽæ¥å®è¡ããããšãã§ãããã·ã³ãã«ã ããã³ãŒã解æã®åã«ã¯å¶éãããã
semantic rule ã¯ãã·ã³ãã«ãåãçšããŠããé«åºŠãªã³ãŒã解æãè¡ãããšãã§ããããå
¥åãœãŒã¹ã SemanticDB ã³ã³ãã€ã©ã»ãã©ã°ã€ã³ãšå
±ã«ã³ã³ãã€ã«ãããã®ãäºåã«çšæããå¿
èŠãããã
syntactic rule 㯠Scalafix CLI ããããã°è¯ãã®ã§ãBazel ãšã®çµ±åã¯ç¹ã«å¿
èŠç¡ããäžæ¹ã§ãsemantic rule 㯠semanticdb ãªã©ãæž¡ããŠåããããå°ãäœæ¥ãå¿
èŠãšãªãã
Bazel çµ±åã®å
è¡ç 究
Bazel + Scalafix
æé ã®æŠèŠ
2023-04-17
/ scalamatsuri
ä»é±æ«ãvirtual/Tokyo ãã€ããªããã® ScalaMatsuri ãéå¬ãããããŸãã¯ãç»å£è
ã®çãããã¹ãã³ãµãŒå瀟ãåå è
ã®çããã«ã瀌ããŸãã
åã®ãã€ããªãããšããããšã§ãè³ããªãç¹ãå€ã
ãã£ããã©ããæåããã«ã³ãã¡ã¬ã³ã¹ã ã£ãã®ã§ã¯ãšæããåã¯ã16åã® ScalaMatsuri ã¹ã¿ããã®äžå¡ãããããã¡ã€ã³ã®ã»ãã·ã§ã³ãšé£ã³ã³ã³ã§ã®ç»å£è
ãšããŠåå ãããŠããã£ãã
2023-02-20
/ bazel / scala
äžè¬è«ãšã㊠Bazel ã¯ãã¢ãããŒãžã§ã³ãã³ã°ãšãã£ãŠã(JUnit ã Pandas ãªã©) ã©ã®ã©ã€ãã©ãªã§ãã¢ããªãå
ã®å
šãŠã®ã¿ãŒã²ãããåäžã®ããŒãžã§ã³ã䜿ããšãã圢æ
ã奜ãã
ã¢ãããŒãžã§ãã³ã°ã¯ãã¢ããªãå
ã§çºçãããããŒãžã§ã³è¡çªãåçã«æžãããããããã³ãŒãåå©çšæ§ãæ¹åããããšããå¹æãããã
ããããå®éã«éçšããŠã¿ããšå
šç€Ÿãäºäººäžèç¶æ
ã«ãªããšããæ¬ ç¹ãåºãŠããã
äŸãã°ãµãŒãã¹ AãBãCãD ã®å
šãŠã Big Framework 1.1 ã䜿ã£ãŠãããšããã°ã¬ (regression) ããããããããªãã®ã§å
šãŠãåæã« Big Framework 1.2 ã«ç§»æ€ããã®ã¯äººçè² è·ãé«ãã£ããããã
ãããªãããªã§æ°å¹Žãçµã¡ãBig Framework 2.0 ããªãªãŒã¹ãããŠããã£ã±ããããæ¡çšã¯ãªã¹ããŒãªã®ã§ã¯ãšããããšã«ãªãã
Scala ãšã³ã·ã¹ãã ã§ã¯ãsbt ãçšããŠã©ã€ãã©ãªäœè
ãã©ã€ãã©ãªãè€æ°ã® Scala æšæºã©ã€ãã©ãªããã®ä»ã®ãã¬ãŒã ã¯ãŒã¯ã«å¯ŸããŠãã«ããããšããã®ã¯æ®éã«è¡ãããŠããã
ããã¯ã¯ãã¹ãã«ã ãšåŒã°ããŠããã(x86 ãã aarch64 ãªã© CPU ã¢ãŒããã¯ãã£ããŸããã ã³ã³ãã€ã«ãã¯ãã¹ã³ã³ãã€ã« ãšèšã£ããããããããšã¯å¥ãªããšã«æ³šæ)
ãã®ã¯ãã¹ãã«ããšããæŠå¿µã¯ãåãã©ã³ãå
ã§äžé·æã«æž¡ã£ãŠè²ã
ãªè»žã®ãã€ã°ã¬ãŒã·ã§ã³ãå¯èœãšããããšãããBazel ã«ãããŠãæçšãªãã®ãããªãããšæã£ãŠããã
äŸãã°çŸè¡ã®ã¢ããªãã Scala 2.12 ã ãšããŠãåŸã
ã«ãã€ã°ã¬ãŒã·ã§ã³ãè¡ã£ãŠã»ãšãã©ã®ã¿ãŒã²ããã Scala 2.12 ãš Scala 2.13 ã®äž¡æ¹ã§ãã«ãå¯èœãªç¶æ
ãžæã£ãŠããã
ããã¯ãäžéšã®ããŒã ãå
šç€Ÿã«å
è¡ããŠæ°ããŒãžã§ã³ãè©Šãã€ã€ãã³ãŒãããŒã¹ãšããŠã¯æ®éã«é²ãã§ããããšãã§ããã
local_repository ããã¯
å
é±ã@ianoc ããã« Bazel ã§ã¯ãã¹ãã«ããå¯èœãšããæ©æ§ãæããŠããã£ãã
åãã¡ããã£ãã®ã¯ Python ã®å€éšã©ã€ãã©ãªã®åãæ¿ãã ããæ¬çš¿ã§ã¯ Scala ã®ã¯ãã¹ãã«ããå®è£
ããã
(æãåºããšå»å¹ŽãLong Cao ãããããŒã«å
¥ãè¡åã§åŸ
ã£ãŠããéã«ãã®èª¬æãè©Šã¿ãŠãããæ°ãããããåœæã¯ãã®ãã¯ããã¯ãéåžžã«åŒ·åãªãã®ã ãšåãã€ãã€ãç解ã§ããªãã£ãã)
ãŸãåºæ¬ãå
ã«èšããšãã«ãŒãã® WORKSPACE
å
ã§ãµããã£ã¬ã¯ããªãåç
§ãã local_repository
ã宣èšããŠãå
¥ãåã¯ãŒã¯ã¹ããŒã¹ãäœãã
å®è¡æã« --override_repository
ãªãã·ã§ã³ã䜿ã£ãŠããããå¥ã®ã¯ãŒã¯ã¹ããŒã¹ãžãšãªãŒããŒã©ã€ãããã
ãã®ããŒã«ã«ã»ãªããžããªã¯å®æ°ããã¯ãããã¡ã€ã«ãå«ãã¿ãŒã²ãããªã©ãå
¬éããããšãã§ããããã䜿ãããšã§äœã§ããªãŒããŒã©ã€ãã§ããã¯ãã ã
2022-12-22
2022-11-20
å㯠Twitter瀟㮠Build/Bazel Migration ããŒã ã§ã¹ã¿ããã»ãšã³ãžãã¢ãšããŠå€åããŠãããä¿¡ããããªããã㪠2幎ã®åŸã2022幎11æ17æ¥ããã£ãŠéè·ãã (äŒæ¥è²·ååŸã®ã¬ã€ãªãã§ãä»»æã§ããããŸãé¢ä¿ç¡ãããåã¯ä»»æéè·åžæã®ãªãã¡ãŒãåã£ã)ãTwitter瀟ã¯ãåç£ç¢ç£šãå€æ§æ§ããã㊠Flock ãæ§æããå
šãŠã®äººã«å¯ŸããŠæº¢ãåºãåªãããšããããªãç¹å¥ãªæåãæã£ãè·å Žã ã£ãããããéè¿ã§çµéšããŠããã®äžå¡ãšãªãæ©äŒãåŸãããšã«æè¬ããŠããã(Flock ã¯ãé³¥ã®çŸ€ããã®æã§ã瀟å
ã§ã® Twitter瀟ã®é称)
以äžã¯éå»2幎ã®ç°¡åãªæ¯ãè¿ãã ãå°æ¬çš¿ã§ã®æ
å ±ã¯ãæ¢ã«å
¬éãããŠããããŒã¯ãããŒã¿ã«åºã¥ããŠãããè²·ååŸããã¡ã®ããŒã ã ãã§ã 10å以äžã®ã¡ã³ããŒã Twitter瀟ãæããã®ã§ãåšç±ã»å
å«ã LinkedIn ãããã¡ã€ã«ãžã®ãªã³ã¯ãæ¬çš¿åæã«è²Œã£ãã
2021-12-31
/ sbt
sbtãBazelããã®ä»å€ãã®ãã«ãããŒã«ã«ãããŠãããã¹ãããšããçšèªãå€æ§ãªã¬ãã«ã«ãŸãããããšãå€ãããã
ãããææ§ç¡ãå®çŸ©ããŠããããšã¯ç¹ã«äºåãäºåŸåŠçã䞊ååŠçãªã©ãèãããšãã«åœ¹ã«ç«ã€ã®ã§ã¯ãªãããšæãã
å
ã«æžããŠããŸããšããã¹ãã«ã¯ä»¥äžã® 4ã€ã®ã¬ãã«ããã:
ãã¹ãã»ã³ãã³ã
ãã¹ãã»ã¢ãžã¥ãŒã«
ãã¹ãã»ã¯ã©ã¹
ãã¹ãã»ã¡ãœãããŸãã¯ãã¹ãåŒ
ã³ãã³ãã©ã€ã³ã»ã€ã³ã¿ãŒãã§ã€ã¹ãšããŠã®ãã¹ã
æäžäœã®ã¬ãã«ã¯ãã«ãã»ããŒã«ããŠãŒã¶ã« test
ã³ãã³ããšãšããŠæäŸãããã®ã ã
ãŠãŒã¶ã sbt ã·ã§ã«ã« test
ãšæã¡èŸŒãããã¿ãŒããã«ãã sbt --client test
ãšæã¡èŸŒããšãsbt ã®ã³ãã³ãã»ãšã³ãžã³ã¯ãtestããéçŽãªã¹ãã«åæããããµããããžã§ã¯ãå
ã§ã®ã¿ã¹ã¯å®è¡ãžãšæã¡äžããã
äŸãã° root
ãµããããžã§ã¯ãã core
ãš util
ãšãããµããããžã§ã¯ããéçŽããå Žåãtest
㯠root/Test/test
ãcore/Test/test
ãutil/Test/test
ã®äžŠåå®è¡ã ãšè§£éãããã
åã¯ãã®æ¯ãèããã³ãã³ãã»ãããŒããã£ã¹ããšåŒãã§ããã
Bazel ã§ã¯ãã®ãããŒããã£ã¹ãã¯ããæ瀺çã«ãŠãŒã¶ã«ãã£ãŠè¡ãããã
äŸãã°ããŠãŒã¶ã bazel testl example/...
ãšæã¡èŸŒããšãBazel 㯠example1/
ãã£ã¬ã¯ããªä»¥äžã®å
šãŠã®ãã¹ãã»ã¿ãŒã²ãããååž°çã«ã¯ãšãªããŠãçºèŠããããã¹ãã»ã¿ãŒã²ããã䞊åçã«ãã¹ãããã
ã¢ãžã¥ãŒã«ãšããŠã®ãã¹ã
å
±éããŠããã®ã¯ãã³ãã³ããšããŠã®ãã¹ããããã¹ãã¢ãžã¥ãŒã«ãéçŽããŠããããã䞊åå®è¡ããããšã ã
sbt ã¯å
žåçã«ãã¹ãã»ã¢ãžã¥ãŒã«ããµããããžã§ã¯ããš Test
ã³ã³ãã£ã°ã¬ãŒã·ã§ã³ã®ãã¢ãšããŠè¡šãã
Bazel ã¯ãã¹ãã»ã¢ãžã¥ãŒã«ã scala_test(...)
ã®ãããªäœããã®ã¿ãŒã²ãããšããŠè¡šãã
Bazel 㯠rules_scala 㮠scala_test_suite(...)
ã®ãããªååä»ãã®ãã¹ãéçŽãæäŸããã
Bazel ã«é¢ããŠå°ãè£è¶³ããŠãããšããã¹ãã»ã¢ãžã¥ãŒã«ã®åŠçã¯éåžžã«åªç§ã ãšããããšã ã
ããã©ã«ãã§ãã¹ãã®çµæã¯ãã£ãã·ã¥ããããã£ãã·ã³ã°ã¯ãªã¢ãŒãã»ãã£ãã·ã¥ãžãšèšå®ããããšãã§ãã
å®è¡ç°å¢ããªã¢ãŒãã»ãã·ã³ãžãšèšå®ããããšãã§ããã
ãã®ãããã©ãããããäžããç°å¢ãæŽããã°äœçŸãã®ãžã§ããèµ·åããããšãã§ããã
ãŸããã¿ãŒã²ããã¯åŸæ¥ã®ãã«ãããŒã«ããã现ããäœãããçè«äž .scala
ãã¡ã€ã«ããšã«
scala_test(...)
ã¿ãŒã²ããã宣èšããŠ(å¥ã®ãã·ã³ã§)䞊åå®è¡ããããšãã§ããã
2021-09-17
/ scala
Ãlaf ããã® olafurpg/setup-scala ã䜿ã£ãŠãããžã§ã¯ãã JDK 17 ã§ãã¹ãããç°¡åãªè§£èª¬ãããŠã¿ããSetting up GitHub Actions with sbt ã§ããã¥ã¡ã³ãåãããŠãã以äžã®èšå®ãã¹ã¿ãŒãå°ç¹ãšããã
name : CI
on :
pull_request :
push :
jobs :
test :
strategy :
fail-fast : false
matrix :
include :
- os : ubuntu-latest
java : 11
jobtype : 1
- os : ubuntu-latest
java : 11
jobtype : 2
- os : ubuntu-latest
java : 11
jobtype : 3
runs-on : ${{ matrix.os }}
steps :
- name : Checkout
uses : actions/checkout@v1
- name : Setup
uses : olafurpg/setup-scala@v13
with :
java-version : "adopt@1.${{ matrix.java }}"
- name : Build and test
run : |
case ${{ matrix.jobtype }} in
1)
sbt -v "mimaReportBinaryIssues; scalafmtCheckAll; +test;"
;;
2)
sbt -v "scripted actions/*"
;;
3)
sbt -v "dependency-management/*"
;;
*)
echo unknown jobtype
exit 1
esac
shell : bash
Read MoreâŠ
2021-09-06
/ scala
ã¯ããã«
ãã¯ã ã¯æ¥œãããã€åŒ·åãªããŒã«ã ãã䜿ãããã¯å®³ãããã責任ãæã£ãŠé©åºŠã«ãã¯ãã楜ããã§ã»ããã
ãã¯ããšã¯äœã ããã? ãããã説æã¯ãã¯ãã¯ã³ãŒããå
¥åãšããŠåãåããã³ãŒããåºåããããã°ã©ã ã ãšããããããèªäœã¯æ£ããããmap {...}
ã®ãããªé«éé¢æ°ãååæž¡ããã©ã¡ãŒã¿ã®ããã«äžèŠã³ãŒãã®ãããã¯ãæž¡ããŠåã£ãŠããæ©èœã«èŠªããã§ãã Scala ããã°ã©ãã«ã¯ãã³ãŒããå
¥åãšããŠåãåããã®æå³ãäžèŠåããã¥ãããããããªãã
以äžã¯ãåã Scala 3 ã«ã移æ€ãã Expecty ãšãã assersion ãã¯ãã®çšäŸã :
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> assert( person. say( word1, word2) == "pong pong" )
java. lang. AssertionError : assertion failed
assert( person. say( word1, word2) == "pong pong" )
| | | | |
| | ping pong false
| ping pong
Person ( Fred , 42 )
at com. eed3si9n. expecty. Expecty$ExpectyListener . expressionRecorded( Expecty . scala: 35 )
at com. eed3si9n. expecty. RecorderRuntime . recordExpression( RecorderRuntime . scala: 39 )
... 36 elided
Read MoreâŠ
2021-08-21
/ sbt
å®éšç sbt ãšããŠãé
¢é¶ (sudori) ãšããå°ããªãããžã§ã¯ããäœã£ãŠãããåœé¢ã®äºå®ã¯ãã¯ãåšãã Scala 3 ã«ç§»æ€ããããšã ãsbt ã®ãã¯ããå解ããŠãåå°ããäœãçŽããšãã課é¡ã ããã㯠Scala 2 ãš 3 ã§ãäžçŽè
åãã®ãããã¯ã§ãåèªèº«ãè©Šè¡é¯èª€ããªãããã£ãŠããã®ã§ãèŠãæžãã®ãããªãã®ã ãšæã£ãŠã»ããã
åè:
Convert
äœã«ãäŸåããŠããªãåºç€ãšãªã Convert ãšãããã®ãç¹å®ã§ããã
abstract class Convert {
def apply[ T: c.WeakTypeTag ]( c: blackbox.Context )( nme: String , in: c.Tree ) : Converted [ c. type ]
....
}
Read MoreâŠ
2021-08-01
/ sbt
å®éšç sbt ãšããŠãé
¢é¶ (sudori) ãšããå°ããªãããžã§ã¯ããäœã£ãŠãããåœé¢ã®äºå®ã¯ãã¯ãåšãã Scala 3 ã«ç§»æ€ããããšã ãsbt ã®ãã¯ããå解ããŠãåå°ããäœãçŽããšãã課é¡ã ããã㯠Scala 2 ãš 3 ã§ãäžçŽè
åãã®ãããã¯ã§ãåèªèº«ãè©Šè¡é¯èª€ããªãããã£ãŠããã®ã§ãèŠãæžãã®ãããªãã®ã ãšæã£ãŠã»ãããããã¯ãã®ããŒã2ã ã
åè:
Instance
build.sbt
ãã¯ããšèšãããŠæãã€ãã®ã¯ .value
ã䜿ã£ã Applicative do ãã¯ããªããããªãããšæããåŒã³æ¹ãšããŠã¯ãããã¯åŒã°ãªã人ããããããããªããããã®åœä»€åããé¢æ°åãžã®å€æãæ
ã£ãŠããã®ã¯ãã¡ãã£ãšå€ãã£ãååãæ〠Instance class ã®ã³ã³ãããªã³ã :
/**
* The separate hierarchy from Applicative/Monad is for two reasons.
*
* 1. The type constructor is represented as an abstract type because a TypeTag cannot represent a type constructor directly.
* 2. The applicative interface is uncurried.
*/
trait Instance {
type M [ x ]
def app[ K [ L [ x ]] , Z ]( in: K [ M ], f: K [ Id ] => Z)( implicit a: AList [ K ]) : M [ Z ]
def map[ S , T ]( in: M [ S ], f: S => T) : M [ T ]
def pure[ T ]( t: () => T) : M [ T ]
}
trait MonadInstance extends Instance {
def flatten[ T ]( in: M [ M [ T ]]) : M [ T ]
}
Read MoreâŠ
2021-04-26
sbt 1.5.1 ããããªãªãŒã¹ãã¢ããŠã³ã¹ããããªãªãŒã¹ããŒãã®å®å
šçã¯ããã«ãã - https://github.com/sbt/sbt/releases/tag/v1.5.1 ãæ¬çš¿ã§ã¯ Bintray ãã JFrog Artifactory ãžã®ãã€ã°ã¬ãŒã·ã§ã³ã®å ±åãããã
Bintray ãã JFrog Artifactory ãžã®ãã€ã°ã¬ãŒã·ã§ã³
ãŸã㯠JFrog瀟ã«ãsbt ãããžã§ã¯ãããã³ Scala ãšã³ã·ã¹ãã ãžã®ç¶ç¶çãªãµããŒããããŠããã£ãŠããããšã«ã瀌ãèšãããã
sbt ãã³ã³ããªãã¥ãŒã¿ãŒæ°ãšãã©ã°ã€ã³æ°ã«ãããŠäŒžã³çãã ã£ãææã« Bintray ã®åœ¢ãããåé¡ããã£ããå人ã®ã³ã³ããªãã¥ãŒã¿ãŒã« Ivy ã¬ã€ã¢ãŠãã®ã¬ããžããªãäœã£ãŠãsbt ãã©ã°ã€ã³ãå
¬éããŠãããã解決åŽã§ã¯éçŽããããšããåé¡ã ãGitHub ã® sbt ãªãŒã¬ããŒãŒã·ã§ã³ã§ãã©ã°ã€ã³ã®ãœãŒã¹ãè€æ°äººã§æµåçã«ç®¡çããããšãã§ããããã«ãªã£ããããã€ããªãã¡ã€ã«ã®é
ä¿¡ã¯èª²é¡ãšããŠæ®ã£ãŠãããåœæ㯠sbt ã®ããŒãžã§ã³ãããå€ãã£ãŠãããšããã®ãããã2014幎㫠Bintray ãæ¡çšããŠãæé·æã®é
ä¿¡ã¡ã«ããºã ãæ
ã£ãŠããããããã«åãã¡ã¯ sbt ã® Debian ãš RPM ã€ã³ã¹ããŒã©ãŒããã¹ãã£ã³ã°ããã®ã« Bintray ã䜿ã£ãŠããŠããã㯠Lightbend 瀟ãæã£ãŠãããŠããã
2021幎2æãJFrog 㯠Bintray ãµãŒãã¹ã®çµäºãã¢ããŠã³ã¹ããããã®çŽåŸãããJFrog 瀟ã¯åããããã³ã³ã¿ã¯ãããŠããŠãäœåãããŒãã£ã³ã°ãã¹ã±ãžã¥ãŒã«ããŠãããããopen source sponsorship ãã°ã©ã³ãããŠããããããã€ã°ã¬ãŒã·ã§ã³çšã®ããŒã«ãããããããããšãäžè©±ã«ãªã£ãŠããã
ä»çŸåš Scala Center ã«ã©ã€ã»ã³ã¹ãããJFrog ãã¹ãã³ãµãŒããŠãããã¯ã©ãŠãã»ãã¹ã㪠Artifactory ã®ã€ã³ã¹ã¿ã³ã¹ã皌åããŠããããArtifactory ã®ã€ã³ã¹ã¿ã³ã¹ããšäœåºŠãæžãã®ãé·ãã®ã§ãæ¬çš¿ã§ã¯ Artsy ãšåŒã¶ãsbt 1.5.1 ããªãªãŒã¹ãããããšã§ããã€ã°ã¬ãŒã·ã§ã³ã¯å®äºãããšæãã
2021-04-19
/ scala
ç«çª: 19æ¥ç® ãFunctionK ãšãã Rúnar ããã«ããã©ã³ã¯2å€çžæ§ã®ãšã³ã³ãŒãã£ã³ã°ããããŠé«ã©ã³ã¯å€çžãå¯èœã«ãããšäºèŠããã Resource ããŒã¿åã«é¢ããŠã
2021-02-16
/ sbt
sbt 1.1.0 ã§åã¯çµ±äžã¹ã©ãã·ã¥æ§æãå®è£
ãããããããæ°å¹Žçµã£ãä»æ¥ã«ãªã£ãŠãå€ã sbt 0.13 ã§ã®ã·ã§ã«æ§æãå»æ¢å§åããããã® pull request ãéã£ãã#6309
æãè¡ããšããŠãbuild.sbt
ã®ããã®æ§æ§æãå»æ¢å§åã«ãããšããè©±é¡ ãåºãŠãã ã
ãçµ±äžãã¹ã©ãã·ã¥æ§æãããåä»ããããã®ã¯ã·ã§ã«æ§æãšãã«ãå®çŸ©æ§æãçµ±äžããããã ããã®ãããã·ã§ã«ã®æ§æ§æãå»æ¢å§åãããªãã°ãskip in publish
ã scalacOptions in (Compile, console)
ãšãããµãã« in
ã䜿ãæ§ build.sbt
æ§æãåæã«å»æ¢å§åãããšããã®ã¯çã«ããªã£ãŠããã
build.sbt
ãçµ±äžã¹ã©ãã·ã¥æ§æãžãšå€æãã syntactic Scalafix rule ãã¡ãã¡ãã£ãšäœã£ãã®ã§ããã§çŽ¹ä»ãã - https://gist.github.com/eed3si9n/57e83f5330592d968ce49f0d5030d4d5
çšæ³
ãããžã§ã¯ãã git ã§ç®¡çããããããã¯ã¢ãããåãããšã
2021-02-06
/ git
git bisect ã¯ãã°ã®å
¥ã£ãå Žæãç¹å®ããã®ã«æçšãªãã¯ããã¯ã ã ç¹ã« scala/scala ã®å Žåã¯ãbisect.sh
ã¯ãã«ãæžã¿ã®ã³ã³ãã€ã©ã Scala CI Artifactory ããå©çšããããšã§æéãç¯çŽã§ããã
2020-12-14
/ scala
Rob wrote :
I want to tell sbt “this specific version breaks binary compatibility, so don’t resolve it via eviction, fail the build instead.” How do I do this? Complete answers only, I’m done trying to figure it out by following clues.
sbt ã«ããã®ç¹å®ã®ããŒãžã§ã³ã¯ãã€ããªäºææ§ãå£ãããããŒãžã§ã³ã®è§£æ±ºãããªãã§ãã«ãã倱æããŠããšèšããããããã¯ã©ããããã ããã? ãã³ããè¿œãã®ã«ç²ããã®ã§ãå®å
šãªåçã®ã¿åéã
ãããè¡ãå°ã㪠sbt ãã©ã°ã€ã³ sbt-strict-update ãæžããã
project/plugins.sbt
ã«ä»¥äžãè¿œå :
addSbtPlugin( "com.eed3si9n" % "sbt-strict-update" % "0.1.0" )
Read MoreâŠ
2020-12-01
/ sbt
æ¬çš¿ã¯åã«æžããTravis-CI ããã® sbt ãã©ã°ã€ã³ã®èªåå
¬é ã® GitHub Actions çã ã
Ãlaf ããã® olafurpg/sbt-ci-release ã䜿ã£ãŠ sbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ãèªååããŠã¿ããsbt-ci-release ã® README 㯠Sonatype OSS åãã®æ®éã®ã©ã€ãã©ãªã®ãªãªãŒã¹ãåæã«æžãããŠãããsbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ã«å¿
èŠãªå·®å以å€ã®è©³çŽ°ã¯ README ãåç
§ããŠã»ããã
ãªãªãŒã¹ãèªååããããšãã®ãã®ããã¹ãã»ãã©ã¯ãã£ã¹ã ããsbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ã«é¢é£ããŠç¹ã«å¬ããããšãããããã®æ¹æ³ã䜿ãããšã§ Bintray ã® sbt organization ã«ãŠãŒã¶ãŒãè¿œå ããã«ãè€æ°äººã§ sbt ãã©ã°ã€ã³ã®ãªãªãŒã¹æš©éãå
±æããããšãå¯èœãšãªããããã¯ä»äºã§ã¡ã³ãããŠãããã©ã°ã€ã³ããããšãã«äŸ¿å©ã ã
step 1: sbt-ci-release
sbt-release ã䜿ã£ãŠããå Žåã¯åé€ãããsbt-ci-release ãè¿œå ããã
addSbtPlugin( "org.foundweekends" %% "sbt-bintray" % "0.6.1" )
addSbtPlugin( "com.geirsson" % "sbt-ci-release" % "1.5.4" )
addSbtPlugin( "com.jsuereth" % "sbt-pgp" % "2.1.1" ) // for gpg 2
Read MoreâŠ
2020-11-29
/ scala
æ¬çš¿ã¯ 2018幎12æã« 4.0.0-RC2 ãšå
±ã«ååºããã2020幎11æã«ãªãªãŒã¹ãã 4.0.0 ã§ã®å€æŽãåæ ããŠæŽæ°ããŠããã
æè¿ scopt 4.0 ãæžããŠããããã£ãã¡ãªäººã¯ readme ã«é£ãã§ã»ããã
4.0.0 ãè©Šãã«ã¯ä»¥äžã build.sbt ã«æžã:
libraryDependencies += "com.github.scopt" %% "scopt" % "4.0.0"
scopt 4.0.0 ã¯ä»¥äžã®ãã«ããããªãã¯ã¹ã«å¯ŸããŠã¯ãã¹ãããªãã·ã¥ãããŠãã:
Scala
JVM
JS (1.x)
JS (0.6.x)
Native (0.4.0-M2)
Native (0.3.x)
3.0.0-M2
â
â
n/a
n/a
n/a
3.0.0-M1
â
â
n/a
n/a
n/a
2.13.x
â
â
â
n/a
n/a
2.12.x
â
â
â
n/a
n/a
2.11.x
â
â
â
â
â
scopt ã¯ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ãããŒã¹ããããã®å°ããªã©ã€ãã©ãªã ã2008幎㫠aaronharnly/scala-options ãšããŠå§ãŸããåœå㯠Ruby ã® OptionParser ãç·©ãã«ããŒã¹ã«ãããã®ã ã£ããscopt 2 㧠immutable parsing ãå°å
¥ããŠãscopt 3 ã§ã¯ Read
åã¯ã©ã¹ã䜿ã£ãŠã¡ãœããæ°ã倧å¹
ã«æžããããšãã§ããã
2020-10-25
/ sbt
sbt ãš Zinc 1.4.x ç³»åã§åãæéãšåããããã®ã¯ãããããã¡ã€ã«ã®ä»®æ³åãšã¿ã€ã ã¹ã¿ã³ããæãåºãããšã ããã®çµã¿åããã«ãããã·ã³ç¹å®æ§ãšæãã Zinc ã®ç¶æ
ã解æŸããããšãã§ããScala ã®ããã®å·®åãªã¢ãŒããã£ãã·ã¥ãæ§ç¯ããããã®ç€ãšãªããããã«é¢ããŠsbt ã§ã®ã³ã³ãã€ã«ãã£ãã·ã¥ ãæžãããããã¯ãã®ç¶ç·šãšãªãã
sbt 1.4.x ãåºãã®ã§ããã®æ©èœãå®éã«äœ¿ã£ãŠã¿ãããšããæ°éãäžéšé«ãŸã£ãŠããã
ãªã¢ãŒããã£ãã·ã¥ãµãŒããŒ
ãªã¢ãŒããã£ãã·ã¥ãéçšããã«ã¯ããªã¢ãŒããã£ãã·ã¥ãµãŒããŒãå¿
èŠãšãªããåæã®ããŒã«ã¢ãŠãã§ã¯ãè¿œå ã§ãµãŒããŒãçšæããã«ç°¡åã«è©Šããããã« Maven ãªããžã㪠(MavenCache("local-cache", file("/tmp/remote-cache"))
ãå«ã) ãšäºæãæãããããã«ããã次ã®ã¹ãããã¯ãã®ãªã¢ãŒããã£ãã·ã¥ããã·ã³éã§å
±æããããšã ã
ãšãããã JFrog Bintray 㯠Maven ãªããžããªãšããŠæ¯ãèãããšãã§ãããšããæå³ã§è¯ããã£ãããªããããªãããšæããBintray ã« publish ãè¡ãã«ã¯ RESTful API ãçµç±ããå¿
èŠããã£ãŠããã㯠sbt-bintray ãã«ãã»ã«åããŠããã
ã¡ãªã¿ã« Bazel 㯠HTTP ãããã³ã«ã gRPC ãçšãããªã¢ãŒããã£ãã·ã¥ã®ãµããŒããæäŸãããã㯠Nginxãbazel-remoteãGoogle Cloud Storageããã®ä» HTTP ã話ããã¢ããªãäœã§ãå®è£
ã§ãããã©ã€ãã©ãªäŸåæ§ãšéã£ãŠç¹ã« resolve ããå¿
èŠãç¡ãã®ã§å°æ¥çã«ã¯ãã®ãããªæ¹åã«ç§»è¡ããã®ãè¯ããšæãã
sbt-bintray-remote-cache
ä»ãããªã¢ãŒããã£ãã·ã¥ã䜿ã£ãŠã¿ãããšãã人ã®ããã«ãsbt-bintray ã®ã¹ãã³ãªããšã㊠sbt-bintray-remote-cache ãšãããã©ã°ã€ã³ãäœã£ãã
䜿ãã«ã¯ä»¥äžã project/plugins.sbt
ã«è¿œå ãã:
addSbtPlugin( "org.foundweekends" % "sbt-bintray-remote-cache" % "0.6.1" )
Read MoreâŠ
2020-10-19
sbt 1.4.1 ããããªãªãŒã¹ãã¢ããŠã³ã¹ããããªãªãŒã¹ããŒãã®å®å
šçã¯ããã«ãã - https://github.com/sbt/sbt/releases/tag/v1.4.1
ã¢ããã°ã¬ãŒãæ¹æ³
å
¬åŒ sbt ã©ã³ãã£ãŒ ã SDKMAN ã https://www.scala-sbt.org/download.html ããããŠã³ããŒãããŠããããã®ã€ã³ã¹ããŒã©ãŒã«ã¯ sbtn
ã®ãã€ããªãå«ãŸããŠããã
次ã«ã䜿ããããã«ãã® project/build.properties
ãã¡ã€ã«ã«ä»¥äžã®ããã«æžã:
ãã®æ©æ§ã«ãã£ãŠäœ¿ããããã«ãã«ã ã sbt 1.4.1 ã䜿ããããã«ãªã£ãŠããã
äž»ãªå€æŽç¹
@eatkins ããã«ãã read line ãšãæååŠçãŸããã®æ§ã
ãªå€æŽãäŸãã°ãsbt new
ã§æåããšã³ãŒãããŠããªãåé¡ãªã©ã
Scala.JS ã§ã® Scala 2.13-3.0 ãµã³ãã€ããã®ä¿®æ£ #5984 by @xuwei-k
shellPrompt
ãšã release*
ããŒãªã© build lint æã®èŠåã®ä¿®æ£ #5983 /#5991 by @xirc and @eed3si9n
plugins
ã³ãã³ãã®åºåããµããããžã§ã¯ãã§åããããã«ããæ¹å #5932 by @aaabramov
ãã®ä»ã¯ https://github.com/sbt/sbt/releases/tag/v1.4.1 ãåç
§
2020-10-19
/ scala
æ¬çš¿ã¯ ScalaMatsuri Day 2 ã¢ã³ã«ã³ãã¡ã¬ã³ã¹ã§ OSS ããã«ãœã³ãä»®æ³åããããšã®ã¬ããŒãã ã誰ããã¢ã³ã«ã³ãã¡ã¬ã³ã¹ã®ãããã¯ãšããŠææ¡ããããããåã¯æäŒã§ãã¡ã·ãªããŒã¿ãŒãšããŠç³ãåºãã ããªã®ã§äºåæºåã¯ç¹ã«ç¡ããå
ã
㯠4æé (JST æ£å - 4pmãEDT 11pm - 3am) ã§æ ãããã£ãããããŸãåã£ãã®ã§ã³ãŒããŒãã¬ã€ã¯ã®åŸãæ°æéç¶ããã
ã¢ã³ã«ã³ãã¡ã¬ã³ã¹ããããšãã«ãã€ã匷調ããŠãã®ã¯ãäºæ¬è¶³ã®æ³åãã§:
ãã€ã§ãèªåã«ãšã£ãŠãã®å Žããã®ãåŠã³ããèªåããå Žãžã®ãè²¢ç®ããç¡ããªãšæããå Žå: èªåã®äºæ¬è¶³ã䜿ã£ãŠå¥ã®å Žãžç§»åããããš
ãªã³ã©ã€ã³ã®ã¢ã³ã«ã³ãã¡ã¬ã³ã¹ã§ãè€æ°ã®ã»ãã·ã§ã³ãè¡ãããŠããã®ã§å¥ã®ããŒã¯ãèŠãããã«æãããéäžããåå ããããšã¯èªç±ã§ããããšãäºåã«äŒããã
䜿ã£ããã®
Zoom Meeting
Discord
Google Docs
äž»ãªã³ãã¥ãã±ãŒã·ã§ã³ã¯ ScalaMatsuri ãçšæããŠãã Zoom Meeting ã䜿ã£ããããã§ç°ãªãåå è
ãèªåã®ç»é¢ãå
±æããã質åããããã§ãããæœåšçãªåé¡ãšããŠã¯ãå
šå¡ãä»ã®äººå
šå¡ãèãããç¶æ
ã«ãªãã®ã§ãè€æ°ã®ã°ã«ãŒããåæã«ãã¢ããã°ã©ã ãããããšãã£ãç¶æ³ã«ã¯åããªãã
ããã¹ãããŒã¹ã®ã³ãã¥ãã±ãŒã·ã§ã³ãšããŠã¯ Discord ã䜿ã£ããDiscord ã¯ãªã³ã¯ãå
±æãããã質åããããã«ã䜿ããåãã¡ã¯ãããªãã£ãããDiscord ã®ãã€ã¹ãã£ã³ãã«ã䜿ã£ãŠç»é¢ã®å
±æ ãå¯èœãªã®ã§ãããžã§ã¯ãæ¯ã«ãã€ã¹ãã£ã³ãã«åããããšãã䜿ãæ¹ãã§ãããšæãã
ãããžã§ã¯ããš GitHub issue ã®åæãã©ã®äœæ¥ããããã®ãã®ãµã€ã³ã¢ããã«ã¯ Google Doc äžæã䜿ã£ãã
æµã
ã¡ã³ã¿ãŒãã§ãããããžã§ã¯ãã¡ã³ããã®äººãåå ããŠãããèã
ãããžã§ã¯ãã¡ã³ããã¯ä»ã®äººãæãä»ãããã good first 㪠GitHub issue ã Google doc ã«æžããŠãZoom ã§ãã®ç°¡åãªèª¬æãããã
åå è
㯠issue ã®é£ã«èªåã®ååãæžããŠãµã€ã³ã¢ãããã (ãã¢ã§äžã€ã® issue ã«åãçµãããšãå¯)
ãããžã§ã¯ãã¡ã³ããã¯åäœãã¹ããšçµ±åãã¹ã (scala/scala ã ãš partestãsbt/sbt ã ãš scripted) ã®èµ°ããæ¹ã解説
èªåãå
±åäœæ¥ããå Žåã¯ãããžã§ã¯ãã¡ã³ããã¯ãã£ãšãã£ã¬ã³ãžã³ã°ãªã¿ã¹ã¯ãææ¡ããŠããã
人ã®åºå
¥ããããã®ã§ãäžèšããªããŒã
åºæ¬çã«ã¯ãã¥ãŒãããŠããã¯
ãã¡ã·ãªããŒã¿ãŒã¯ãçãäœæ¥ãããã®ããããã©ããã®ç¢ºèªãå®æçã«è¡ã
誰ããã¿ã¹ã¯ãå®äºãããæåã§ã倱æã§ã Zoom ã§è»œãçºè¡šããã(åå è
ãå€ãå Žåã¯ããã¯1æ¥ã®æåŸã«ãã£ãŠããã)
scala/scala
Scala ã®ã³ã³ãã€ã©ãæšæºã©ã€ãã©ãªãéçºããã scala/scala ã«ã³ã³ããªãã¥ãŒãã«èå³ããã人ãå€ãã£ããæãããªãã°ä¿®æ£ãããªãå Žå㯠scala/scala ãžã®ãã«ãªã¯ã¯æ°ã¶ææŸçœ®ããããããå¯èœæ§ãããæšã泚æããã
2020-10-18
/ scala
ScalaMatsuri 2020 㧠‘èªç±ãå¹³çãããã¯ã¹åãããããªããã£ãå’ ãšããããŒã¯ã§ç»å£ããŸããã
2020-08-24
/ sbt
sbt-projectmatrix 㯠sbt ã®ã¯ãã¹ãã«ããæ¹åããããã«ãåãå®éšãšããŠäœã£ãŠãããã©ã°ã€ã³ã§ãæ¬çš¿ã¯ç¬¬1å ã第2å ã第3å ã«ç¶ã第4匟ã ã0.6.0 ããªãªãŒã¹ããã®ã§ããã§çŽ¹ä»ããã
ãããã: è€æ°ã® Scala ããŒãžã§ã³ã«å¯Ÿãããã«ã
sbt-projectmatrix ããã«ãã«è¿œå åŸã以äžã®ããã«ã㊠2ã€ã® Scala ããŒãžã§ã³ã䜿ã£ããããªãã¯ã¹ãã»ããã¢ããããã
ThisBuild / organization : = "com.example"
ThisBuild / scalaVersion : = "2.12.10"
ThisBuild / version : = "0.1.0-SNAPSHOT"
lazy val core = ( projectMatrix in file( "core" ))
. settings(
name : = "core"
)
. jvmPlatform( scalaVersions = Seq ( "2.12.12" , "2.13.3" ))
Read MoreâŠ
2020-08-17
æ¬æ¥ä»ã㧠Twitter ã® Build Team ã«å
¥ç€ŸããŸãããäžçäžã«ãã Twitter 瀟ã®ããããããŒããµããŒããã次äžä»£ãã«ãã»ã·ã¹ãã ã®æ§ç¯ã«é¢ããããšã«ãªããŸãã
ãã®ããŒã ã¯ã¢ããªãã»ãã«ãããŒã«ã§ãã Pants ã®éçºã«é¢ãã£ãŠããŠã瀟å
ã®ã·ã¹ãã ã Bazel ãžç§»è¡ãããã®ãåœé¢ã®è²¬åãšãªããšæããŸããããããããŒã»ãšã¯ã¹ããªãšã³ã¹ãéçºå¹çãšããããšã«é¢ããŠç±ãæããæã£ãŠããããŒã ãšäžç·ã«åãããšãããåãé¡ã£ãŠããä»äºãªã®ã§ãããŒã ã®äººãã¡ãæ°ãã課é¡ãšã®åºäŒãã楜ãã¿ã«ããŠããŸãã
ãŸãããã®å ŽãåããŠéæž¡æã« DM ãªã©ã§ã倧äžå€«ã«ããŠãããšãã瀟å
ã§åã®ããšãæšèŠããŠããããããããžã§ã¯ãã®ãªãã¡ãŒãªã©è²ã
声ããããŠãããçããã«æè¬ãããã§ãããããªå£°ããã£ãã®ã§å
æ°ã«ãã£ãŠãããŸãããããããšãããããŸãã4æ ã«çŸ©åãµããã£ã«ã«ãå§ãŸã£ãŠããããããŸã§æéãç¡ããŠã§ããªãã£ããã«ããã£ãã·ã¥ ãšã Selective functor ã¿ãããªäœæ¥ãããããScala Center ã®çŽ æŽãããæ¹ã
ãšã³ã©ãããããšãã§ããã®ã§ãããããæå³ã§ã¯è²ã
è¯ãã£ããªãšæããŸãã
EE Build team ã¯ãSan Francisco, Remote USããšãããã±ãŒã·ã§ã³ãããŸã åéäž ã¿ãããªã®ã§ãèå³ã®ãã人ã¯å¿åããŠäžç·ã«äœæ¥ããŸãããã
2020-08-08
/ sbt
æ¬çš¿ã§ã¯ Ãlafur ããã® olafurpg/sbt-ci-release ã䜿ã£ãŠ sbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ãèªååããŠã¿ããsbt-ci-release ã® README 㯠Sonatype OSS åãã®æ®éã®ã©ã€ãã©ãªã®ãªãªãŒã¹ãåæã«æžãããŠãããsbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ã«å¿
èŠãªå·®å以å€ã®è©³çŽ°ã¯ README ãåç
§ããŠã»ããã
ãªãªãŒã¹ãèªååããããšãã®ãã®ããã¹ãã»ãã©ã¯ãã£ã¹ã ããsbt ãã©ã°ã€ã³ã®ãªãªãŒã¹ã«é¢é£ããŠç¹ã«å¬ããããšãããããã®æ¹æ³ã䜿ãããšã§ Bintray ã® sbt organization ã«ãŠãŒã¶ãŒãè¿œå ããã«ãè€æ°äººã§ sbt ãã©ã°ã€ã³ã®ãªãªãŒã¹æš©éãå
±æããããšãå¯èœãšãªããããã¯ä»äºã§ã¡ã³ãããŠãããã©ã°ã€ã³ããããšãã«äŸ¿å©ã ã
step 1: sbt-ci-release
sbt-release ã䜿ã£ãŠããå Žåã¯åé€ãããsbt-ci-release ãè¿œå ããã
addSbtPlugin( "org.foundweekends" %% "sbt-bintray" % "0.5.6" )
addSbtPlugin( "com.geirsson" % "sbt-ci-release" % "1.5.3" )
version.sbt
ãåé€ããã
2020-07-09
2020-05-31
sbt 1.3.12 ããããªãªãŒã¹ãã¢ããŠã³ã¹ããããªãªãŒã¹ããŒãã®å®å
šçã¯ããã«ãã - https://github.com/sbt/sbt/releases/tag/v1.3.12 ã
ç¹ã« Scala Center ã«ã瀌ãèšãããããã°å ±åãpull request ã¬ãã¥ãŒãã³ã³ããªãã¥ãŒã·ã§ã³ãã¡ãããšæ£ããæã«è¡ãããªã©ã¡ã³ã掻åãè¡ãã«ã¯ããçšåºŠæéãããããã5æäžã® sbt ã®ã¡ã³ã掻å㯠Scala Center ãã¹ãã³ãµãŒããŠããããDaryja ããå§ã Scala Center ã®ã¡ã³ããŒã¯çæ°è»œã«å
±åäœæ¥ãããã人ãã¡ã ã
sbt 1.3.11 ããã®å€æŽç¹
sbt 1.3.11 㧠launcher çµ±ååšãã«ãªã°ã¬ãã·ã§ã³ããããrepositories
ãã¡ã€ã«ãç¡èŠããããšãã圢ã®ãã°ãåºããsbt 1.3.12 ã¯ãããä¿®æ£ããã #5583
ã¢ããã°ã¬ãŒãæ¹æ³
é垞㯠project/build.properties
ã
sbt.version=1.3.12
ãšæžãæããã ã㧠ok ã ããããããªãªãŒã¹ã«ã¹ã¯ãªããã®ä¿®æ£ãå«ãŸããŠããå ŽåãããããŸãå
šãŠã® JAR ãã¡ã€ã«ãäºãå
¥ã£ã *.(zip|tgz|msi)
ã䜿ã£ãã»ããååã®äŸåæ§è§£æ±ºãéããªãããã€ã³ã¹ããŒã©ãŒã䜿ã£ãã€ã³ã¹ããŒã«ãæšå¥šãããã€ã³ã¹ããŒã©ãŒã¯ SDKMAN ãªã©ã«å
¬éãããã
sdk upgrade sbt
Homebrew ã«é¢ãã泚æ
Homebrew ã®ã¡ã³ããã¯ãã£ãš brew äŸåæ§ã䜿ããããšããçç±ã§ JDK 13 ãžã®äŸåæ§ãè¿œå ãã brew#50649 ããã®ãããPATH ãéã£ãŠãã java
ã JDK 8 ã 11 ã§ãã£ãŠã sbt ã JDK 13 ã§å®è¡ãããããã«ãªã£ãŠããŸãã
2020-05-29
/ sbt
sbt 1.3.11 ããããªãªãŒã¹ãã¢ããŠã³ã¹ããããªãªãŒã¹ããŒãã®å®å
šçã¯ããã«ãã - https://github.com/sbt/sbt/releases/tag/v1.3.11 ã
ç¹ã« Scala Center ã«ã瀌ãèšãããããã°å ±åãpull request ã¬ãã¥ãŒãã³ã³ããªãã¥ãŒã·ã§ã³ãã¡ãããšæ£ããæã«è¡ãããªã©ã¡ã³ã掻åãè¡ãã«ã¯ããçšåºŠæéãããããã5æäžã® sbt ã®ã¡ã³ã掻å㯠Scala Center ãã¹ãã³ãµãŒããŠããããDaryja ããå§ã Scala Center ã®ã¡ã³ããŒã¯çæ°è»œã«å
±åäœæ¥ãããã人ãã¡ã ã
ã¢ããã°ã¬ãŒãæ¹æ³
é垞㯠project/build.properties
ã
sbt.version=1.3.11
ãšæžãæããã ã㧠ok ã ããããããªãªãŒã¹ã«ã¹ã¯ãªããã®ä¿®æ£ãå«ãŸããŠããå ŽåãããããŸãå
šãŠã® JAR ãã¡ã€ã«ãäºãå
¥ã£ã *.(zip|tgz|msi)
ã䜿ã£ãã»ããååã®äŸåæ§è§£æ±ºãéããªãããã€ã³ã¹ããŒã©ãŒã䜿ã£ãã€ã³ã¹ããŒã«ãæšå¥šãããã€ã³ã¹ããŒã©ãŒã¯ SDKMAN ãªã©ã«å
¬éãããã
sdk upgrade sbt
Homebrew ã«é¢ãã泚æ
Homebrew ã®ã¡ã³ããã¯ãã£ãš brew äŸåæ§ã䜿ããããšããçç±ã§ JDK 13 ãžã®äŸåæ§ãè¿œå ãã brew#50649 ããã®ãããPATH ãéã£ãŠãã java
ã JDK 8 ã 11 ã§ãã£ãŠã sbt ã JDK 13 ã§å®è¡ãããããã«ãªã£ãŠããŸãã
2020-05-24
/ scala
Jar Jar Abrams ã¯ãJava ã©ã€ãã©ãªãã·ã§ãŒãã£ã³ã°ãããŠãŒãã£ãªãã£ã§ãã Jar Jar Links ã®å®éšç Scala æ¡åŒµã ã
ã©ã€ãã©ãªäœè
ã«ãšã£ãŠä»ã®ã©ã€ãã©ãªã¯è«žåã®å£ã ãä»ã®ã©ã€ãã©ãªã䜿ãããšã¯äœæ¥ã®äºéåãé¿ããä»ã®ã©ã€ãã©ãªã䜿ããããªããšããã®ã¯ããã«ã¹ã¿ã³ããŒããšèšãããããªãããããããã®äžæ¹ã§ãã©ã€ãã©ãªãè¿œå ãã床ã«ããã¯ãŠãŒã¶åŽã«ãããšéæ¥çäŸåæ§ãè¿œå ãããããšã«ãªããè¡çªãèµ·ããå¯èœæ§ãäžããããšã«ãªããããã¯åäžã®ããã°ã©ã å
ã«ãã㊠1ã€ã®ããŒãžã§ã³ã®ã©ã€ãã©ãªããæãŠãªãããšã«ãããã
ãã®ãããªè¡çªã¯ããã°ã©ã ãã©ã³ã¿ã€ã ããã¬ãŒã ã¯ãŒã¯äžã§å®è¡ãããå Žåã«ããèµ·ãããsbt ãã©ã°ã€ã³ããã®äŸã ãSpark ãããã1ã€ã®ç·©åçãšããŠéæ¥çã©ã€ãã©ãªãèªåã®ããã±ãŒãžã®äžã«ã·ã§ãŒãã£ã³ã°ãããšããæ¹æ³ãããã2004幎㫠herbyderby (Chris Nokleberg) ãã㯠Jar Jar Links ãšããã©ã€ãã©ãªãåããã±ãŒãžåããããŒã«ãäœã£ãã
2015幎㫠Wu Xiang ããã Jar Jar Links ã䜿ã£ãã·ã§ãŒãã£ã³ã°ã®ãµããŒãã sbt-assembly ã«è¿œå ãããããã¯ååããªäžæ©ã ã£ããã課é¡ãæ®ã£ãŠãããåé¡ã® 1ã€ã¯ Scala ã³ã³ãã€ã©ã¯ ScalaSignature æ
å ±ã *.class
ãã¡ã€ã«ã«åã蟌ãããJar Jar ããã®ããšãç¥ããªãããšã ã2020幎ã«ãªã£ãŠ Simacan 瀟㮠Jeroen ter Voorde ããã ScalaSignature ã®å€æã sbt-assembly#393 ã«ãŠå®è£
ãããsbt 以å€ã§ãããã¯åœ¹ã«ç«ã€ãããããªãã®ã§ãç¬ç«ããã©ã€ãã©ãªã«æãåºãããããã Jar Jar Abrams ã ã
core API
ã³ã¢ã«ã¯ shadeDirectory
é¢æ°ãå®è£
ãã Shader
ãªããžã§ã¯ããããã
2020-05-16
/ sbt
sbt ã³ã¢ã»ã³ã³ã»ãã ã®ããŒã¯ããããšãå㯠sbt ãã«ãžã¥ã¢ã«ã«é¢æ°åãªãã«ãã»ããŒã«ãšèšã£ãŠãããé¢æ°åããã°ã©ãã³ã°ã® 2ã€ã®ç¹åŸŽãšããŠããŒã¿ãå€åãããã®ã§ã¯ãªã immutable (äžå€)ãªããŒã¿æ§é ã䜿ãããšãšããã€ãã©ã®ããã«ã㊠effect (äœçš) ãåãæ±ããã«æ°ã䜿ã£ãŠããããšãæããããã
ã»ããã£ã³ã°ãšã¿ã¹ã¯
ãã®èŠ³ç¹ããèŠããšãã»ããã£ã³ã°åŒãšã¿ã¹ã¯ã¯ãã® 2ç¹ã«åèŽããŠãããšèããããšãã§ãã:
ã»ããã£ã³ã°åã¯ãã«ãã®äžå€ã°ã©ãã圢æããã
ã¿ã¹ã¯ã¯äœçšãè¡šãã
å¿åã»ããã£ã³ã°ã¯ Initialize[A]
ã§è¡šããã以äžã®ããã«ãªã£ãŠãã:
sealed trait Initialize [ A ] {
def dependencies: Seq [ ScopedKey [ _ ]]
def evaluate( build: BuildStructure ) : A // approx
....
}
Read MoreâŠ
2020-05-12
/ sbt
build.sbt ã¯ãèªåçãªäžŠååŠçãè¡ãã¿ã¹ã¯ã»ã°ã©ããå®çŸ©ããããã® DSL ã ãã¿ã¹ã¯å士ã®ã¡ãã»ãŒãžã»ããã·ã³ã°ã¯ something.value
ãã¯ãã§è¡šããããã㯠Applicative åæ (task1, task2) mapN { case (t1, t2) => .... }
ããšã³ã³ãŒãããã
é·ãèµ°ã£ãŠãã task1
ããããšããéäžã§ task2
ãšéä¿¡ã§ããä»çµã¿ãããã°ãããšæã£ãŠããã
é垞㯠task1
ããµãã¿ã¹ã¯ã«åããããšã§ããã解決ããããããããããå®è£
ããã®ã¯äžççžã§ã¯ãããªãããšããããäŸãã°ãZinc ã«ååã ãã³ã³ãã€ã«ããŠãæ®ãã¯åŸã§ç¶ããŠäžãã? ããã㯠Coursier ã«è§£æ±ºã ãè¡ã£ãŠå®éã®ããŠã³ããŒãã¯åŸã§ãšã©ãèšãã°ããã ããã?
ãããå°ãšã㊠task1
ãäœããã® JSON ãã¡ã€ã«ãçæããŠãtask2
ã¯ãã¡ã€ã«ãçŸãããŸã§åŸ
ã£ãŠããããèªã¿èŸŒããšããããæ¹ãèãããããJSON ãã¡ã€ã«ã®ä»£ããã« Promise[A]
ã®ãããªäžŠè¡ããŒã¿æ§é ã䜿ã£ãŠæ¹åããããšãã§ãããããããåŸ
æ©ãšããåä»ãªãã®ãæ®ã£ãŠãããsbt ã¯äžŠåã«å®è¡ããã¿ã¹ã¯ã®æ°ãéã£ãŠããã®ã§ãåŸ
æ©ã®ããã«æ ã䜿ãã®ã¯ãã£ãããªããDaniel ããã® Thread Pools ã«ãã®èŸºãã®äºãè¯ããŸãšãŸã£ãŠãããä»åããã®ã¯å·®ãåœããäœæ¥ãäžåè¡ããªãããããã³ã° IO ããŒãªã³ã°ãšèããããšãã§ãããšæãã
Def.promise
scala.concurrent.Promise
ã®ã©ãããŒãå®è£
ã㊠Def.promise
ãšåŒãã ãå
·äœäŸã§èª¬æãã:
val midpoint = taskKey[ PromiseWrap [ Int ]]( "" )
val longRunning = taskKey[ Unit ]( "" )
val task2 = taskKey[ Unit ]( "don't call this from shell" )
val joinTwo = taskKey[ Unit ]( "" )
// Global / concurrentRestrictions := Seq(Tags.limitAll(1))
lazy val root = ( project in file( "." ))
. settings(
name : = "promise" ,
midpoint : = Def . promise[ Int ],
longRunning : = {
val p = midpoint. value
val st = streams. value
st. log. info( "start" )
Thread . sleep( 1000 )
p. success( 5 )
Thread . sleep( 1000 )
st. log. info( "end" )
},
task2 : = {
val st = streams. value
val x = midpoint. await. value
st. log. info( s"got $x in the middle" )
},
joinTwo : = {
val x = longRunning. value
val y = task2. value
}
)
Read MoreâŠ
2020-05-06
/ sbt
Google ã®ãã«ãã€ã³ãã© Blaze (çŸåšã¯ Bazel ãšããŠãªãŒãã³ãœãŒã¹åãããŠãã) ã®ããšãç¥ã£ãŠãã Scala ã®ããŒã«ãã§ã€ã³ã«ã䌌ããããªä»çµã¿ã欲ãããšãã£ãšæãç¶ããŠãããããã¯ç¹ã«ç¬åµçãªçºæ³ãšããèš³ã§ã¯ç¡ããPeter Vlugter ãããš Ben Dougherty ããã® nailgun Zinc ã§ã®æ©èœ (Pants ã§äœ¿ãããŠãã?) ããKrzysztof Romanowski ããã® Hoarder ãªã©å
è¡ç 究ãããããããã¯ãäœæ¥ãã£ã¬ã¯ããªã«åãã㊠Zinc Analsis ãã¡ã€ã«å
ã«æ ŒçŽãããŠãã絶察ãã¹ãå€æãããšããã¢ã€ãã£ã¢ããæãç«ã£ãŠããã
åã®äœæ¥ã®è©³çŽ°ã«å
¥ãåã«ãåé¡ã¹ããŒã¹ããã£ãšãã¢ãããã
ãã«ãã®ãã·ã³äŸåæ§
Akka ã® akka-actor/compile
ã sbt 1.3.10 ã§ãã«ããããšãã®ããã«ãªã:
cd ~/work/quicktest/
git clone git@github.com:akka/akka.git akka-0
cd akka-0
sbt
akka > akka-actor/compile
[ info] Generating 'Tuples.scala'
[ info] Generating 'Functions.scala'
[ info] Updating
[ info] Resolved dependencies
[ info] Updating
[ info] Formatting 22 Java sources...
[ info] Reformatted 0 Java sources
[ info] Compiling 191 Scala sources and 28 Java sources to /Users/eed3si9n/work/quicktest/akka-0/akka-actor/target/scala-2.12/classes ...
....
[ success] Total time: 39 s, completed May 6, 2020 1:53:36 PM
Read MoreâŠ
2020-04-14
/ sbt / scala
Zinc 1.4.0-M1 ããªãªãŒã¹ãããããã¯ããŒã¿çã§ãã£ãŠå°æ¥ã® 1.4.x ãšã®äºææ§ã¯ä¿èšŒãããªãããšã«æ³šæããŠã»ããããã ã1.3.x ãšæ¯èŒçè¿ãã³ããããéžãã ã®ã§å®çšæ§ã¯é«ãã¯ãã ã
Zinc 㯠Scala ã®ããã®å·®åã³ã³ãã€ã©ã ãZinc 㯠Scala 2.10 ~ 2.13 ãš Dotty ãã³ã³ãã€ã«ããããšãå¯èœã ãããããŸã§ã®æ Zinc ãã®ãã®ã¯ Scala 2.12 ã§å®è£
ãããŠããããã㯠Scala 2.12 ã§å®è£
ãããŠãã sbt 1.x ãšããŠã¯åé¡ç¡ãããZinc ã 2.13 ã§ãã¯ãã¹ãã«ãããŠæ¬²ãããšããèŠæã¯åãããã£ãã
ã©ããã Gatling 㯠Zinc ãã©ã€ãã©ãªãšããŠäœ¿ã£ãŠããããããGatling ã®ã³ã¢éçºè
ã® Stephane Landelle ããã¯ã¢ããããŒãã«å¿
èŠãªããããéã£ãŠããããæåŸã«åãããå¿
èŠããã£ãäœæ¥ã¯å
¥ãçµãã ãµããããžã§ã¯ãã解ãã»ãããŠåé
ç·ããããšã ããããã«ã¯åãæšæ¥æžãã sbt-projectmatrix ã䜿ã£ãã
2020-04-13
/ sbt
sbt-projectmatrix 㯠sbt ã®ã¯ãã¹ãã«ããæ¹åããããã«ãåãå®éšãšããŠäœã£ãŠãããã©ã°ã€ã³ã§ãæ¬çš¿ã¯åã
å ãåå ã«ç¶ã第3匟ã ã0.5.0 ããªãªãŒã¹ããã®ã§ããã§çŽ¹ä»ããã
ãããã: è€æ°ã® Scala ããŒãžã§ã³ã«å¯Ÿãããã«ã
sbt-projectmatrix ããã«ãã«è¿œå åŸã以äžã®ããã«ã㊠2ã€ã® Scala ããŒãžã§ã³ã䜿ã£ããããªãã¯ã¹ãã»ããã¢ããããã
ThisBuild / organization : = "com.example"
ThisBuild / scalaVersion : = "2.12.10"
ThisBuild / version : = "0.1.0-SNAPSHOT"
lazy val core = ( projectMatrix in file( "core" ))
. settings(
name : = "core"
)
. jvmPlatform( scalaVersions = Seq ( "2.12.10" , "2.11.12" ))
Read MoreâŠ
2020-04-08
2014幎3æã« Lightbend瀟 (åœæ Typesafe瀟) ã«å
¥ç€Ÿãããä¿¡ããããªããã㪠6幎ã®åŸã2020幎4æ7æ¥ããã£ãŠéè·ãšãªã£ããLightbendãããŒãããŒå瀟ã顧客ããããŠã«ã³ãã¡ã¬ã³ã¹ãªã©ã§åºäŒã£ãè²ããªäººãšã€ãªãããæã£ããäžç·ã«äœæ¥ããæ©äŒãããããã®ã¯æè¬ããŠãããæ¯ãè¿ããš COVID-19åã®æ代ã§ãšãŒããããã¢ãžã¢ãåç±³ãªã©ãæ°ã¶æããšã«é£ã³åã£ãŠã«ã³ãã¡ã¬ã³ã¹ã«åºãã瀟å
å宿ãè¡ã£ãŠããã®ãçŸå®é¢ãããŠæããã
以äžã¯éå»6幎ã®ç°¡åãªæ¯ãè¿ãã ã
2014
Scala ã趣å³ã§å§ããã®ã¯ 2009幎ã®çµããé ãªã®ã§ã2014幎ã®æç¹ã§ã¯ 4幎ãããã¯æžããŠããã®ã§ã¯ãªãããäžåºŠãç¬ç¿ Scalazããçµãã£ãŠãé¢é£ãããã¿ã§æåã® nescala ã®ããŒã¯ãè¡ã£ãã10åãããã® sbt ãã©ã°ã€ã³ãäœã£ãŠãStackoverflow ã§ãè¯ã掻åããŠãã
3æã« Lightbend瀟ã®ããŒãªã³ã°ããŒã (åœæ㯠Typesafe瀟ãQ課ã) ã«å
¥ç€Ÿãããåœæã®ã¡ã³ããŒã¯ Josh Sereth ãš Toni CuneiãJosh ãš sbt ã®ã¡ã³ããããã®ã¯ç¢ºãã«ä»äºã®åæ
ã ãã©ããä»äºã¯æŠç¥ãããã¯ãé£é¢ãšããããåŠã³ã®å€ã顧客ããªãã³ãªãã®ã倧åã ã£ããå
¥ç€ŸããçŽåŸã«é¡§å®¢å
ã«åœå
ç·ã§é£ãã§ãApache Ivy ã®ã³ãŒããèªãã ããããã¡ã€ãªã³ã°ãããããã®ãèŠããŠãããæåã¯é¢é£ãã£ãããããã« sbt ã®äžã§ã¯ã©ã€ãã©ãªäŸåæ§åšããæãæ
£ãããã«ãªã£ãã
2014幎5æã«ã¯ sbt ã®ããŒãžã§ã³çªå·ã 0.13.2 ãã 0.13.5 ãšé£ã°ã㊠sbt 1.x ã·ãªãŒãºã®ãã¯ãããžãŒã¬ãã¥ãŒ ãšãããå¿
èŠãªæ©èœãå®éšçã«å°å
¥ããŠããããšã§ sbt 1.x ãšã®å·®ã倧ãããªãéããªãããã«ãããšããã¢ã€ãã£ã¢ã ã£ãã
sbt 0.13.6 ã«ãªã£ãŠãæªè§£æ±ºã®äŸåæ§ã®ãšã©ãŒã足ããªãäŸåæ§ã®æšã§è¡šç€ºããããeviction warningãupdateOptions
ã§ã® withLatestSnapshots
ãªã©åãè¿œå ããã©ã€ãã©ãªäŸåæ§åšãã®æ©èœãåºãŠããããã«ãªãã
2014幎åŸåã«ã¯ Q課㯠Typesafe Reactive Platform v1 ã®ããã®ã€ã³ãã©äœããè¡ã£ãããã㯠Toni ãå®è£
ãã Dbuild ãå
ã«ããåçšé
åžããã±ãŒãžã ã
2020-04-05
å
é± ã¯ãScala ã§ãŠãŒã¶ã©ã³ãããèŠåãåºãä»çµã¿ã®ææ¡ã§ãã #8820 ã«ã€ããŠæžãããäŸãšã㊠ApiMayChange
ã¢ãããŒã·ã§ã³ãå®è£
ããã
package foo
import scala.annotation.apiStatus, apiStatus. _
@apiStatus (
"should DSL is incubating, and future compatibility is not guaranteed" ,
category = Category . ApiMayChange ,
since = "foo-lib 1.0" ,
defaultAction = Action . Warning ,
)
implicit class ShouldDSL ( s: String ) {
def should( o: String ) : Unit = ()
}
Read MoreâŠ
2020-03-29
/ scala
äžã©ã€ãã©ãªäœè
ãšããŠãScala ã§ã¡ãœãããã¿ã°ä»ãããŠã«ã¹ã¿ã ã®ã³ã³ãã€ã©èŠåããšã©ãŒãçºåã§ãããšãããªãšåããæã£ãŠãããäœæ
æå³çã«ã³ã³ãã€ã©ãšã©ãŒãåºãå¿
èŠãããã®ããšæããããããªããäžã€ã®ãŠãŒã¹ã±ãŒã¹ãšããŠã¯ãAPI ãå»æ¢ããåŸã§ãã€ã°ã¬ãŒã·ã§ã³ã®ããã®ã¡ãã»ãŒãžã衚瀺ãããããšã ã
åã¯ããã Restligeist macroãã€ãŸãå°çžéãã¯ããšåŒãã§ãããäŸãã°ãsbt 1.3.8 ã«ãã㊠<<=
ã䜿ããšä»¥äžã®ãšã©ãŒã¡ãã»ãŒãžãèµ·åæã«è¡šç€ºãããã
/ tmp/ hello/ build. sbt: 13 : error: `<<=` operator is removed. Use `key := { x.value }` or `key ~= (old => { newValue })`.
See http://www.scala-sbt.org/ 1 .x/docs/Migrating-from-sbt- 013 x.html
foo <<= test,
^
[ error ] sbt. compiler. EvalException : Type error in expression
[ error ] Use 'last' for the full log.
Project loading failed: ( r ) etry , ( q) uit, ( l) ast, or ( i) gnore?
Read MoreâŠ
2019-12-08
/ sbt
giter8.version
Giter8 0.12.0 ã« giter8-launcher ãšããå°ããªã¢ããªãè¿œå ããããã®ã¢ããªã®ç®ç㯠Giter8 ãã³ãã¬ãŒãã®æ¯ãèããäºæž¬å¯èœã«ããããšã«ãããçŸç¶ã ãšããã³ãã¬ãŒãäœè
ã Giter8 ããŒãžã§ã³ X ãæ³å®ããŠãã³ãã¬ãŒããäœã£ããšããŠããŠãŒã¶ãŒåŽã¯ “sbt new” ã«å梱ãããå¥ãª Giter8 ããŒãžã§ã³ Y ã䜿ã£ãŠå®è¡ãããŠããã
sbt ã®è¯ãã¢ã€ãã£ã¢ã®äžã€ã«ãŠãŒã¶ãŒãã©ã®ããŒãžã§ã³ã® sbt
ã¹ã¯ãªãããã€ã³ã¹ããŒã«ããŠããŠãã³ã¢ã® sbt ããŒãžã§ã³ã¯ãã«ãäœè
ã project/build.properties
ãã¡ã€ã«ã䜿ã£ãŠæå®ã§ãããšãããã®ããããããã«ãã£ãŠãèªåã®ãã·ã³ã§ããåäœããªããåé¡ã倧å¹
ã«æ¹åããããgiter8-launcher 㯠sbt ã«ããã sbt-launcher ã«åæ§ã®ãã®ã ãgiter8-launcher ã¯ãã³ãã¬ãŒãã®ã¯ããŒã³ããŠãproject/build.properties
ãã¡ã€ã«ãèªã¿èŸŒãã§ããã³ãã¬ãŒãã®ã¬ã³ããªã³ã°ã«çšããå®éã® Giter8 ããŒãžã§ã³ã決å®ããã
ãã³ãã¬ãŒãäœè
㯠project/build.properties
ãã¡ã€ã«ãçšããŠä»¥äžã®ããã« Giter8 ããŒãžã§ã³ãæå®ã§ãã:
giter8.version=0.12.0
2019-11-04
sbt-projectmatrix 㯠sbt ã®ã¯ãã¹ãã«ããæ¹åããããã«ãåãå®éšãšããŠäœã£ãŠãããã©ã°ã€ã³ã§ãæ¬çš¿ã¯åç¯ ã«ç¶ã第2匟ã ã0.4.0 ããªãªãŒã¹ããã®ã§ããã§çŽ¹ä»ããã
ãããã: è€æ°ã® Scala ããŒãžã§ã³ã«å¯Ÿãããã«ã
sbt-projectmatrix ããã«ãã«è¿œå åŸã以äžã®ããã«ã㊠2ã€ã® Scala ããŒãžã§ã³ã䜿ã£ããããªãã¯ã¹ãã»ããã¢ããããã
ThisBuild / organization : = "com.example"
ThisBuild / scalaVersion : = "2.12.10"
ThisBuild / version : = "0.1.0-SNAPSHOT"
lazy val core = ( projectMatrix in file( "core" ))
. settings(
name : = "core"
)
. jvmPlatform( scalaVersions = Seq ( "2.12.10" , "2.11.12" ))
Read MoreâŠ
2019-09-12
Pamflet ã¯çãææžãç¹ã«ãªãŒãã³ãœãŒã¹ã»ãœãããŠã§ã¢ã® ãŠãŒã¶ã»ããã¥ã¡ã³ããå
¬éããããã®ã¢ããªã ã
Pamflet 0.8.2 ã¯ã¢ãã¹ããŒã¹ã®ã¿ã€ããã§ã€ã¹ã SFMono ãžãšå€æŽããããŸããBlueprint ãã Bootstrap ã«ç§»è¡ãããšãã«äžæã«å°å
¥ããããã³ã¯ã®æåè²ãå
ã«æ»ãã
2019-07-29
/ scala
äŸåæ§ãªãŸã«ããŒ
äŸåæ§ãªãŸã«ã㌠(dependency resolver)ããããã¯ããã±ãŒãžãããŒãžã£ãŒã¯ããŠãŒã¶ãŒã«ãã£ãŠäžããããå¶çŽã®éåãå
ã«ççŸããªãã¢ãžã¥ãŒã«ã®éåã決å®ããããã°ã©ã ã ãéåžžãã®å¶çŽèŠä»¶ã¯ã¢ãžã¥ãŒã«åãšãããã®ããŒãžã§ã³çªå·ãå«ããJVM ãšã³ã·ã¹ãã ã«ããã Maven ã¢ãžã¥ãŒã«ã¯ organization (group id) ãæå®ã«çšããããããã®ä»ã®å¶çŽãšããŠãããŒãžã§ã³ç¯å²ãé€å€ã¢ãžã¥ãŒã«ãããŒãžã§ã³ãªãŒããŒã©ã€ããªã©ãããã
ããã±ãŒãžã³ã°ã¯å€§ãŸãã« OS ããã±ãŒãž (HomebrewãDebian packages ãªã©)ãç¹å®ã®ããã°ã©ãã³ã°èšèªã®ã¢ãžã¥ãŒã« (CPANãRubyGemãMaven ãªã©)ãç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã®ããã®ãšã¯ã¹ãã³ã·ã§ã³ (Eclipse ãã©ã°ã€ã³ãIntelliJ ãã©ã°ã€ã³ãVS Code extensions ãªã©) ã® 3ã€ã®ã«ããŽãªãŒãããã
äŸåæ§è§£æ±ºã®ã»ãã³ãã£ã¯ã¹
èãå§ãã®è¿äŒŒãšããŠã¢ãžã¥ãŒã«äŸåæ§ã DAG (æåéå·¡åã°ã©ã) ã ãšèããããšãã§ãããããã¯äŸåæ§ã°ã©ããããã㯠“deps graph” ãšåŒã°ããã以äžã®ãã㪠2ã€ã®ã¢ãžã¥ãŒã«äŸåæ§ããããšãã:
a:1.0
ãããã¯ããã« c:1.0
ã«äŸåããã
b:1.0
ãããã¯ããã« c:1.0
ãš d:1.0
ã«äŸåããã
+-----+ +-----+
|a:1.0| |b:1.0|
+--+--+ +--+--+
| |
+<-------+
| |
v v
+--+--+ +--+--+
|c:1.0| |d:1.0|
+-----+ +-----+
Read MoreâŠ
2019-05-17
/ sbt
çããããã«ã¡ã¯ãsbt ãããžã§ã¯ãã代衚ã㊠sbt 1.3.0-RC1 ãã¢ããŠã³ã¹ããŸãããã㯠sbt 1 ã®ãã£ãŒãã£ãŒãªãªãŒã¹ç¬¬3匟ã§ããã€ããªäºææ§ã¯ç¶æãã€ã€æ°æ©èœã«ãã©ãŒã«ã¹ãåœãŠããªãªãŒã¹ãšãªã£ãŠãããsbt 1 㯠Semantic Versioning ã«ããšã¥ããŠãªãªãŒã¹ãããã®ã§ããã©ã°ã€ã³ã¯ sbt 1.x ã·ãªãŒãºäžæ©èœããããšãæåŸ
ãããŠããã
2019幎3æ29æ¥ãŸã§ã«å€§ããªåé¡ãèŠã€ãããªããã°ã1.3.0-RC1 㯠1.3.0 final çãšãªãäºå®ã ã
sbt 1.3 ã®äž»ãªæ°æ©èœã¯ããã©ã«ãã§ã® Coursier ã䜿ã£ãã©ã€ãã©ãªç®¡çãClassLoader ã¬ã€ã€ãªã³ã°ãIO ã®æ¹åããã㊠super shell ã ããããã®æ©èœã®çµã¿åããããã«ãã®ãŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ãåäžããããšãé¡ã£ãŠããã
äºææ§ã«åœ±é¿ã®ããå€æŽç¹
Coursier ãçšããã©ã€ãã©ãªç®¡çã詳现ã¯åŸã»ã©ã
ClassLoader ã¬ã€ã€ãªã³ã°ã詳现ã¯åŸã»ã©ã
super shellã詳现ã¯åŸã»ã©ã
ãã«ãã³ãã³ãã®å
é ã«ã»ãã³ãã³ãèŠããªããªã£ããclean;Test/compile;
ã§åäœããããã«ãªã£ãã #4456 by @eatkins
sbt.internal.inc.ZincUtil
以äžã®é¢æ°ã§ LM ã䜿ããã®ã ZincLmUtil
ã«ç§»åããŠãZinc ãã LM ã«äŸåããªãããã«ãªã£ãã zinc#655 by @dwijnand
Coursier ãçšããã©ã€ãã©ãªç®¡ç
sbt 1.3.0 ã¯ã©ã€ãã©ãªç®¡çã« Coursier ãæ¡çšãããCoursier ã¯ãã©ã€ãã©ãªäŸå解決ãè¡ããã®ã§ Ivy ã«äŒŒãŠããããããé«éåãæ±ã㊠Alexandre Archambault ãã (@alexarchambault ) ã«ããäžãã Scala ã§ãªã©ã€ãããããã®ã ã
2019-05-10
/ sbt
å»å¹Ž sbt ã®ã¯ãã¹ãã«ããæ¹åããããã«ãsbt-projectmatrix ãšããå®éšçãã©ã°ã€ã³ãæžããã0.2.0 ããªãªãŒã¹ããã®ã§ããã§çŽ¹ä»ããã
è€æ°ã® Scala ããŒãžã§ã³ã«å¯Ÿãããã«ã
sbt-projectmatrix ããã«ãã«è¿œå åŸã以äžã®ããã«ã㊠2ã€ã® Scala ããŒãžã§ã³ã䜿ã£ããããªãã¯ã¹ãã»ããã¢ããããã
ThisBuild / organization : = "com.example"
ThisBuild / scalaVersion : = "2.12.8"
ThisBuild / version : = "0.1.0-SNAPSHOT"
lazy val core = ( projectMatrix in file( "core" ))
. settings(
name : = "core"
)
. jvmPlatform( scalaVersions = Seq ( "2.12.8" , "2.11.12" ))
Read MoreâŠ