-
Notifications
You must be signed in to change notification settings - Fork 90
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
Some keys get silently dropped from output #125
Comments
what version? for example, is this a regression in 0.9.0? |
Sorry, I believe I just observed this with 0.8.0 and 0.9.0. One theory I have is that something is "wrong" with
Still, if some keys are indeed "off-limits", buildinfo shouldn't just silently fail. Any context about any of this is appreciated. I can try to make a smaller repro case if it really isn't expected that things like this would ever happen; I somewhat expected the answer to be that there is something about how BuildInfo gets keys and values, or intrinsic differences between keys, that would explain this behavior. |
yes, looks like
but it's constructed (see the first 2 instances) from
agreed. clearly.
hopefully that give some context and explains some of the behaviour. |
I've configured SBT like this: def thisProject(scope: Scope): Scope = Scope.subThisProject(scope)
def buildinfoSettings(scope: Scope): Seq[Setting[_]] =
Seq(
buildInfoPackage in thisProject(scope) := "build",
buildInfoKeys in thisProject(scope) :=
Seq[BuildInfoKey](
organization in thisProject(scope),
name in thisProject(scope),
version in thisProject(scope),
scalaVersion in thisProject(scope),
sbtVersion in thisProject(scope),
baseDirectory in thisProject(scope),
resourceDirectory in thisProject(scope),
resourceDirectories in thisProject(scope),
sourceManaged in thisProject(scope),
resourceManaged in thisProject(scope),
)) and I've got package build
import scala.Predef._
/** This object was generated by sbt-buildinfo. */
case object BuildInfo {
/** The value is "company". */
val organization: String = "company"
/** The value is "proj-core". */
val name: String = "proj-core"
/** The value is "0.1.0-SNAPSHOT". */
val version: String = "0.1.0-SNAPSHOT"
/** The value is "2.12.7". */
val scalaVersion: String = "2.12.7"
/** The value is "1.2.3". */
val sbtVersion: String = "1.2.3"
/** The value is new java.io.File("/home/rgomes/workspace/proj/proj-core"). */
val baseDirectory: java.io.File = new java.io.File("/home/rgomes/workspace/proj/proj-core"),
/** The value is new java.io.File("/home/rgomes/workspace/proj/proj-core/target/scala-2.12/src_managed"). */
val sourceManaged: java.io.File = new java.io.File("/home/rgomes/workspace/proj/proj-core/target/scala-2.12/src_managed")
/** The value is new java.io.File("/home/rgomes/workspace/proj/proj-core/target/scala-2.12/resource_managed"). */
val resourceManaged: java.io.File = new java.io.File("/home/rgomes/workspace/proj/proj-core/target/scala-2.12/resource_managed")
override val toString: String = {
"organization: %s, name: %s, version: %s, scalaVersion: %s, sbtVersion: %s, sourceManaged: %s, resourceManaged: %s" format (
organization, name, version, scalaVersion, sbtVersion, sourceManaged, resourceManaged
)
}
} I've double checked to see whether my submodule sbt:proj> show proj-core/resourceDirectory
[info] /home/rgomes/workspace/proj/proj-core/src/main/resources
sbt:proj> show proj-core/resourceDirectories
[info] * /home/rgomes/workspace/proj/proj-core/src/main/resources
[info] * /home/rgomes/workspace/proj/proj-core/target/scala-2.12/resource_managed/main I've tested with:
|
The example from the README works for me:
but if I try e.g.:
I get no errors or warnings, but there is no
projectMod
key/value in the output.Why might this be?
The text was updated successfully, but these errors were encountered: