Skip to content

Compile error in generated sources for contrib.jmh.JmhModule in 1.0.3 #5682

@jackkoenig

Description

@jackkoenig

This issue is not present in 1.0.2 but shows up in 1.0.3.

For a simple use of JmhModule:

package build.benchmark

import mill._
import mill.scalalib._
import mill.scalalib.scalafmt._
import mill.contrib.jmh.JmhModule

object `package` extends ScalaModule with JmhModule {
  def scalaVersion = "2.13.16"
  def jmhCoreVersion = "1.37"
}

I get the following compile error in the generated sources:

[build.mill-59] [error] -- Error: /Users/koenig/work/chisel/out/mill-build/generatedScriptSources.dest/wrapped/build_/benchmark/package.mill:11:7       
[build.mill-59] [error] 11 |object package_ extends package_ {
[build.mill-59] [error]    |       ^
[build.mill-59] [error]    |method compileGeneratedSources in trait JmhModule is not a legal implementation of `compileGeneratedSources` in object package_
[build.mill-59] [error]    |  its type             => mill.api.Task.Simple[mill.api.PathRef]
[build.mill-59] [error]    |  does not conform to  => mill.api.Task.Simple[mill.api.PathRef & os.Path]
[build.mill-59] [error] one error found

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