Skip to content

Parse Mill build files (build.mill / build.sc) #86

Description

@andrew

Mill (https://github.com/com-lihaoyi/mill) is the second-most-common Scala build tool after sbt. internal/maven/sbt.go already parses build.sbt and sbt's dependencyDot output; Mill has no equivalent parser, so a Mill project's declared dependencies are invisible.

Mill declares dependencies as string literals inside build.mill (Mill 0.12+) or build.sc (older):

def ivyDeps = Seq(
  ivy"org.typelevel::cats-core:2.12.0",   // :: is Scala cross-versioned
  ivy"com.google.guava:guava:33.2.1-jre", // :  is a plain Maven coordinate
)

Mill 0.12+ also accepts mvn"..." as an alias for ivy"...". Both forms map to Maven coordinates: :: expands to groupId:artifactId_<scalaBinaryVersion>:version (the binary version can be left as-is in the raw name, matching how sbt.go handles %%), and single : is groupId:artifactId:version verbatim.

A regex over ivy"..." / mvn"..." literals would give declared-dependency coverage on par with the existing build.sbt parser. Registration:

core.Register("maven", core.Manifest, &millParser{}, core.ExactMatch("build.mill", "build.sc"))

Related: #77 (JVM row) tracks other Maven-ecosystem format additions.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions