Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update all sorts of stuff #82

Merged
merged 3 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
22 changes: 14 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '17']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run tests
run: ./mill -i all __.publishArtifacts __.test

check-binary-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Check Binary Compatibility
run: ./mill -i __.mimaReportBinaryIssues
Expand All @@ -45,9 +51,10 @@ jobs:
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Publish to Maven Central
run: |
Expand All @@ -72,5 +79,4 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body:
draft: false
1 change: 1 addition & 0 deletions .mill-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.10.5
41 changes: 19 additions & 22 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
import mill.scalalib.api.Util.isScala3
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima::0.0.9`
import $ivy.`com.github.lolgab::mill-mima::0.0.11`
import com.github.lolgab.mill.mima._

val dottyVersions = sys.props.get("dottyVersion").toList
val dottyCommunityBuildVersion = sys.props.get("dottyVersion").toList

val scala2VersionsAndDotty = "2.12.13" :: "2.13.4" :: "2.11.12" :: dottyVersions
val scala30 = "3.0.2"
val scala31 = "3.1.1"
val scalaVersions =
"2.12.16" :: "2.13.8" :: "2.11.12" :: "3.1.3" :: dottyCommunityBuildVersion

val scalaJSVersions = for {
scalaV <- scala30 :: scala2VersionsAndDotty
scalaJSV <- Seq("0.6.33", "1.5.1")
if scalaV.startsWith("2.") || scalaJSV.startsWith("1.")
} yield (scalaV, scalaJSV)

val scalaNativeVersions = for {
scalaV <- scala31 :: scala2VersionsAndDotty
scalaNativeV <- Seq("0.4.4")
} yield (scalaV, scalaNativeV)
val scalaJSVersions = scalaVersions.map((_, "1.10.1"))
val scalaNativeVersions = scalaVersions.map((_, "0.4.5"))

trait PPrintModule extends PublishModule with Mima {
def artifactName = "pprint"
Expand All @@ -29,10 +20,17 @@ trait PPrintModule extends PublishModule with Mima {

def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq

def crossScalaVersion: String

// Temporary until the next version of Mima gets released with
// https://github.com/lightbend/mima/issues/693 included in the release.
def mimaPreviousArtifacts =
if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts()

def pomSettings = PomSettings(
description = artifactName(),
organization = "com.lihaoyi",
url = "https://github.com/lihaoyi/PPrint",
url = "https://github.com/com-lihaoyi/PPrint",
licenses = Seq(License.MIT),
versionControl = VersionControl.github(
owner = "com-lihaoyi",
Expand All @@ -46,8 +44,8 @@ trait PPrintModule extends PublishModule with Mima {
trait PPrintMainModule extends CrossScalaModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(
ivy"com.lihaoyi::fansi::0.3.1",
ivy"com.lihaoyi::sourcecode::0.2.8"
ivy"com.lihaoyi::fansi::0.4.0",
ivy"com.lihaoyi::sourcecode::0.3.0"
)
def compileIvyDeps =
if (crossScalaVersion.startsWith("2")) Agg(
Expand All @@ -70,7 +68,7 @@ trait PPrintMainModule extends CrossScalaModule {

trait PPrintTestModule extends ScalaModule with TestModule.Utest {
def crossScalaVersion: String
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.7.11")
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.0")
def offset: os.RelPath = os.rel
def millSourcePath = super.millSourcePath / os.up

Expand All @@ -88,7 +86,7 @@ trait PPrintTestModule extends ScalaModule with TestModule.Utest {
}

object pprint extends Module {
object jvm extends Cross[JvmPPrintModule](scala30 :: scala2VersionsAndDotty:_*)
object jvm extends Cross[JvmPPrintModule](scalaVersions:_*)
class JvmPPrintModule(val crossScalaVersion: String)
extends PPrintMainModule with ScalaModule with PPrintModule {
object test extends Tests with PPrintTestModule{
Expand All @@ -99,6 +97,7 @@ object pprint extends Module {
object js extends Cross[JsPPrintModule](scalaJSVersions:_*)
class JsPPrintModule(val crossScalaVersion: String, crossJSVersion: String)
extends PPrintMainModule with ScalaJSModule with PPrintModule {

def offset = os.up
def scalaJSVersion = crossJSVersion
object test extends Tests with PPrintTestModule{
Expand All @@ -112,8 +111,6 @@ object pprint extends Module {
extends PPrintMainModule with ScalaNativeModule with PPrintModule {
def offset = os.up
def scalaNativeVersion = crossScalaNativeVersion
// Remove after Scala Native Scala 3 artifacts are published
def mimaPreviousArtifacts = T{ if(isScala3(scalaVersion())) Seq() else super.mimaPreviousArtifacts() }
object test extends Tests with PPrintTestModule{
def offset = os.up
val crossScalaVersion = NativePPrintModule.this.crossScalaVersion
Expand Down
2 changes: 1 addition & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a wrapper script, that automatically download mill from GitHub release pages
# You can give the required mill version with MILL_VERSION env variable
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
DEFAULT_MILL_VERSION=0.10.0-35-11bc3c
DEFAULT_MILL_VERSION=0.10.5

set -e

Expand Down
2 changes: 1 addition & 1 deletion pprint/src-2.13/pprint/StringPrefix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package pprint

object StringPrefix{
def apply(i: Iterable[_]) = i.asInstanceOf[{ def collectionClassName: String }].collectionClassName
}
}