Skip to content

Conversation

lolgab
Copy link

@lolgab lolgab commented Oct 4, 2025

No description provided.

buildRootDir / s".$millVersionName",
buildRootDir / ".config" / millVersionName
).collectFirstSomeM(fileAlg.readFile).map(_.flatMap(parser.parseMillVersion))
val fromBuildFile = List(buildRootDir / "build.mill", buildRootDir / "build.mill.scala")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build.sc is missing here. Also build.mill.yaml.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build.sc is not here since it doesn't have a yaml header to parse.
I'm going to add build.mill.yaml. But, is it already supported? Maybe can be added in a follow up PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wasn't aware build.sc does not support a YAML header. I think that's nowhere documented. build.mill.yaml is supported in Mill main and snapshot releases, but has a slightly different format (pure YAML without the comment-prefix), so no need to add it right now. I was just mentioning it for completeness.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, Mill does read YAML-headers from build.sc files. We should also add support for them.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Maybe, the extra empty lead line in the YAML frontmatter tests is superfluous.

@lolgab lolgab marked this pull request as ready for review October 14, 2025 14:07
@lefou
Copy link
Member

lefou commented Oct 14, 2025

@mzuehlke Could you please approve the CI workflow for this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MillAlgTest needs fix:

==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, version < 0.11  0.04s munit.ComparisonFailException: modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillAlgTest.scala:32
31:    )
32:    assertEquals(state, expected)
33:  }
values are not the same
=> Diff (- expected, + obtained)
         "read",
-        "/tmp/scala-steward/workspace/lihaoyi/fastparse/.mill-version"
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill"
       )
         "read",
-        "/tmp/scala-steward/workspace/lihaoyi/fastparse/.config/mill-version"
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill.scala"
       )
       cmd = List(
+        "read",
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.sc"
+      )
+    ),
+    Cmd(
+      cmd = List(
         "write",
    at munit.FunSuite.assertEquals(FunSuite.scala:13)
    at org.scalasteward.core.buildtool.mill.MillAlgTest.$anonfun$new$1(MillAlgTest.scala:32)
==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, 0.11 <= version < 0.12  0.004s org.scalasteward.core.buildtool.mill.parser$CirceParseError: Failed to decode Modules
    at org.scalasteward.core.buildtool.mill.parser$.$anonfun$parseModules$1(parser.scala:43)
    at cats.syntax.EitherOps$.leftMap$extension(either.scala:193)
    at org.scalasteward.core.buildtool.mill.parser$.parseModules(parser.scala:43)
    at org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:85)
    at cats.data.Kleisli.$anonfun$flatMap$4(Kleisli.scala:75)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
    at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.readResource(FileAlg.scala:111)
    at get @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$2(MockProcessAlg.scala:15)
    at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
    at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
    at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$14(MockProcessAlg.scala:37)
    at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
    at flatMap @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
Caused by: ParsingFailure: exhausted input

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants