2019-04-23
/ git
ãµããã£ã¬ã¯ããªãæ°ãããªããžããªãžåå²ããã (ã·ã³ãã«ãªå Žå)
git clone --no-hardlinks --branch master originalRepoURL childRepo
cd childRepo
git filter-branch --prune-empty --subdirectory-filter path/to/keep master
git remote remove origin
git prune
git gc --aggressive
originalRepoURL
ãmaster
ãpath/to/keep
ãªã©ã¯é©åœãªå€ã«å€ãããå
šãŠã®ãã©ã³ããåŠçãããå Žå㯠-- --all
ã䜿ãã
ãµããã£ã¬ã¯ããªãæ°ãããªããžããªãžåå²ããã (è€éãªå Žå)
è€æ°ã®ãã¹ããã£ã«ã¿ãŒãããå Žåã¯ã--index-filter
ãš brew install gnu-sed findutils
ã«ãã£ãŠã€ã³ã¹ããŒã«ã§ãã GNU xargs ãš GNU sed ã䜿ãå¿
èŠãããã
git clone --no-hardlinks --branch master originalRepoURL childRepo
cd childRepo
git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- path1/to/keep path2/to/keep' --prune-empty master
git filter-branch --prune-empty --parent-filter 'gsed "s/-p //g" | gxargs git show-branch --independent | gsed "s/\</-p /g"'
git remote remove origin
git prune
git gc --aggressive
Read MoreâŠ
2019-03-26
/ scala
ãã㯠Travis CI ã«èªå㧠JDK ãã€ã³ã¹ããŒã«ãã解説ã®ç¬¬2匟ã ã以åã¯ãjabba ã玹ä»ããã
ä»æ¥ã¯ SDKMAN! , ãšãããMarco Vermeulen (@marc0der ) ãããäœã£ãå
æ°ãªååã®ããŒã«ãèŠãŠãããããã¯ãJDK ã®ä»ã«ã GroovyãSparkãsbt ãªã© JVM äžã®æ§ã
ãªããŒã«ã察象ãšããç°å¢ãããŒãžã£ãŒã ã
AdoptOpenJDK 11 ãš 8
2020-09-23 æŽæ° : ããŒãžã§ã³çªå·ã®æ£èŠè¡šçŸãæŽæ°ããã
2019-11-06 æŽæ° : SDKMAN ã®æŽæ°ããã³ããã CI ããããã¯ããã®ãåé¿ããããã« sdkman_auto_selfupdate
ãè¿œå ããããŸããsdk install
ã®è¡ã« || true
ãè¿œå ããã
2019-07-08 æŽæ° : ãããããŒãžã§ã³ãèªåæ€ç¥ããããã«å€æŽãããå€ãç 㯠GitHub ã«çœ®ããŠããã
以äžã¯ SDKMAN! ã䜿ã£ãŠ Travis CI äžã§ AdoptOpenJDK 8 ãš 11 ãçšããŠã¯ãã¹ãã«ãããæ¹æ³ã :
dist : xenial
language : scala
scala : 2.12.10
matrix :
include :
- env :
- ADOPTOPENJDK=11
- env :
- ADOPTOPENJDK=8
before_install :
# adding $HOME/.sdkman to cache would create an empty directory, which interferes with the initial installation
- "[[ -d /home/travis/.sdkman/ ]] && [[ -d /home/travis/.sdkman/bin/ ]] || rm -rf /home/travis/.sdkman/"
- curl -sL https://get.sdkman.io | bash
- echo sdkman_auto_answer=true > /home/travis/.sdkman/etc/config
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
install :
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9]*\.[0-9]*\.hs-adpt" | head -1) || true
- unset _JAVA_OPTIONS
- unset JAVA_HOME
- java -Xmx32m -version
script : sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ++$TRAVIS_SCALA_VERSION! test
before_cache :
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
cache :
directories :
- $HOME/.cache/coursier
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.sdkman
Read MoreâŠ
2019-02-17
Docker å
㧠sbt ãèµ°ããããã£ãã®ã§ãã€ã¡ãŒãžãããã€ãäœã£ããGitHub ãªããžããªã¯ eed3si9n/docker-sbt ã
2019-01-03
幎æ«ã®é£äŒäžã« Pamflet ã® left TOC (ç®æ¬¡) ãå®è£
ããŠãPamflet 0.8.0 ãšããŠãªãªãŒã¹ããã
Pamflet ã¯çãææžãç¹ã«ãªãŒãã³ãœãŒã¹ã»ãœãããŠã§ã¢ã® ãŠãŒã¶ã»ããã¥ã¡ã³ããå
¬éããããã®ã¢ããªã ã
2018-12-17
/ scala
çŸè¡ã® Scala 2.13.0-M5 ã®ãŸãŸã§è¡ããšãscala.Seq
㯠scala.collection.Seq
ãã scala.collection.immutable.Seq
ã«å€æŽãããäºå®ã ãScala 2.13 collections rework ã«äœæ
ä»ãŸã§äžå€ãããªãã£ãã®ãã®è§£èª¬ãå°ãæžãããŠãããè¡éããæšãéããšãscala.Seq
ãããã©ã«ãã§äžå€ã«ãªãããšãåã¶ã¹ãã ãšèšã£ãŠãããã ãšæãã
ããã©ã«ãã§åãäžå€ã«ãªãããšã¯ã¢ããªãæ°ããæžãããã³ãŒãã«ã¯è¯ãããšã ãšæããã©ã€ãã©ãªäœè
ã«ãšã£ãŠã¯ããå°ããã¿ãã£ãŠãããããããªãã
ããªããã¯ãã¹ãã«ããããã©ã€ãã©ãªãæã£ãŠããŠ
ã©ã€ãã©ãªã®ãŠãŒã¶ãè€æ°ã® Scala ããŒãžã§ã³ã䜿ã£ãŠããŠ
ã©ã€ãã©ãªã®ãŠãŒã¶ã Array(...)
ã䜿ã£ãŠããå Žå
ãã®äžå€ Seq
ãžã®å€æŽã¯ãbreaking change ã€ãŸãéäºæ㪠API å€æŽãšãªãããã
倱æäŸãšããŠã¯ scopt/scopt#218 ããããåã scopt ã®ã¯ãã¹ãã«ããè¡ã£ãããargs
ãæž¡ããªããªã£ãããããScala 2.13.0-M5 ã«ãããŠã args
㯠Array[String]
ã®ãŸãŸã ã
ã·ã³ãã«ãªä¿®æ£ã¯å
šãŠã®ãœãŒã¹ã«ãã㊠scala.collection.Seq
ã import ããããšã ãåã欲ããã®ã¯ Seq
ã䜿ããšã³ã³ãã€ã«ãéããªããªãããšã ã
scala.Seq ã unimport ãã
ãŸãæåã«ãã£ãŠã¿ãã®ã¯ scala.Seq
ã unimport ããŠãscala.collection.Seq
ã scala.collection.immutable.Seq
ã®ã©ã¡ããã import ããããšã匷å¶ããããšã ã
2018-11-20
æè¡ã«ã³ãã¡ã¬ã³ã¹ã«ããã女æ§ã®åå ç (ããã®ä»ã®ããã¯ã°ã©ãŠã³ããæã€äººã®åå ç) ãæ¹åããã«ã¯ãåšèŸºã®ã«ã«ãã£ãŒãå€ããŠããå¿
èŠãããããã®ããã«ã¯ä»¥äžã® 2ç¹ã«é¢ããŠããããªãšããã·ã°ãã«åãšã³ãã¥ãã±ãŒã·ã§ã³ãå¿
èŠãšãã
ã«ã³ãã¡ã¬ã³ã¹ã§å¥³æ§åå è
ããã³ãããã®ã¯ãã¡
æè¡çãªèœåãåæãšããŠã女æ§åå è
ãšãããã§ãã·ã§ãã«ãã€å¯Ÿçã«æ¥ãã
ãããã¯å
šãŠã®ã«ã³ãã¡ã¬ã³ã¹ã«ãããŠåºèª¿è¬æŒã®åãšã瀟亀ã¿ã€ã ã®åã«ç¹°ãè¿ãé£çµ¡ãããã¹ãäºé
ã ã
2018-10-01
/ sbt
é±æ«äžã« sbt ã®ããã® super shell ã®å®è£
ããŸãšãŸã£ãŠããã®ã§ããã«å ±åããã倧ãŸããªæŠèŠãšããŠã¯ãã¿ãŒããã«ç»é¢ã®äž nè¡ãä¹ã£åã£ãŠä»èµ°ã£ãŠããã¿ã¹ã¯ã衚瀺ãããã
ãã°ãçŸç¶å ±åã«äœ¿ãããšã®éç
ãã°ã¯å€ãã®å Žé¢ã§æçšã§ãæãšããŠã¯äœãèµ·ãã£ãŠããããç¥ãããã®å¯äžã®çŸå®è§£ã§ãã£ãããããã ãã©ããsbt ã®ãããªã³ã³ãœãŒã«ã¢ããªã«ãããŠã¯ããã°ã䜿ã£ãŠãã«ãã»ãŠãŒã¶ã«çŸåšãªã«ãèµ·ãã£ãŠããããå ±åããã®ã¯ããŸããããªãããšãããã
仮㫠sbt ãäžåãã°ã衚瀺ããªãã£ããšãããšãsbt ãé·æéèµ°ãã¿ã¹ã¯ãå®è¡ããŠäžèŠåºãŸã£ãŠããŸã£ããšãã«äœãèµ·ããŠãããåãããªããªãããã®ãããupdate
ã®ãããªã¿ã¹ã¯ã¯ “Updating blabla subproject” ãš “Done updating” ãšãã£ãéå§ãçµäºãã°ã衚瀺ãããupdate
ã¿ã¹ã¯ã¯ãŠãŒã¶ããã«ãã«ãã£ãŠéåžžã«é·ãæéãããã£ãŠããŸãããšã§æåã ããå°ãªãã©ã€ãã©ãªäŸåæ§ãæã€ãã®ä»ã®å€ãã®ãã«ã㯠1s 以å
ã§å®äºããããã®ãããªå Žåããã«ãã®éå§æã« “Done updating” ããºã©ãŒããšå£ã®ããã«äžŠã¶ããšã«ãªãã
ã€ãŸãããã°è¡šç€ºãçŸç¶å ±åã«äœ¿ãã®ã¯ãã°ãåºãããŠããããç¶æ
ãšãæ
å ±ã足ããªããŠäžäŸ¿ãªäž¡æ¥µç«¯ã®éãæºããããšã«ãªãã
show your work (éäžåŒãæžãããš)
人çã«ãããå€ãã®äºãšåæ§ã«ããã£ãããšã®æ瀺æ¹æ³ããŠãŒã¶ãŒã»ã€ã³ã¿ãŒãã§ã€ã¹ã¯ãã®äœæ¥ãšããããã¯ããã®ãã®ã®å¿
èŠäžå¯æ¬ ãªåŽé¢ã§ãããç¹ã«ãã®äœæ¥ããããã¯ããèªæã§ç¡ããã®ã»ã©ãããé¡èã«ãªãã
åã¯ãsbt ãåäžã®ã³ãã³ãå®è¡å
ã«ãããŠã¿ã¹ã¯ã䞊ååŠçããããšãåœããåã®ããã«èããŠãããããããæè¿ã«ãªã£ãŠãã®äºãç¥ããªã人ãããå Žé¢ã«åºãããããšãå¢ããŠãããããã¯ãå®ã¯ãã£ãšããªããšã ããªããªãããã«ãã® DSL ããŠãŒã¶ã€ã³ã¿ãŒãã§ã€ã¹ã sbt ãã¿ã¹ã¯ã®äžŠååŠçãè¡ã£ãŠããããšãæããã«ããŠããªãããã ã
ããã«ãå€åã®ãŠãŒã¶ã sbt ãã¿ã¹ã¯ã䞊åå®è¡ããŠããããšãä¿¡ããŠãããšããŠããçŸåšã¯ã©ã®ã¿ã¹ã¯ãããã©ãŒãã³ã¹ã®ããã«ããã¯ã«ãªã£ãŠããã®ããç¥ãã®ãé£ãããäœããã®ãã©ã°ã€ã³ãäžå¿
èŠã« update
ãåŒã³åºãããããœãŒã¹ãäžåå€ãã£ãŠããªãã®ã«ããã»ã¹å€ã® Typescript ã³ã³ãã€ã©ãåŒã³åºãããããŠãããããããªãã
super shell
çŸåšå®è¡äžã®ã¿ã¹ã¯ã衚瀺ãã “super shell” ã¯ãããã®åé¡ã解決ããã1s 以å
ã«å®è¡ããã¿ã¹ã¯ã¯ç»é¢ã«ã¯è¡šç€ºããããé·æéèµ°ã£ãŠããã¿ã¹ã¯ã¯ã«ãŠã³ãã¢ããããæèšã衚瀺ãããã
åããŠåããã®ãããªæ©èœã«æ°ä»ããã®ã¯ Gradle ã® “rich console” ã ãBuck ããããå®è£
ããŠããŠã“super console” ãšåŒã°ããŠãããããã®ã§ãåããã®ååãåããããšã«ããã
2018-09-20
/ scala
ã³ã³ãã€ã«ããããããªããã°ã³ã³ãã€ã«ããªããèŠåãªã©ãããªããæè¿æ°ã«å
¥ã£ãŠãã Scala ã³ã³ãã€ã©ã®ãã©ã°ã¯ "-Xlint"
ãš "-Xfatal-warnings"
ã® 2ã€ã ã
以äžã¯ããµããããžã§ã¯ããšå
±ã«äœ¿ããã»ããã£ã³ã°ã®äŸã :
ThisBuild / scalaVersion : = "2.12.6"
lazy val commonSettings = List (
scalacOptions ++= Seq (
"-encoding" , "utf8" ,
"-deprecation" ,
"-unchecked" ,
"-Xlint" ,
"-feature" ,
"-language:existentials" ,
"-language:experimental.macros" ,
"-language:higherKinds" ,
"-language:implicitConversions"
),
scalacOptions ++= ( scalaVersion. value match {
case VersionNumber ( Seq ( 2 , 12 , _ *), _ , _ ) =>
List ( "-Xfatal-warnings" )
case _ => Nil
}),
Compile / console / scalacOptions --= Seq ( "-deprecation" , "-Xfatal-warnings" , "-Xlint" )
)
lazy val foo = ( project in file( "foo" ))
. settings(
commonSettings,
name : = "foo" ,
)
Read MoreâŠ
2018-09-15
/ git
GitHub ã® pull request ãäžå¿ã«äœæ¥ããŠãããšãããããšãããªããã©ã³ããããŒã«ã«ã«æºãŸã£ãŠãããæ¬çš¿ã§ã¯ããã®ãããªãããŒã«ã«ãã©ã³ããæé€ããæ¹æ³ãã¿ãŠã¿ãã
åºæ¬çã« 2ã€ã®æŠç¥ããããšæã:
“master” ãã©ã³ããéžãã§ãããã«ããŒãžæžã¿ã®ãã®ãåé€ãã
GitHub äžã§æ¢ã«ãã©ã³ãã¯åé€ãããŠããåæã§ããªã¢ãŒãã® “origin” ã«ã¯ããç¡ãããŒã«ã«ã®ãã©ã³ããåé€ãã
Erik Aybar ããã® Git Tip: Deleting Old Local Branches ãšããããã°èšäºã¯ç¬¬2ã®æ¹æ³ããšã£ãŠããã
git gone
git gone
ã¯ãErik Aybar ããã®ãã¯ããã¯ãããŒã¹ã«åãæžããã«ã¹ã¿ã git ã³ãã³ãã ãBash ã§ã¹ã¯ãªããæžãã®ã¯äžæ
£ããªã®ã§ Google ãšã Stackoverflow ãèŠãªããæžããããäžå¿åããŠãããŠãããšæããeed3si9n/git-gone ã«ãœãŒã¹ã貌ã£ãã®ã§ããã ~/bin
ãªã©é©åœãªå Žæã« git-gone
ãšããŠä¿åããã
2018-08-20
/ scala
æè¿ãªãããªã³ã³ãœãŒã«ã¢ããªã®ããšãèããããšãããããã è¡ãè¿œå ããŠããããããªããŠãã°ã©ããã£ãã¯çãªäºããã£ãŠããã¢ããªã ãå€åãããªã¹ãæžãããããã®æ
å ±ã¯éããã®ã§ããã«ãŸãšããŠããã
ANSI X3.64 control sequences
ã¿ãŒããã«ç»é¢ã®ä»»æã®äœçœ®ã«ããã¹ãã衚瀺ããããã«ã¯ããŸãã¿ãŒããã« (terminal) ãšã¯äœããç解ããå¿
èŠãããã1960幎代äžç€ã«å瀟㯠PDP-8 ãªã©ãã£ãããã³ã³ãã¥ãŒã¿ãŒãçºå£²ããããã㯠PDP-11 ãVAX-11 ãšç¶ãããããã¯å·èµåº«ãããã®å€§ããã®ã³ã³ãã¥ãŒã¿ãŒã§ããèšç®æ©ã»ã³ã¿ãŒãã賌å
¥ããRT-11 ãå
ç¥ UNIX system ãšãã£ããªãã¬ãŒãã£ã³ã°ã»ã·ã¹ãã ãèµ°ãããåæã«å€ãã®ãŠãŒã¶ (12 ~ æ°çŸäºº?) ããµããŒãããããšãã§ãããããã³ã³ãã¥ãŒã¿ãžæ¥ç¶ããããã«ããŠãŒã¶ã¯ã¢ãã¯ãç»é¢ãšããŒããŒããåãããç©ç端æ«ã䜿ã£ãã端æ«ã®äžã§ãæãæåãªã®ã¯ 1978幎㫠DEC瀟ãçºå£²ãã VT100 ã ã
VT100 㯠80x24æåããµããŒãããã«ãŒãœã«å¶åŸ¡ã« ANSI X3.64 æšæºãæ¡çšããåæã®ã¿ãŒããã«ã®äžã€ã ãèšãæãããšãããã°ã©ã ã¯æåã®åãåºåããããšã§ä»»æã®äœçœ®ã«ããã¹ãã衚瀺ããããšãã§ãããçŸåšã®ãã¿ãŒããã«ãã¢ããªã±ãŒã·ã§ã³ã¯ããã¿ãŒããã«ã»ãšãã¥ã¬ãŒã¿ããšåŒã°ããããšããããããã㯠VT100 ãšãã£ãç©ç端æ«ããšãã¥ã¬ãŒãããŠããããšã«ç±æ¥ããã
VT100 å¶åŸ¡ã·ãŒã±ã³ã¹ã®ã¬ãã¡ã¬ã³ã¹ã¯ä»¥äžãåèã«ãªã:
CUP (Cursor Position)
ESC [ <y> ; <x> H
CUP Cursor Position
2018-07-31
/ sbt
@eed3si9n è
çããããã«ã¡ã¯ãLightbend Tooling team ã«ããã£ãŠ sbt 1.2.0 ãã¢ããŠã³ã¹ããŸãããã㯠sbt 1 ã®ãã£ãŒãã£ãŒãªãªãŒã¹ç¬¬äºåŒŸã§ããã€ããªäºææ§ã¯ç¶æãã€ã€æ°æ©èœã«ãã©ãŒã«ã¹ãåœãŠããªãªãŒã¹ãšãªã£ãŠãããsbt 1 㯠Semantic Versioning ã«ããšã¥ããŠãªãªãŒã¹ãããã®ã§ããã©ã°ã€ã³ã¯ sbt 1.x ã·ãªãŒãºäžæ©èœããããšãæåŸ
ãããŠããã
2018幎7æ31æ¥ã« 1.2.0 final çããªãªãŒã¹ãããã
2018幎7æ6æ¥ãŸã§ã«å€§ããªåé¡ãèŠã€ãããªããã°ã1.2.0-RC1 㯠1.2.0 final çãšãªãäºå®ã ã
sbt 1.2 ã®äž»ãªæ°æ©èœã¯ã¯ãã¹JDK forkingãcomposite projectããããŠå®éšç㪠thin client ã ãsbt 1.1 ãã 6ã¶æã®éä»ã«ãè²ã
ãªãã°ä¿®æ£ãæ¹åç¹ãããŸã£ãŠããã
ãã©ã°ã€ã³éçºã®ããã® SbtPlugin
SbtPlugin
ã¯ããããžã§ã¯ãã sbt plugin ã§ããããšã宣èšããããã®ãã©ã°ã€ã³ã ãããã¯èªåçã« scripted test ãå°å
¥ããŠãsbtPlugin := true
ãèšå®ããã
lazy val root = ( project in file( "." ))
. enablePlugins( SbtPlugin )
Read MoreâŠ
2018-06-11
/ scala
OpenJDK 11-ea, GraalVM, Eclipse OpenJ9 ãè©ŠããŠã¿ãããæªã ã« OpenJDK 6 ã§ãã«ãããªããã°ãããªãã£ãããããšããŠã jabba ãªãäžå
šã ãjabba 㯠Stanley Shyiko (@shyiko ) ãããäœã£ãã¯ãã¹ãã©ãããã©ãŒã 㪠Java ã®ããŒãžã§ã³ãããŒãžã£ãŒã ã
AdoptOpenJDK 8 and 11
以äžã¯ jabba ã䜿ã£ãŠ Travis CI äžã§ AdoptOpenJDK 8 ãš 11 ãçšããŠã¯ãã¹ãã«ãããæ¹æ³ã :
sudo : false
dist : trusty
group : stable
language : scala
scala :
- 2.12.7
env :
global :
- JABBA_HOME=/home/travis/.jabba
matrix :
include :
- env :
- TRAVIS_JDK=adopt@1.8.192-12
- env :
- TRAVIS_JDK=adopt@1.11.0-1
before_install :
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh
install :
- $JABBA_HOME/bin/jabba install $TRAVIS_JDK
- unset _JAVA_OPTIONS
- export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -Xmx32m -version
script : sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ++$TRAVIS_SCALA_VERSION! test
before_cache :
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
cache :
directories :
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.jabba/jdk
Read MoreâŠ
2018-05-28
å
é±ã¯ sbt-sriracha ãçšãããœãŒã¹äŸå ããã¹ãã«äœ¿ãæ¹æ³ã玹ä»ãããä»é±ã¯ Expecty ã䜿ã£ãŠ power assert ãããæ¹æ³ãèŠãŠããã
power assert (ããã㯠power assertion) 㯠assert(...)
é¢æ°ã®å€çš®ã§ãèªåçã«è©³çŽ°ãªãšã©ãŒã¡ãã»ãŒãžã衚瀺ããŠããããããã¯ãPeter Niederwieser (@pniederw ) ããããŸã Spock ã®ããã«å®è£
ããŠã2009 幎㫠Groovy 1.7 ã«åã蟌ãŸãããpower assert 㯠Ruby ãJavaScript ãRust ãªã©ä»ã®èšèªã«ãåºãŸã£ãŠããã
åŸæ¥ã® assert æ
äŸããšã㊠a * b
ãèãããåŸæ¥ã® assert
ã䜿ã£ãå Žå以äžã®ããã«æžã:
scala> assert( a * b == 7 , s"a = $a ; b = $b ; a * b = ${ a * b} " )
java. lang. AssertionError : assertion failed: a = 1 ; b = 3 ; a * b = 3
Read MoreâŠ
2018-05-20
/ sbt
ãœãŒã¹äŸåæ§ã¯ããªãåãã sbt ã«ååšããããããŸãããã¥ã¡ã³ãåãããŠããªãæ©èœã®äžã€ã ã
immutable ãªãœãŒã¹äŸå
以äžã®ããã«ã㊠scopt ã³ãã³ãã©ã€ã³ããŒã·ã³ã°ã©ã€ãã©ãªã®ææ°ã®ã³ããããžã®ãœãŒã¹äŸåã宣èšã§ããã
lazy val scoptJVMRef = ProjectRef ( uri( "git://github.com/scopt/scopt.git#c744bc48393e21092795059aa925fe50729fe62b" ), "scoptJVM" )
ThisBuild / organization : = "com.example"
ThisBuild / scalaVersion : = "2.12.2"
lazy val root = ( project in file( "." ))
. dependsOn( scoptJVMRef)
. settings(
name : = "Hello world"
)
Read MoreâŠ
2018-02-16
/ scala
æšæ¥ Travis CI ãçšããŠã¯ãã¹ JVM ãã¹ã ããæ¹æ³ãæžããã
Travis CI ãçšãã macOS äžã§ã® Scala ã¢ããªã®ãã¹ã
Travis CI ãçšã㊠macOS äžã§ Scala ã¢ããªã®ãã¹ããè¡ãããšãå¯èœã ããã㯠Lars ãããš Muuki ããã®æ¹æ³ Testing Scala programs with Travis CI on OS X ãã¢ã¬ã³ãžãããã®ã ã
dist : trusty
language : scala
matrix :
include :
## build using JDK 8, test using JDK 8
- script :
- sbt universal:packageBin
- cd citest && ./test.sh
jdk : oraclejdk8
## build using JDK 8, test using JDK 8, on macOS
- script :
- sbt universal:packageBin
- cd citest && ./test.sh
## https://github.com/travis-ci/travis-ci/issues/2316
language : java
os : osx
osx_image : xcode9.2
## build using JDK 8, test using JDK 9
- script :
- sbt universal:packageBin
- jdk_switcher use oraclejdk9
- cd citest && ./test.sh
jdk : oraclejdk8
## build using JDK 8, test using JDK 10
- script :
- sbt universal:packageBin
- citest/install-jdk10.sh
- cd citest && ./test.sh
jdk : oraclejdk8
scala :
- 2.10.7
before_install :
# https://github.com/travis-ci/travis-ci/issues/8408
- unset _JAVA_OPTIONS
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
brew update;
brew install sbt;
fi
cache :
directories :
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
before_cache :
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
Read MoreâŠ
2018-02-15
/ sbt
Oracle 㯠non-LTS JDK ã 6ã¶æãã ãLTS JDK ã 3幎ããã«ãªãªãŒã¹ããèšç»ã ããŸããä»åŸã¯ OpenJDK ã«éçŽãããŠããããããèšç»ã©ããã«ããã°ãJDK 9 㯠2018幎3æã« EOLãJDK 10 㯠2018幎3æã«ãªãªãŒã¹ããã2018幎9æã« EOLããã㊠2018幎9æã« JDK8 ããªãã¬ãŒã¹ãã LTS JDK 11 㯠2021幎ãŸã§ç¶ããšããããšã«ãªãã
ä»åŸç«ãŠç¶ãã«ãªãªãŒã¹ããã JDK ã«åããŠãTravis CI ã䜿ã£ãŠã¢ããªã JDK 8, JDK 9, ãã㊠JDK 10 Early Access ã§ãã¹ãããæ¹æ³ã玹ä»ããã
dist : trusty
language : scala
matrix :
include :
## build using JDK 8, test using JDK 8
- script :
- sbt universal:packageBin
- cd citest && ./test.sh
## build using JDK 8, test using JDK 9
- script :
- sbt universal:packageBin
- jdk_switcher use oraclejdk9
- cd citest && ./test.sh
## build using JDK 8, test using JDK 10
- script :
- sbt universal:packageBin
- citest/install-jdk10.sh
- cd citest && ./test.sh
scala :
- 2.10.7
jdk :
- oraclejdk8
# Undo _JAVA_OPTIONS environment variable
before_script :
- _JAVA_OPTIONS=
cache :
directories :
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
before_cache :
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
Read MoreâŠ
2018-02-03
/ scala
2016幎8æ
SIP-27 æ«å°Ÿã®ã«ã³ã (trailing commas) ã«é¢ãããã£ã¹ã«ãã·ã§ã³ã®ãšãã«æãã€ããã®ã¯äžéšã®ã«ã³ãã®çšæ³ãã»ãã³ãã³ãšçµ±äžã§ããã°ãã»ãã³ãã³æšè«ãæµçšããããšãã§ããããããªãããšããããšã ã
Aug 10 2016 20:46 :
ç¹ã«å¯å€é·åŒæ° (vararg) ã®åºåãæåãšããŠã»ãã³ãã³ãèš±ãã°äŸ¿å©ããã ãããããå®éã«ã¯ããã¯ããŸããããªãã@Ichoran ãããå
·äœäŸãçšããŠææããŠããã:
2018-01-30
/ sbt
以åãã€ãŒããã ãšãããsbt ã¹ããã«ãŒãèªäœããã
2018-01-05
/ scala
ç«çª: 17æ¥ç® ãæžãããå§å¯Ÿè±¡ãšçµå¯Ÿè±¡ãç©ãå察æ§ãäœç©ãªã©æœè±¡æ§é ãèŠãŠããã€ã€ãEither ã coproduct ãšããŠäœ¿ãæ¹æ³ã玹ä»ããŸãã
2017-12-18
/ sbt
2017-12-12
/ scala
æ¬çš¿ã§ã¯å€ããŠæ°ããåé¡ã§ãããã¡ã€ã«ãã¹ã® Uniform Resource Identifier (URI) ãžã®ãšã³ã³ãŒãæ¹æ³ã«ã€ããŠè°è«ããã
2017幎çŸåšãæš©åšããæ
å ±ã®å
㯠Matthew Kerwin æ°ã«ãã£ãŠæžããã RFC 8089 - The “file” URI Scheme ã ã
æªæ¥ã®èªè
ã®äººã¯ “file URI scheme RFC” ã§æ€çŽ¢ããŠææ°çãæ¢ããŠã»ãããããã°ã©ãã®äººã¯ RFC ãèªãã§äžããããã®èŠãæžã㯠URI ãšã³ã³ãŒãã£ã³ã°ã«é¢é£ããåé¡ã®èªèãé«ããããã®ãã®ã ããRFC ã®ä»£æ¿ãšã¯ãªããªãã
æè¿ file:/foo/bar
ãããŒã¹ã§ããªããšãããã©ãããã©ãŒã éã®çžäºä¹ãå
¥ãåé¡ã«åºããããããã¡ã€ã«ãã¹ã URI ãšããŠè¡šçŸããã®ã«é¢é£ããåé¡ã«æ©ãŸãããã®ã¯ãããæåã§ããªãããã¡ã€ã«ã·ã¹ãã ãšããæŠå¿µã¯ 1960幎代ã«é¡ãã1990幎代ãã URL ãããããšãèãããšããã®ã³ã³ã»ã³ãµã¹ãåããŠããªããšããã®ã¯æå€ãªããšã ãããããåé²æ³å°æ°ã®ããã«ãæ·±ãæãäžããããããŒã¿ã亀æãã¯ããããšãMatrixãã®ã»ããã³ãèŠããŠããã®ãããããªãã
tl;dr
2020幎11æçŸåšã§ã®å®è£
:
2017-12-08
/ sbt
Tech Hub blog ã«ãŠ sbt server ã VS Code ãšäœµçšããŠå®è¡äžã® sbt ã»ãã·ã§ã³ããã³ã³ãã€ã©ãšã©ãŒã衚瀺ã§ããããšããã¢ãããæ¬çš¿ã§ã¯ Sublime Text 3 ã§ããããã£ãŠã¿ãã
sbt server ã®ããã® Sublime Text 3 ã®ã»ããã¢ããæ¹æ³
ãŸã㯠Sublime Text 3 ã« tomv564/LSP ãã©ã°ã€ã³ãè¿œå ããã
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone https://github.com/tomv564/LSP.git
‘Preferences > Package Control > Satisfy Dependencies’ ãå®è¡ãã
次㫠sbt-server-stdio.js ãããŠã³ããŒãã㊠~/bin/
ãããã¯æ®æ®µã¹ã¯ãªãããä¿åããŠããå Žæã«ä¿åãããsbt server ã¯ãPOSIX ã·ã¹ãã ã§ã¯ããã©ã«ã㧠Unix ãã¡ã€ã³ãœã±ãããWindows ã§ã¯ååä»ããã€ããçšãããããšãã£ã¿ã¯åºæ¬çã«æšæºåºå
¥åãæåŸ
ããŠããã¿ããã ããã㯠VS Code ãšã¯ã¹ãã³ã·ã§ã³çšã«åãæžããå®è¡äžã®ãœã±ãããçºèŠããŠãæšæºåºå
¥åã§ããã³ããäœã Node ã¹ã¯ãªããã ã
2017-12-04
/ diy
2017-12-01
/ sbt
Lightbend ã®æè¡ç³»ããã° Tech Hub blog ã« sbt 1.1.0-RC1 with sbt server and slash syntax ãšããèšäºãæžããã®ã§ãèš³ããŸããã
@eed3si9n è
çããããã«ã¡ã¯ãLightbend Tooling team ã«ããã£ãŠ sbt 1.1.0-RC1 ãã¢ããŠã³ã¹ããŸããããã¯ãsbt 1 åã®ãã£ãŒãã£ãŒãªãªãŒã¹ã§ããã€ããªäºææ§ã¯ç¶æãã€ã€æ°æ©èœã«ãã©ãŒã«ã¹ãåœãŠããªãªãŒã¹ãšãªã£ãŠããã
sbt 1 㯠Semantic Versioning ã«ããšã¥ããŠãªãªãŒã¹ãããã®ã§ããã©ã°ã€ã³ã¯ sbt 1.x ã·ãªãŒãºäžæ©èœããããšãæåŸ
ãããŠããã2017幎12æ14æ¥ãŸã§ã«å€§ããªåé¡ãèŠã€ãããªããã°ã1.1.0-RC1 㯠1.0.0 final çãšãªãäºå®ã ã
sbt 1.1 ã®äž»ãªæ°æ©èœã¯çµ±äžã¹ã©ãã·ã¥æ§æ (unified slash syntax) ãš sbt server ã ããããã¯äž¡æ¹ãšãåãå人çã«ãã°ããé¢ãã£ãŠããæ©èœã ããsbt 1.0 ã«ã¯å
¥ããã«å»¶æããããã®ã ããã®ããããã£ãšããããäžã«åºããã®ãã²ãšããå¬ããã
ã»ããã£ã³ã°ããŒã®çµ±äžã¹ã©ãã·ã¥æ§æ
sbt ã® 1ãŠãŒã¶ãšããŠãsbt ã·ã§ã«ãš build.sbt
ã§ã»ããã£ã³ã°ãšã¿ã¹ã¯ããŒã« 2ã€ã®è¡šèšæ¹æ³ãããã®ããsbt ã®åŠç¿ãé£ããããŠããçç±ã ãšé·ãããšæã£ãŠãããã³ãã¥ããã£ãŒã®çãã ãšè°è«ãéããããã€ãã®ãããã¿ã€ã ãäœã£ãåŸãsbt 1.1.0-RC1 ããçµ±äžã¹ã©ãã·ã¥æ§æããµããŒããããããšã«ãªã£ãã (sbt 0.13 è¡šèšãåŒãç¶ãåäœããã®ã§ãå¿é
ç¡ã)
2017-11-27
Lightbend ã®æè¡ç³»ããã° Tech Hub blog ã« sbt 1.0.4 hotfix and the performance fixes ãšããèšäºãæžããã®ã§ãèš³ããŸããã
@eed3si9n ) è
çããããã«ã¡ã¯ãã¢ã¡ãªã«ã«äœãã§ãã人ãã¡ã¯ãè¯ãæè¬ç¥ (Thanksgiving) ã®é£äŒããããã§ããããã
é ãããã®èŠªæãåéãéãŸã£ãŠé£äºãäœã£ãããå°åã亀ãã幎äžè¡äºãšããæå³ã§ã¯ãæ¥æ¬ã®æ£æäŒã¿ã«è¿ããã®ããããšæãã
ããšãsbt 1.0.4 ããªãªãŒã¹ããããšãã¢ããŠã³ã¹ããŸãããã㯠sbt 1.0.x ã·ãªãŒãºã® hotfix ã§ããã°ä¿®æ£ã«ãã©ãŒã«ã¹ãåœãŠããã€ããªäºæãªãªãŒã¹ã ã
sbt 1 㯠Semantic Versioning ã«ããšã¥ããŠãªãªãŒã¹ãããã®ã§ããã©ã°ã€ã³ã¯ sbt 1.x ã·ãªãŒãºäžæ©èœããããšãæåŸ
ãããŠããã
ããã©ãŒãã³ã¹ãã°ã¬ã®ä¿®æ£
æè¬ç¥ãšããããšã§ããäžè©±ã«ãªã£ãŠãã人ãã¡ã®äºãèããããã ãã©ãå㯠Scala ã®ããŒãªã³ã°ãšã³ã·ã¹ãã ã«ã³ã³ããªãã¥ãŒãããŠãããŠããçããã«æè¬ããŠãããããã¯ãsbt ãžã®ã³ãŒãã®ã³ã³ããªãã¥ãŒãã ããããªããèããããããããã° (Haoyi ããã® So, what’s wrong with SBT? ãªã©)ãããŒã¯ (Jeff ããã® Beyond the Build Tool ãªã©)ãããã¥ã¡ã³ããŒã·ã§ã³ãIDE/ãšãã£ã¿çµ±åãã代æ¿ãã«ãããŒã« (Chris ããã® cbt ãªã©) ãå«ããŠãããå·ç¬çã«ãsbt ã¯ãã¡ãã£ãŠèšã£ãŠçµããã«ããããããªãããã®äººãã¡ã¯è
ããŸãã£ãŠãsbt ãã®ãã®ãçŽãããã代æ¿æ¡ãèãåºããŠããããã ã
2017-09-20
/ sbt
Lightbend ã®æè¡ç³»ããã° Tech Hub blog ã« sbt 1 migration status and 1.0.2 hotfix ãšããèšäºæžããã®ã§ãèš³ããŸããã
@eed3si9n è
ããã«ã¡ã¯ãsbt 1.0.0 ãªãªãŒã¹åŸã«äœããã£ããã®ã¬ããŒãã ã
åãã¡ã® sbt 1 ãžã®ãã€ã°ã¬ãŒã·ã§ã³ã®ãã©ã³ã¯ä»¥äžã®ããã«ãªã£ãŠãã:
sbt 1.0.0 ããªãªãŒã¹ããã
ã³ãã¥ããã£ãŒã®çãããšäžç·ã«ãã©ã°ã€ã³ãå
šéšç§»è¡ãããã
ãã°ãä¿®æ£ããã
ã©ã€ãã©ãªã®ãã«ãã移è¡ãããã
ãã©ã°ã€ã³ã®ç§»è¡
ãã©ã°ã€ã³ã®ç§»æ€ã®é²æã远跡ããããã«ãç¥ãããŠãããã©ã°ã€ã³ã®äžèŠ§ ãäœã£ãŠ GitHub star é ã«ãœãŒããããããã¯ãããã¥ã¡ã³ããŒã·ã§ã³ãã¹ã¯ãªãŒã³ã¹ã¯ã¬ã€ãã³ã°ããã®ãå
ã«ãæåã§ãè²ã
è¿œå ããŠãããããã«æžããã 258åã®ãã©ã°ã€ã³ã¯æ°ããã®ãå€ãã®ãæ··ãã£ãŠããŠãsbt ãã©ã°ã€ã³ãšã³ã·ã¹ãã ã®è£Ÿéã®åºããããåããã
æ¬æ¥ä»ã§ã¯ãäžèŠ§ã®ãã¡ 70åã®ãã©ã°ã€ã³ãããªãªãŒã¹æžã¿ããšãªã£ãŠããŠãä»ã«ããã©ã°ã€ã³äœè
ãã¢ã¯ãã£ããªãŠãŒã¶ã«ãã£ãŠç§»è¡éäžã®æ§ã
ãªã¹ããŒãžã«ãããã®ãè²ã
ãããäžã§ãåç°ãã (xuwei-k ) ã¯ãè€æ°ç®æã«åæã«ååšãããã®ãããªå¢ãã§å€ãã®ãã©ã°ã€ã³ã®ç§»æ€äœæ¥ãè¡ã£ãŠããã以äžã¯åãèŠã€ããç¯å²:
ããããšãããããŸã!
2017-09-19
/ sbt
sbt 1.0 ããªãªãŒã¹ãããŠããããäžã¶æã«ãªãããã£ãšå°ãèœã¡çã㊠sbt server ã®ããšãèãããããã«ãªã£ããé±æ«ã®æéããããŠæè¿ Scala language server (èšèªãµãŒããŒ) ã sbt server äžã«ããã¯ããŠããã
language server ã£ãŠäœ?
language server ãšã¯ãVisual Studio Codeã Eclipse Cheã Sublime Text 3 ãšãã£ããšãã£ã¿ã«å¯Ÿã㊠Language Server Protocol ãéããŠäœããã®èšèªãµãŒãã¹ãæäŸããããã°ã©ã ã®ããšã ãæŒç®ã®äžäŸãæãããš textDocument/didOpen
ã¯ãšãã£ã¿å
ã§ãœãŒã¹ãã¡ã€ã«ãéãããããšããµãŒããŒã«äŒããã
ããã¯è³¢ãã¢ã€ãã£ã¢ã§ããšãã£ã¿äœè
ã (åŸæ¥ã® IDE ã®ããã«) åäžã®èšèªã«ã¹ã£ããã«ãªãããšãã解æŸãããŸãåæã«èšèªãããã€ããŒã¯ãæŒç®ãã«å°å¿µããã°ããããã«ãªããJSON ããŒã¹ã®ãããã³ã«ãªã®ã§ãweb ã¢ããªã®ããã¯ãšã³ããæžããŠããæèŠã«è¿ããããäžã€å¬ããã®ã¯ãäžåºŠã«å
šãŠã®æ©èœãæäŸããªããŠãããããšã ã
Scala language server ã¯ãIulian Dragosããã«ãã dragos-vscode-scala ãšããå®è£
ãæ¢ã«ãã£ãŠããã㯠ENSIME ãããã¯ãšã³ããšããŠäœ¿ããåã¯ãã ããã Sublime ãš sbt ã ãã§ã³ãŒããæžããŠããã®ã§ãäžæãããŠçŽæ¥ Zinc ã®ã€ãã³ãã䜿ãã°ããããããªãããšæã£ãã
sbt server
sbt server ã®èãæ¹ãšããŠã¯ããŠãŒã¶ã®æŒç®ã¯ã³ãã³ããšã¯ãšãªãšããŠè¡šçŸã§ããã³ã³ãœãŒã«ã«è¡šç€ºãããæ§ã
ãªåºåã¯ã€ãã³ããšããŠè¡šçŸã§ãããšãããã®ã (sbt server ãªããŒã ãåç
§)ãå€ãã®å Žåããã«ããŠãŒã¶ã䟡å€ãèŠåºãã®ã¯ã¿ã¹ã¯ã®æ»ãå€ã§ã¯ãªããã³ã³ãã€ã©ã®èŠåããã¹ãã®åºåãšãã£ãã³ã³ãã³ãã ã
2017-08-21
æ¬çš¿ã§ã¯ãåã Persistent Versioning ãšåŒãã§ãããŒãžã§ã³æ¹æ³ã玹ä»ãããæ¬çš¿äžã«åºãŠããã¢ã€ãã£ã¢ã®å€ãã¯æ°ããããªããã°åãèæ¡ãããã®ã§ããªããæ¢ã«ååããããªãã°æ¯éæããŠã»ããã
2015幎㫠Jake Wharton (@JakeWharton ) ããã ã¡ãžã£ãŒããŒãžã§ã³ã¢ããããŒãã®ããã® Java çžäºäºææ¹é (Java Interoperability Policy for Major Version Updates) ãšããããã°èšäºãæžãã:
Java ããã±ãŒãžåã«ããŒãžã§ã³çªå·ãå«ãããã«ååãå€ããã
ããã«ãã£ãŠãéæ¥çäŸåã©ã€ãã©ãªãè€æ°ã®ããŒãžã§ã³ãæã€å Žåã® API äºææ§ã®åé¡ãå³æã«è§£æ±ºãããåãã¯ã©ã¹ãã¹ããåã
ã®ã¯ã©ã¹ãçžäºå¹²æžããããšãªãèªã¿èŸŒãããšãã§ããã(äžç¥)
(ã¡ãžã£ãŒããŒãžã§ã³ã 0 ã 1 ã®ã©ã€ãã©ãªã¯ãã®æ¹éãé£ã°ããŠãã¡ãžã£ãŒããŒãžã§ã³ã 2 ã«äžãã£ãŠããå§ããŠãããã)
2017-08-11
sbt 1.0.0
Lightbend ã®æè¡ç³»ããã° Tech Hub blog ã« sbt 1.0.0 is now available ãšããèšäºãæžããã®ã§ãèš³ããŸããã
詳现㯠sbt 1.0.0 ãªãªãŒã¹ããŒã ãèŠãŠãã ããã
Eugene Yokota (@eed3si9n ) 2017幎8æ11æ¥ è
Lightbend瀟 Tooling ããŒã ã«ä»£ãã£ãŠ sbt 1.0.0 ã®ãªãªãŒã¹ãçºè¡šããŸã!
Mark Harrah ããã 2008 幎ã«æåã«ãªãªãŒã¹ãã sbt ããæ°ãããšãsbt 1 ã¯äœå¹ŽããããŠéçºããã倧ããªéçšæšã§ãããšèšãããçŽè¿ã®ã¡ãžã£ãŒãªãªãŒã¹ã® sbt 0.13.x ããæåã®ãªãªãŒã¹ã 2013幎8æãªã®ã§ 4幎éç¶ããããšã«ãªãã
Lightbend瀟 Tooling ããŒã 㯠0.13 ã®ã¡ã³ããšäžŠè¡ã㊠sbt 1 ãžåããŠã®é²åãç¶ç¶ããŠããããã®æéäžã« sbt new ãAutoPlugin ãcached resolution ãªã©ãè¿œå ãããããŸããã³ãã¥ããã£ã«ãã£ãŠäœçŸãã®ãã©ã°ã€ã³ãæžãããsbt ã®èœåã¯ãã ã®ã·ã³ãã«ãã«ãããŒã«ã®èœåãæ¡åŒµãããã®ãšãªã£ãŠãã£ãã
äž»ãªæ©èœ
sbt 1 㯠Scala 2.12 ãæ¡çšããããããã«ãå
ã§ãã£ãšã¢ãã³ãª Scala ã䜿ããããã«ãªã£ã! ããã«ãã£ãŠ 2.10 ããµããŒãããããã¬ãã·ã£ãŒã軜æžããã®ã§ããã©ã°ã€ã³äœè
ãã©ã€ãã©ãªäœè
ã«ãšã£ãŠãæå ±ã ã
sbt 1 㯠Zinc 1 ãšãããã¯ã©ã¹ããŒã¹ã® name hashing ã䜿ãé«éãªã€ã³ã¯ãªã¡ã³ã¿ã« (å·®å) ã³ã³ãã€ã©ãå°å
¥ãããScala ã®ã€ã³ã¯ãªã¡ã³ã¿ã«ã»ã³ã³ãã€ã©ãç¬ãå ãã«ããã«ã¯ããŸãã«ãéèŠã ãšæã£ãã®ã§ãZinc 1 㯠sbt/zinc ãšããå¥ã®ãªããžããªã«åããããLightbend 瀟㚠Scala Center ã®å
±åã§ç®¡çãããŠããã
sbt 1 ã¯ããã©ã«ã㧠Gigahorse HTTP ã¯ã©ã€ã¢ã³ã (å
éšã¯ Square OkHttp) ã䜿ã£ãŠã¢ãŒãã£ãã¡ã¯ãã䞊åããŠã³ããŒããããLibrary Mangement API ãè¿œå ãããå°æ¥ã® 1.x ã«ãããŠè±Ivy ãå¯èœãšãªãããã«ããã
äºææ§ã«åœ±é¿ã®ããå€æŽç¹ãæ°æ©èœããã°ä¿®æ£ãªã©ã®ã網çŸ
ãããªã¹ã㯠sbt 1.0.0 ãªãªãŒã¹ããŒã ã«ããã®ã§åç
§ããŠã»ããã
2017-07-19
/ sbt
GitHub Pages 㯠OSS ãããžã§ã¯ãã®ããã¥ã¡ã³ãããã¹ãã£ã³ã°ããã®ã«äŸ¿å©ã ã
ããã§ã¯ Travis CI ã䜿ã£ãŠ pull request ã® merge æã«èªåãããã€ããæ¹æ³ã説æããã
1. æ°ãã RSA ããŒãé©åœãªãã£ã¬ã¯ããªå
ã§çæããã
ãããžã§ã¯ãå€ã«ãŸãã¯ãã£ã¬ã¯ããªãäœãã
ããŒã®åå㯠deploy_yourproject_rsa
ãªã©ãšã€ããŠãä»ã®ããŒãšåºå¥ã§ããããã«ããã
$ mkdir keys
$ cd keys
$ ssh-keygen -t rsa -b 4096 -C "yours@example.com"
Generating public/private rsa key pair.
Enter file in which to save the key ( /Users/xxx/.ssh/id_rsa) : deploy_website_rsa
Enter passphrase ( empty for no passphrase) :
Read MoreâŠ
2017-07-01
/ keeb / dyi
åå Atreus ã®çµã¿ç«ãŠã«ã€ããŠæžãããšãã«ãããŒããŒãã®é
眮ã«ã€ããŠã¡ãã£ãšæžããã
ããã«ããšãã¬ã€ã¢ãŠããå
æããŠæ§ã
ãªã·ã³ãã«ã®å ŽæãæèšããŠãæ®ã£ãŠããåé¡ãäžã€ãã£ãŠãããã¯çœ®ãå Žæã ãã©ããããããšèªåã®éã«çœ®ããšç»é¢ãé ãããæ°ãããã
ãã®åé¡ã®è§£æ±ºæ¹æ³ãšããŠãMacBook Pro ã®ããŒããŒãäžã« Atreus ãé
眮ã§ããããã«ãã¬ã€ãäœã£ãŠã¿ãã
ãã£ãããšãªã£ãã®ã¯ãAtreus ã®äœè
ã® @technomancy ããã« Atreus ã MacBook Pro ã®ããŒããŒãäžã«çŽæ¥ä¹ããŠã¿ãŠã¯ã©ããã®æèšããã ã圌㮠Thinkpad ã¯äžå€«ãªã®ãããããªãããåã®æ°åã®ã©ãããããã®äžã«çŽä¹ããªããŠåè«ãããªãã
ææ
éå
·ãšããŠã¯ã
2017-06-19
/ diy
ãã°ããåã«ãããã§è²·ã£ã Atreus ãæšæ¥ã®å€äœãçµããã詳现ã¯ãããªæã:
Matias Quiet Click ã¹ã€ããã®ãªãã·ã§ã³ãéžãã ïŒã¹ã©ã€ããŒã¯ã°ã¬ãŒïŒãã¯ãªãã¯ãšããååã¯ä»ããŠãããã¯ãªãã¯æã¯ç¡ãããšã«æ³šæã
修食ããŒã«ã¯ Matias Quiet Linear ã¹ã€ããã䜿çšïŒã¹ã©ã€ããŒã¯èµ€ïŒã
ãããã ortholinear ç³»ã®æ Œåç¶ã®ãã¹ããªããã¬ã€ã¢ãŠãã§ã42 ã®ããŒãããã
ããã¬ããŒæã®åæ¿ã
ææ
ãããã«ã¯ Arteus ããŒããŒããçµã¿ç«ãŠãã®ã«å¿
èŠãªãã®ã¯ã»ãŒããã£ãŠãããèªåã§çšæããå¿
èŠãããã®ã¯ã©ãã«ãŒãåç°ããŠããã³ãããšããããŒã ã
Minwax Clear Aerosol Lacquer, Clear Gloss
Hakko Digital FX888D & CHP170 bundle, includes Soldering Station & CHP170 cutter
Hakko T18-C2 - T18 Series Soldering Tip for Hakko FX-888/FX-8801
DMiotech 0.8mm 50G 63/37 Rosin Core Tin Lead Soldering Solder Wire
ããã§æ³šæããŠã»ããã®ã¯ Matias瀟ã®ã¹ã€ããã¯ã80幎代ãšã 90幎代㫠Apple Standard Keyboard ãªã©ã§æ¡çšãããæ¥æ¬ã®ã¢ã«ãã¹é»æ°ã® Alps SKCM ã®ã¯ããŒã³ã§ããããšã ããã®ãããCherry MX ã¹ã€ããçšã®ãããããªããŒãã£ããã¯äžå䜿ãããšãã§ããªããããããããã人㯠Cherry äºæã®ããŒã·ã£ã«ãããã泚æããå¿
èŠãããã
2017-04-27
Gigahorse 0.3.0 ããªãªãŒã¹ãããGigahorse ãäœãã¯ããã¥ã¡ã³ããŒã·ã§ã³ ãã¿ãŠã»ããã
OkHttp ãµããŒã
0.3.0 㯠Square OkHttp ãµããŒããè¿œå ããã Gigahorse-OkHttp 㯠Scala 2.10, 2.11, 2.12 åãã«ã¯ãã¹ãã«ããããŠããã
JavaDoc ã«ãããšãOkHttpClient
ã®ã€ã³ã¹ã¿ã³ã¹ã¯ close ããªããŠããããããã
scala> import gigahorse._, support. okhttp. Gigahorse
import gigahorse._
import support.okhttp.Gigahorse
scala> import scala.concurrent._, duration. _
import scala.concurrent._
import duration._
scala> val http = Gigahorse . http( Gigahorse . config) // don't have to close
http: gigahorse.HttpClient = gigahorse. support. okhttp. OkhClient @ 23 b48158
2017-04-18
/ sbt
Lightbend ã®æè¡ç³»ããã° Tech Hub blog ã« sbt 1.0 roadmap and beta-1 ãšããèšäºæžããã®ã§ãèš³ããŸããã
@eed3si9n è
sbt 1.0 ã¯ããããæ°å¹Žéå¶äœäžãšããç¶æ
ãç¶ããŠããŠãã³ãã¥ããã£ãŒã®äžã«ã¯ãããåºãªãã®ã§ã¯ããšããæç掟ãããŠããããããªãããã®ãããªæžå¿µã¯ä»¥äžã®è«ç¹ã«ãã£ãŠææã§ãããšæã£ãŠãã:
æ¬æ¥ 1.0 ã«äºå®ããŠãã (AutoPlugin ã Dotty ãµããŒãã®ãããª) æ©èœã¯ãã§ã«ãã¯ãããžãŒã»ãã¬ãã¥ãŒãšã㊠0.13 ç³»ã«ãŠãªãªãŒã¹ãããŠããã
1.0 ã«äºå®ãããŠããæ©èœã®ãã¡ãããæ欲çãªãã®ã¯å»¶æãŸãã¯æ©èœãçž®å°ã㊠1.0 ãæ©æã«å®çŸã§ããããã«ãããïŒãã£ãã·ã¥åãããã³ã³ãã€ã«ã Ivy ã®çœ®ãæããªã©ïŒ
sbt 1.0 ã¯ããŒããŒãŠã§ã¢ã§ã¯ãªããææ°ã ãš 1.0.0-M5 ãªã©ãã€ã«ã¹ããŒã³ãåºãŠããŠãä»ããè©Šãããšãã§ããã
ãã®ããã2017幎å€ãŸã§ã« sbt 1.0 ãã©ã³ãå®çŸå¯èœã ãšæã£ãŠããã
ãã€ã©ã€ã
sbt 1.0 ã¯ãåããæ°å¹Žéç¶ãå®å®çã§ããããšãšãsbt 0.13 ç³»ããã®ã¹ã ãŒãºãªç§»è¡ãå¯èœã§ããããšãç®æšãšãããsbt 0.12 ã¹ã¿ã€ã«ã®æŒç®åã Build ãã¬ã€ã ã¯åé€ããããæ¬æ¥ 1.0 ã«äºå®ããŠããæ©èœã¯ãã§ã«ãã¯ãããžãŒã»ãã¬ãã¥ãŒãšã㊠0.13.x ã·ãªãŒãºã«ãŠãªãªãŒã¹ãããŠããã
sbt 1.0 ã«ãããå©ç¹ããŸãšãããš:
2017-03-27
sbt ãã©ã°ã€ã³ãã JAR ãããŠã³ããŒãããŠãããå®è¡ããããšããèŠæãåºãŠããŠãã
æè¿ã ãš Brooklyn ã§ã® nescala 㧠Shane Delmore (@shanedelmore ) ããã«èãããã
ã¢ã³ã«ã³ãã¡ã¬ã³ã¹ã®ã»ãã·ã§ã³ã§ãã¢ã£ãœããã®ããã£ã€ãã§äœã£ããã©ãã家ã«åž°ã£ãŠãããè²ã
ããã£ãã®ã§ããã«å ±åããã
sbt-sidedish
sbt-sidedish ã¯ã¢ããªããµã€ãã¡ãã¥ãŒçã«èœãšããŠããŠå®è¡ããããã®ãã©ã°ã€ã³äœè
ã®ããã®ããŒã«ãããã ããããã®ãã®ã¯ç¹ã«ãã©ã°ã€ã³ãå®çŸ©ããªãã
rewritedemoãã³ãã³ãã©ã€ã³ã¢ããª
ãµã€ãã§èµ°ããããã¢ããªãäœãããã㯠Scala 2.11 ã 2.12 ã䜿ã£ãŠãããã
Scalafix ã䜿ã£ãŠ import æãè¿œå ãããã¢ã¢ã㪠ãæžãããScalafix 㯠Scala ã³ãŒãã®æžãæãããŒã«ãšã©ã€ãã©ãªã§ scala.meta ã䜿ã£ãŠããã詳现㯠Scalafix ã®ããã¥ã¡ã³ããŒã·ã§ã³ãšãœãŒã¹ãåç
§ã
sbt-rewritedemoãsbt ãã©ã°ã€ã³
次ã«ãrewritedemo ã¢ããªããããµããããžã§ã¯ãçžæã«å®è¡ããŠå¥ã®ãµããããžã§ã¯ããå°åºããããšããã
sbt-sidedish ã䜿ã£ãŠä»¥äžã®ãããªãã©ã°ã€ã³ãæžããã
package sbtrewritedemo
import sbt._
import Keys._
import sbtsidedish.Sidedish
object RewriteDemoPlugin extends AutoPlugin {
override def requires = sbt. plugins. JvmPlugin
object autoImport extends RewriteDemoKeys
import autoImport._
val sidedish = Sidedish ( "sbtrewritedemo-metatool" ,
file( "sbtrewritedemo-metatool" ),
// scalaVersion
"2.12.1" ,
// ModuleID of your app
List ( "com.eed3si9n" %% "rewritedemo" % "0.1.2" ),
// main class
"sbtrewritedemo.RewriteApp" )
override def extraProjects: Seq [ Project ] =
List ( sidedish. project
// extra settings
. settings(
// Resolve the app from sbt community repo.
resolvers += Resolver . bintrayIvyRepo( "sbt" , "sbt-plugin-releases" )
))
override def projectSettings = Seq (
rewritedemoOrigin : = "example" ,
sourceGenerators in Compile +=
Def . sequential(
Def . taskDyn {
val example = LocalProject ( rewritedemoOrigin. value)
val workingDir = baseDirectory. value
val out = ( sourceManaged in Compile ). value / "rewritedemo"
Def . taskDyn {
val srcDirs = ( sourceDirectories in ( example, Compile )). value
val srcs = ( sources in ( example, Compile )). value
val cp = ( fullClasspath in ( example, Compile )). value
val jvmOptions = List ( "-Dscalameta.sourcepath=" + "\"" + srcDirs. mkString( java. io. File . pathSeparator) + "\"" ,
"-Dscalameta.classpath=" + "\"" + cp. mkString( java. io. File . pathSeparator)+ "\"" ,
"-Drewrite.out=" + out)
Def . task {
sidedish. forkRunTask( workingDir, jvmOptions = jvmOptions, args = Nil ). value
}
}
},
Def . task {
val out = ( sourceManaged in Compile ). value / "rewritedemo"
( out ** "*.scala" ). get
}
). taskValue
)
}
trait RewriteDemoKeys {
val rewritedemoOrigin = settingKey[ String ]( "" )
}
object RewriteDemoKeys extends RewriteDemoKeys
Read MoreâŠ
2017-03-21
ç«çª: 16æ¥ç® æžããã
2017-03-12
/ sbt
äºææ§ã«åœ±é¿ã®ããæ°æ©èœãå€æŽç¹ããã°ä¿®æ£
sbt 0.13.14 㯠Maven ã®ããŒãžã§ã³ã¬ã³ãžãã§ããéãåãé€ãã詳现ã¯åŸã»ã©ã
æ¹åç¹
äºåãšã㊠JDK 9 ãšã®äºææ§ãè¿œå ããããã®æ©èœã¯ 0.13.14 以éã®ãã€ãã£ãããã±ãŒãžãå¿
èŠãšããã #2951 /143 by @retronym
ãªãã©ã€ã³ã»ã€ã³ã¹ããŒã«çšã« “local-preloaded” ã¬ããžããªãè¿œå ããã詳现ã¯åŸã»ã©ã
ãŠã©ãŒãã³ã°ã¢ããããã JVM ã«çãŸãããã«ããããã¢ãŒã㧠sbt ãå®è¡ãããš [ENTER]
ãæŒã㊠shell ã«åãæ¿ããããéç¥ããããã«ããã #2987 /#2996 by @dwijnand
.taskValue
ã䜿ããã« sourceGenerators += Def.task { ... }
ãšæžããããã«ããããã« Append
ã®ã€ã³ã¹ã¿ã³ã¹ãè¿œå ããã #2943 by @eed3si9n
JUnitXmlTestsListener ãçæãã XML ãç¡èŠãã¹ããããä¿çç¶æ
ã®ãã¹ãã«ãããããã©ã°ãç«ãŠãããã«ããã #2198 /#2854 by @ashleymercer
ãããžã§ã¯ãã Dotty ã䜿ã£ãŠã³ã³ãã€ã«ããŠãããšæ€ç¥ããå Žåã«ãèªåçã« scalaCompilerBridgeSource
ãèšå®ããŠãDotty ãããžã§ã¯ãã®ãã€ã©ãŒãã¬ãŒãã軜æžããããã«ããããã ããsbt ã«ããã Dotty ãµããŒãã¯çŸåšå®éšçã§ãããæ£åŒã«ã¯ãµããŒããããŠããªãããšã«æ³šæã詳现㯠dotty.epfl.ch åç
§ã #2902 by @smarter
sbt new ã®ã¬ãã¡ã¬ã³ã¹å®è£
ã§ãã Giter8 ã 0.7.2 ã«ã¢ããããŒãããã
ãã°ä¿®æ£
.triggeredBy
ã.storeAs
ãªã©ãã:=
ãš .value
ãã¯ããšåäœããªãåé¡ã®ä¿®æ£ã #1444 /#2908 by @dwijnand
JLine ãæŽæ°ããŠãWindows ãã Ctrl-C ãåäœããªãåé¡ã®ä¿®æ£ã #1855 by @eed3si9n
ãã«ãã¬ãã«ã®ããŒã®åŠçã誀ã£ãŠãã 0.13.11 ãã 0.13.13 ã®ãªã°ã¬ãã·ã§ã³ã®ä¿®æ£ã #2851 /#2460 by @eed3si9n
Compile
ãç¶æ¿ããªãã³ã³ãã£ã®ã¥ã¬ãŒã·ã§ã³ã«ãããŠã Scala ããŒãžã§ã³ã®åŒ·å¶ãè¡ã£ãŠãã sbt 0.13.12 ã«ããããªã°ã¬ãã·ã§ã³ã®ä¿®æ£ã #2827 /#2786 by @eed3si9n
ã¹ã¯ãªããã¢ãŒãã«ãããŠã¯ã©ãŒããŒã·ã§ã³ãç¡èŠãããŠããããšã®ä¿®æ£ã #2551 by @ekrich
Ivy ããšããã IllegalStateException ã«ãªãããšã®ä¿®æ£ã #2827 /#2015 by @eed3si9n
sourceFile ã null ã®ãšãã« NPE ãã§ãããšã®ä¿®æ£ã #2766 by @avdv
Maven ã®ããŒãžã§ã³ã¬ã³ãžã®æ¹å
以åã¯ãäŸåæ§è§£æ±º (Ivy) ã [1.3.0,)
ãšãã£ã Maven ã®ããŒãžã§ã³ã¬ã³ãžãèŠã€ãããš Internet ã«è¡ã£ãŠææ°ã®ããŒãžã§ã³ãæ¢ãã«è¡ã£ãŠãããããã¯ãç¯å²ã®æ¡ä»¶ãæºããã©ã€ãã©ãªããã«ãå
ã«ãã£ããšããŠã æçµçãªããŒãžã§ã³ãçµå¹Žå€åãããšããé©ãã¹ãæ¯ãèããããŠããã
2017-03-06
/ scala
ãã°ããèããŠããçåãããã€ããã:
ããŒã¿ã API ã¯ã©ãæžãããã¹ãã ããã?
ãã®ããŒã¿ã¯ Java ã Scala ã§ã¯ã©ãè¡šçŸãããã¹ãã?
ãã®ããŒã¿ã¯ JSON ãªã©ã®ã¯ã€ã€ãŒãã©ãŒãããã«ã©ãå€æããããšãã§ããã?
ãã®ããŒã¿ãã©ããã£ãŠãã€ããªäºææ§ã厩ããã«é²åãããããšãã§ããã?
case class ã®éç
Scala ã§ããŒã¿åãè¡šçŸããæ
£çšçãªæ¹æ³ã¯ sealed trait ãš case class ã ãããã€ããªäºææ§ãä¿ã£ããŸãŸãã£ãŒã«ããè¿œå ããããšãã§ããªããç°¡å㪠Greeting
ãšãã case class ãäŸã«åã£ãŠããããã©ã®ãããªã¯ã©ã¹ãšã³ã³ãããªã³ãªããžã§ã¯ãã«å±éããããèå¯ããŠã¿ãã:
package com.example
class Greeting ( name: String ) {
override def equals( o: Any ) : Boolean = ???
override def hashCode: Int = ???
override def toString: String = ???
def copy( name: String = name) : Greeting = ???
}
object Greeting {
def apply( name: String ) : Greeting = ???
def unapply( v: Greeting ) : Option [ String ] = ???
}
Read MoreâŠ
2017-03-05
ååã® Dale Wijnand (@dwijnand ) ãšäžç·ã« ScalaSphere ã§ããŒã¯ãããŠãããThe state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver) :
2017-01-09
/ scala
Gigahorse 0.2.0 ããªãªãŒã¹ãããæ°æ©èœã¯ 2ã€ã®ããã¯ãšã³ããéžã¹ãããã«ãªã£ãããšã ã
@alexdupre ããã AHC 1.9 ãã Netty 4 ããŒã¹ã® AHC 2.0 ãžã®ç§»è¡ãã³ã³ããªãã¥ãŒãããŠãããã#12
ããã«ã#15 ã§åãå®éšç㪠Akka HTTP ãµããŒããè¿œå ããã
詳ãã㯠Gigahorse ããã¥ã¡ã³ã ãåç
§ããŠã»ããã
2016-11-04
/ scala
æšæ¥ãªãªãŒã¹ãããã°ããã® Scala 2.12.0 ã®ãªãªãŒã¹ããŒãã翻蚳ããŸããã
Lightbend 瀟 Scala ããŒã ã®ã³ã³ãã€ã©éãæãåãããããã¢ãªå
容ã«ãªã£ãŠããŸãã
Scala 2.12.0 ããªãªãŒã¹ãããŸãã!
Scala 2.12 ã³ã³ãã€ã©ã¯ Java 8 ãã䜿ããããã«ãªã£ãæ°ãã VM æ©èœãå©çšããããã«ãå®å
šãªãªãŒããŒããŒã«ãè¡ãããã
ãã¬ã€ãã¯ãããã©ã«ãã¡ãœããä»ãã®ã€ã³ã¿ãŒãã§ã€ã¹ã«çŽã«ã³ã³ãã€ã«ããã ãããã¯ãã€ããªäºææ§ãš Java ãšã®çžäºéçšæ§ãåäžãããã
Scala ãš Java 8 ã®çžäºéçš (interop) ãšããç¹ã§ã¯ãé¢æ°ãåãåãã¡ãœãããäž¡æ¹åãããã©ã ãæ§æã§åŒã³åºããããã«ãªã£ãã®ã§é¢æ°åãªã³ãŒãã«ãããŠãæ¹åãããScala æšæºã©ã€ãã©ãªã® FunctionN
ã¯ã©ã¹çŸ€ã¯ãSingle Abstract Method (SAM) åãšãªããå
šãŠã® SAMå ã¯ãåæ€æ»ããã³ãŒãçæã«ããããŸã§çµ±äžçã«åãæ±ããã (ã¯ã©ã¹ãã¡ã€ã«ã¯çæãããã代ããã« invokedynamic
ãçšãããã)ã
2016-08-02
gigahorse-github 0.1.0 ããªãªãŒã¹ãããããã¯ãGithub API v3 ã®ããã® Gigahorse ãã©ã°ã€ã³ã ã
2016-07-29
æŽæ°: Gigahorse 0.1.1ãã䜿ã£ãŠãã ããã
Gigahorse 0.1.0 ããªãªãŒã¹ããããã㯠Scala ã®ããã® HTTP ã¯ã©ã€ã¢ã³ãã§ãå
éšã«Async Http Client ã䜿ã£ãŠããã詳ãã㯠Gigahorse ããã¥ã¡ã³ã ãæžããã®ã§ããããåç
§ããŠã»ãããã©ã€ãã©ãªãã©ãããæããªã®ããäŸã§ã¿ããšãããªæãã ã
scala> import gigahorse._
scala> import scala.concurrent._, duration. _
scala> Gigahorse . withHttp( Gigahorse . config) { http =>
val r = Gigahorse . url( "http://api.duckduckgo.com" ). get.
addQueryString(
"q" -> "1 + 1" ,
"format" -> "json"
)
val f = http. run( r, Gigahorse . asString andThen { _ . take( 60 )})
Await . result( f, 120. seconds)
}
2016-07-03
ããæè¿èããŠããããã¿ãŒã³ãããã£ãŠããªããžã§ã¯ããæ°žç¶å/ã·ãªã¢ã©ã€ãŒãŒã·ã§ã³ããã¿ãããªç¶æ³ã§åºãŠããã
åé¡æèµ·ãšããŠã以äžã®ãã㪠case class ãèããŠã¿ãŠã»ãã:
scala> case class User ( name: String , parents: List [ User ])
defined class User
scala> val alice = User ( "Alice" , Nil )
alice: User = User ( Alice , List ())
scala> val bob = User ( "Bob" , alice : : Nil )
bob: User = User ( Bob , List ( User ( Alice , List ())))
scala> val charles = User ( "Charles" , bob : : Nil )
charles: User = User ( Charles , List ( User ( Bob , List ( User ( Alice , List ())))))
scala> val users = List ( alice, bob, charles)
users: List [ User ] = List ( User ( Alice , List ()), User ( Bob , List ( User ( Alice , List ()))),
User ( Charles , List ( User ( Bob , List ( User ( Alice , List ()))))))
Read MoreâŠ
2016-06-06
/ scala
æ¬çš¿ã¯ sjson-new ã«é¢ãã第3éšã ãããŒã1 ãããŒã2 ãæ¯éèªãã§ã¿ãŠã»ããã
sbt ã®ã³ãŒãå
ã«ã¯ããŒã¿æ°žç¶åãæ°çŸã¡ã¬ãã€ãã®ãªãŒããŒã«éããŠããéšåãããã€ããã£ãŠãç¹ã«ãã·ã³ã« SSD ãç©ãŸããŠããªãå Žåã¯æ§èœããã«ããã¯ã«ãªãçããããããããªãããšæã£ãŠããã
åœç¶ãæåã«é£ã³ã€ããã®ã¯ Google Protocol Buffers ã®ãšã³ã³ãŒãã£ã³ã°ãåèã«ç¬èªã®ãã€ããªãã©ãŒããããå®è£
ããããšã ã£ãã
sbt-jmh ãçšãããã€ã¯ããã³ãããŒã¯
åããŸãããã¹ãã ã£ãã®ã¯ããã³ãããŒã¯ãåãããšã ã@ktosopl (Konrad Malawski) åã® sbt-jmh ã䜿ããšãã€ã¯ããã³ãããŒã¯ã¯ç°¡åã«äœãããšãã§ããããã«ãã«ãã©ã°ã€ã³ãå
¥ããŠãJmhPlugin
ãæå¹åãããµããããžã§ã¯ããå®çŸ©ããã ãã ã
lazy val benchmark = ( project in file( "benchmark" )).
dependsOn( supportSpray). // add other subprojects you want to test
enablePlugins( JmhPlugin ).
settings(
libraryDependencies ++= Seq ( jawnSpray, lm),
// sbt-jmh forks the run, so you would need these
javaOptions in ( Jmh , run) ++= Seq ( "-Xmx1G" , "-Dfile.encoding=UTF8" ),
publish : = {},
publishLocal : = {},
PgpKeys . publishSigned : = {}
)
Read MoreâŠ
2016-05-24
/ scala
2ã¶æãããåã« sjson-new ã«ã€ããŠæžãããé±æ«ã«ãŸãã¡ãã£ãšããã£ãŠã¿ãã®ã§ãããã«å ±åããã
åå㯠Scala ãšã³ã·ã¹ãã ã«ããã JSON ã©ã€ãã©ãªã®å®¶ç³»ããã©ã£ãŠãè€æ°ããã¯ãšã³ãã«å¯Ÿå¿ãããã€åã¯ã©ã¹ããŒã¹ã® JSON ã³ãŒããã¯ã©ã€ãã©ãªãšããæŠå¿µãå°å
¥ããã課é¡ã¯ãã«ã¹ã¿ã ã³ãŒããã¯ãç°¡åã«å®çŸ©ã§ããããã«ããå¿
èŠããããšããããšã ã£ãã
ç§å®¶ç shapeless
4æã«æžããã®ãšå
é±ãŸã§ã®éã« flatMap(Oslo) 2016 ãš Scala Days New York 2016 ãšãã 2ã€ã®ã«ã³ãã¡ã¬ã³ã¹ããã£ããæ®å¿µãªãããå㯠flatMap ã®æ¹ã«ã¯è¡ããªãã£ããã©ããDaniel Spiewak ããã® “Roll Your Own Shapeless” (ãç§å®¶ç Shapeless ã®ãããã) ãšããããŒã¯ã New York ã§èãããflatMap ç ã®æ¹ãå®å
šçã§ãã㯠vimeo ã«ãåºãŠãã®ã§ãæ¯éãã§ãã¯ããŠã¿ãŠã»ããã
sbt ã®å
éšã§ã¯ãsbinary ãçšãããã£ãã·ã³ã°ã« HList ãçšããããŠãããã:
implicit def mavenCacheToHL = ( m: MavenCache ) => m. name : *: m.rootFile.getAbsolutePath :*: HNil
implicit def mavenRToHL = ( m: MavenRepository ) => m. name : *: m.root :*: HNil
...
Read MoreâŠ
2016-04-11
é±æ«ã«è¶£å³ããã°ã©ãã³ã°ããã人ã®ããã® Github organization ãšã㊠foundweekends ãäœã£ããåå ããã人㯠twitter ã Gitter ã§å£°ããããŠãã ããã
åœé¢ã®æŽ»å㯠@n8han ãã conscript ãgiter8 ãpamflet ãåŒãç¶ãããšã ã
2016-04-04
/ scala
èæ¯
ãœãããŠã§ã¢ãããžã§ã¯ããèããé¢çœãæ¹æ³ã®äžã€ãšããŠãæåŠçãªè§£æããããšæããã€ãŸããå®éã®ã³ãŒãã®åé¢ãè¿œãã ããããªããŠã誰ãããã€ãäœæ
(ã©ããã£ãåé¡ã解決ããããã«) ã©ã®ããã«ã㊠(äœã®åœ±é¿ãåããŠ) æžããã®ããèå¯ããããšã ããããã£ãæå³ã§ã¯ãScala ãšã³ã·ã¹ãã ã«ãããŠã¯ JSON ã©ã€ãã©ãªã»ã©è±ããªãžã£ã³ã«ã¯ä»ã«ç¡ãã®ã§ã¯ãªãã ãããã
2008幎12æã« Programming in Scala ã®åçãåºãŠãJSON ã¯ããŒãµã»ã³ã³ãããŒã¿ã®äžäŸãšããŠåºãŠããŠãJSON ããŒãµã 10è¡ãããã®ã³ãŒãã§æžããããšã瀺ãã:
import scala.util.parsing.combinator._
class JSON extends JavaTokenParsers {
def value : Parser [ Any ] = obj | arr |
stringLiteral |
floatingPointNumber |
"null" | "true" | "false"
def obj : Parser [ Any ] = "{" ~ repsep( member, "," )~ "}"
def arr : Parser [ Any ] = "[" ~ repsep( value, "," )~ "]"
def member: Parser [ Any ] = stringLiteral~ ":" ~ value
}
Read MoreâŠ
2016-03-22
/ sbt
ããã¯å
æ¥æžãã sbt 1.0 ããŒãããã ã®ç¶ç·šã ããã®èšäºã§ã¯ sbt server ã®æ°ããå®è£
ã玹ä»ãããææ³ãã³ã¡ã³ããããã° sbt-dev mailing list ã«ãé¡ãããŸãã
sbt server ã®åæ©ã¯ IDE ãšã®çµ±åã®æ¹åã ã
ãã«ãã¯ã巚倧ã§ãå¯å€ã§ãå
±æããããç¶æ
ã®ããã€ã¹ã ããã£ã¹ã¯ã®ããšã ã! ãã«ãã¯ãã£ã¹ã¯äžã§åäœããã®ãã§ãã£ãŠããã£ã¹ã¯ããéããããšã¯ã§ããªãã
– Josh SuerethãThe road to sbt 1.0 is paved with server ãã
ãã·ã³ã«ç©ãã§ãããã£ã¹ã¯ã¯æ ¹æ¬çã«ã¹ããŒããã«ãªãã®ã§ãããsbt ãã¿ã¹ã¯ã䞊è¡å®è¡ã§ããã®ããããäœçšã«é¢ããå®å
šãªã³ã³ãããŒã«ãæã£ãŠããããšã倧åæã«ãªã£ãŠãããåããã«ãã«å¯Ÿã㊠sbt ãš IDE ãåæã«å®è¡ããŠããããè€æ°ã® sbt ã€ã³ã¹ã¿ã³ã¹ãå®è¡ããŠããå Žåã¯ãsbt ã¯ãã«ãã®ç¶æ
ã«é¢ããŠäžåä¿èšŒããããšãã§ããªãã
2016-03-11
/ sbt
sbt 1.0 ã«ã«é¢ã㊠TLäžãšãã§è°è«ããã£ãã®ã§ãå©ãå°ãšããŠãããæžãããšã«ãããäœããã¡ãããšãªãªãŒã¹ã§ããããã«ä»åãçŽãããããã®äžæçãªããã·ã§ã³ã»ã¹ããŒãã¡ã³ãã ãšæã£ãŠã»ãããsbt-dev mailing list ã«ãŠä»åŸãè°è«ãç¶ããŠããããã
ã¿ã€ãã³ã°
ã〠sbt 1.0 ããªãªãŒã¹ã§ããããšããäºå®ã¯ãŸã èŠåœãä»ããŠããªãã
sbt 1.0 ã®æ倧ã®æ©èœã¯ã³ãŒãã®åçµç¹ã§ãããã¯æ¢ã«é²ãã§ãã: http://www.scala-sbt.org/0.13/docs/Modularization.html
sbt/ioã sbt/utilã sbt/librarymanagementã sbt/incrementalcompiler ãšãã£ãã¢ãžã¥ãŒã«ããããå®è£
ãšãã芳ç¹ãããããšã€ã³ã¯ãªã¡ã³ã¿ã«ã³ã³ãã€ã©ã sbt ã®äžã§äžçªè€éãªéšåã ãšæãã®ã§ããŸãã¯ãããã¢ãžã¥ãŒã«åããããšãç®æšãšããŠãããå
šéšã®ã¢ãžã¥ãŒã«ã® API ãå®å®ãããšãããsbt æ¬äœã«ã 1.0 ãä»ãããæã«ãªãã
ã¢ãžã¥ãŒã«åã®åæ©
sbt/sbt ã®çŸåšã®ã³ãŒãã¯ããã«ããŠãŒã¶ããã©ã°ã€ã³äœè
ã«å
éšãæããããŠãããããã«ãã£ãŠãšã£ã€ãã¥ããã³ãŒãã«ãªã£ãŠãããããã«ããã€ããªäºææ§ãä¿ã€ã®ãé£ãããªã£ãŠããã
ã¢ãžã¥ãŒã«åã®ç®æšã¯ã©ããŸã§ã public 㪠API ã§ã©ãããã private ãªå®è£
ãªã®ãã®å¢çãããããªãããããšã ã
ããšããããã®ã¢ãžã¥ãŒã«ã¯ä»ãŸã§äœ¿ã£ãŠããã㪠Ivy ãªããžããªãããªã㊠Maven Central ã«ä¹ããã
sbt/zinc
æ°ããã€ã³ã¯ãªã¡ã³ã¿ã«ã³ã³ãã€ã©ã¯å®å
šã« name hashing ã«ç§»è¡ãããname hashing ã¯ãã°ããå (sbt 0.13.6) ããããã©ã«ãã§ãªã³ã«ãªã£ãŠãããããã ããããªããŠãã¯ã©ã¹ããŒã¹ã® name hashing ã䜿ãäºå®ã§ãããã¯æ§èœæ¹åãæåŸ
ãããŠããã
Java ããŒãžã§ã³
sbt 0.13 㯠JDK 6 ã®äžã«æžãããŠãããsbt 1.0 㯠JDK 8 ããŒã¹ã ã