Skip to content

Instantly share code, notes, and snippets.

@alexarchambault
Forked from paulp/failures
Last active August 28, 2016 00:19
Show Gist options
  • Save alexarchambault/a513a23fe1dc85dc083c49b9fbac6871 to your computer and use it in GitHub Desktop.
Save alexarchambault/a513a23fe1dc85dc083c49b9fbac6871 to your computer and use it in GitHub Desktop.
testing coursier as a drop-in replacement
[SKIP] maxaf/dandy ivy failed.
[PASS] typesafehub/dbuild ivy ok, coursier ok.
[PASS] stacycurl/delta ivy ok, coursier ok.
[SKIP] xdotai/diff ivy failed.
[PASS] mkroli/dns4s ivy ok, coursier ok.
[PASS] stew/dogs ivy ok, coursier ok.
[PASS] tpolecat/doobie ivy ok, coursier ok.
[SKIP] smarter/dotty-bridge ivy failed.
[PASS] djspiewak/emm ivy ok, coursier ok.
[PASS] ensime/ensime-sbt ivy ok, coursier ok.
[PASS] ensime/ensime-server ivy ok, coursier ok.
[PASS] lloydmeta/enumeratum ivy ok, coursier ok.
[PASS] lihaoyi/fastparse ivy ok, coursier ok.
[PASS] 47deg/fetch ivy ok, coursier ok.
[SKIP] vjovanov/finally-tagless ivy failed.
[PASS] felixmulder/fool ivy ok, coursier ok.
[PASS] fpinscala/fpinscala ivy ok, coursier ok.
[PASS] ProjectSeptemberInc/freek ivy ok, coursier ok.
[PASS] functional-streams-for-scala/fs2 ivy ok, coursier ok.
[PASS] timperrett/functional-microservice-example ivy ok, coursier ok.
[PASS] gitbucket/gitbucket ivy ok, coursier ok.
[PASS] http4s/http4s ivy ok, coursier ok.
[PASS] inc-lc/ilc-scala ivy ok, coursier ok.
[PASS] johnynek/inliner ivy ok, coursier ok.
[PASS] non/irreg ivy ok, coursier ok.
[PASS] travisbrown/iteratee ivy ok, coursier ok.
[PASS] non/jawn ivy ok, coursier ok.
[PASS] bkgood/jnr-hdf5 ivy ok, coursier ok.
[PASS] json4s/json4s-ast ivy ok, coursier ok.
[PASS] alexarchambault/jupyter-scala ivy ok, coursier ok.
[PASS] non/kind-projector ivy ok, coursier ok.
[PASS] oncue/knobs ivy ok, coursier ok.
[PASS] lagom/lagom ivy ok, coursier ok.
[PASS] typelevel/machinist ivy ok, coursier ok.
[PASS] slamdata/matryoshka ivy ok, coursier ok.
[PASS] storm-enroute/mecha ivy ok, coursier ok.
[PASS] tiarkrompf/minidot ivy ok, coursier ok.
[SKIP] nscala-time/nscala-time ivy failed.
[SKIP] m50d/paperdoll ivy failed.
[PASS] scalamacros/paradise ivy ok, coursier ok.
[PASS] Duhemm/parsermacros ivy ok, coursier ok.
[SKIP] refried/project-common ivy failed.
[PASS] melrief/pureconfig ivy ok, coursier ok.
[PASS] quasar-analytics/quasar ivy ok, coursier ok.
[PASS] S-Mach/s_mach.codetools ivy ok, coursier ok.
[PASS] S-Mach/s_mach.datadiff ivy ok, coursier ok.
[PASS] sbt/sbt ivy ok, coursier ok.
[PASS] jrudolph/sbt-dependency-graph ivy ok, coursier ok.
[PASS] sbt/sbt-git ivy ok, coursier ok.
[PASS] bytedeco/sbt-javacv ivy ok, coursier ok.
[PASS] timcharper/sbt-jnaerator ivy ok, coursier ok.
[PASS] mentat-labs/sbt-nsa ivy ok, coursier ok.
[PASS] scala/scala ivy ok, coursier ok.
[PASS] slamdata/scala-abt ivy ok, coursier ok.
[SKIP] runarorama/scala-bound ivy failed.
[PASS] ensime/scala-debugger ivy ok, coursier ok.
[PASS] ipfs/scala-ipfs-api ivy ok, coursier ok.
[SKIP] scala/scala-java8-compat ivy failed.
[PASS] typesafehub/scala-logging ivy ok, coursier ok.
[SKIP] regb/scala-smtlib ivy failed.
[SKIP] theon/scala-uri ivy failed.
[PASS] scoverage/scalac-scoverage-plugin ivy ok, coursier ok.
[PASS] cb372/scalacache ivy ok, coursier ok.
[PASS] rickynils/scalacheck ivy ok, coursier ok.
[PASS] olafurpg/scalafmt ivy ok, coursier ok.
[PASS] scalameta/scalameta ivy ok, coursier ok.
[PASS] scalaprops/scalaprops ivy ok, coursier ok.
[SKIP] typelevel/scalaz-outlaws ivy failed.
[SKIP] scaled/scaled ivy failed.
[PASS] scalikejdbc/scalikejdbc ivy ok, coursier ok.
[PASS] scodec/scodec ivy ok, coursier ok.
[SKIP] pchiusano/scodec-bits ivy failed.
[PASS] milessabin/shapeless ivy ok, coursier ok.
[PASS] hughsimpson/sigterms ivy ok, coursier ok.
[PASS] mpilquist/simulacrum ivy ok, coursier ok.
[PASS] okomok/sing ivy ok, coursier ok.
[PASS] non/spire ivy ok, coursier ok.
[PASS] spray/spray ivy ok, coursier ok.
[PASS] fommil/spray-json-shapeless ivy ok, coursier ok.
[PASS] tetrao-eu/template-site ivy ok, coursier ok.
[SKIP] sbt/test-interface ivy failed.
[PASS] tpolecat/tut ivy ok, coursier ok.
[PASS] typelevel/typeclassic ivy ok, coursier ok.
[PASS] channingwalton/typeclassopedia ivy ok, coursier ok.
[PASS] densh/typelog ivy ok, coursier ok.
[PASS] typelevel/wartremover ivy ok, coursier ok.
[PASS] typesafehub/zinc ivy ok, coursier ok.
#!/usr/bin/env bash
#
# Search scala repos for ones where standard update succeeds
# where coursier fails.
#
# To run:
#
# cd /dir/containing/many/repos
# tester.sh * >log &
# tail -F log | egrep --line-buffered -w '(PASS|FAIL|SKIP)'
#
set -euo pipefail
die () { echo >&2 "$@" && exit 1; }
run () { echo >&2 "$@" && "$@"; }
sbtOpts="-no-colors -batch"
repoSlug () {
git config --local --get remote.origin.url \
| perl -pe 's#.*?://github[.]com/##' \
| perl -pe 's#/$##' \
| perl -pe 's/[.]git$//'
}
runSbt () {
local log="sbtx-$1.log"
local extra=""
if [[ -f project/build.properties ]]; then
sbtminor="$(ack -o '(?<=0[.]13[.])\d+$' project/build.properties)"
if [[ -n "$sbtminor" ]] && (( sbtminor < 8 )); then
extra="-sbt-version 0.13.12"
fi
fi
if [[ -n "$(find . -type d -name test)" ]]; then
targets="update test:update"
else
targets="update"
fi
run sbtx $extra $sbtOpts $targets |& ts | tee "$log" | \
while read -r line; do echo "[$1] $line"; done
}
addCoursier () {
echo '
resolvers += Resolver.sonatypeRepo("staging")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
' > project/pspcoursier.sbt
# activate coursier in project too - paulp trick
mkdir -p project/project
cp project/pspcoursier.sbt project/project/pspcoursier.sbt
}
doRepo () {
local repo="$1"
cd "$repo"
git clean -f
local slug="$(repoSlug)"
echo "Trying ivy in $slug..."
# remove any already enabled sbt-coursier
for f in $(grep -l coursier project/*.sbt); do
mv $f $f.0 && grep -v coursier $f.0 > $f && rm -f $f.0
done
if runSbt ivy; then
echo "Trying coursier in $slug..."
addCoursier
if [ -d .coursier-cache ]; then
rm -rf .coursier-cache
fi
if COURSIER_CACHE=$(pwd)/.coursier-cache runSbt coursier; then
echo "[PASS] $slug ivy ok, coursier ok."
else
echo "[FAIL] $slug ivy ok, coursier failed."
fi
else
echo "[SKIP] $slug ivy failed."
fi
}
for d in "$@"; do
( doRepo "$d" )
done
@paulp
Copy link

paulp commented Aug 28, 2016

FWIW

    if [ -d .coursier-cache ]; then
      rm -rf .coursier-cache
    fi

can equally well be written rm -rf .coursier-cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment