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

generate incorrect value since 0.13.0 #211

Closed
xuwei-k opened this issue Nov 7, 2024 · 1 comment · Fixed by #212
Closed

generate incorrect value since 0.13.0 #211

xuwei-k opened this issue Nov 7, 2024 · 1 comment · Fixed by #212

Comments

@xuwei-k
Copy link
Member

xuwei-k commented Nov 7, 2024

project/build.properties

sbt.version=1.10.5

build.sbt

lazy val a1 = project.settings(scalaVersion := "2.13.15")

lazy val a2 = project.settings(scalaVersion := "3.3.4")

lazy val a3 = project
  .enablePlugins(BuildInfoPlugin)
  .settings(
    Compile / buildInfoKeys := List[BuildInfoKey](
      BuildInfoKey.map(a1 / scalaVersion)("scalaVersion_a1" -> _._2),
      BuildInfoKey.map(a2 / scalaVersion)("scalaVersion_a2" -> _._2),
    )
  )

a3/target/scala-2.12/src_managed/main/sbt-buildinfo/BuildInfo.scala

sbt-buildinfo 0.12.0

// $COVERAGE-OFF$
package buildinfo

/** This object was generated by sbt-buildinfo. */
case object BuildInfo {
  /** The value is "2.13.15". */
  val scalaVersion_a1: String = "2.13.15"
  /** The value is "3.3.4". */
  val scalaVersion_a2: String = "3.3.4"
  override val toString: String = {
    "scalaVersion_a1: %s, scalaVersion_a2: %s".format(
      scalaVersion_a1, scalaVersion_a2
    )
  }
}
// $COVERAGE-ON$

sbt-buildinfo 0.13.0

// $COVERAGE-OFF$
package buildinfo

/** This object was generated by sbt-buildinfo. */
case object BuildInfo {
  /** The value is "2.12.20". */
  val scalaVersion_a1: String = "2.12.20"
  /** The value is "2.12.20". */
  val scalaVersion_a2: String = "2.12.20"
  override val toString: String = {
    "scalaVersion_a1: %s, scalaVersion_a2: %s".format(
      scalaVersion_a1, scalaVersion_a2
    )
  }
}
// $COVERAGE-ON$
@eed3si9n
Copy link
Member

eed3si9n commented Nov 7, 2024

Thank for the report!

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 a pull request may close this issue.

2 participants