Skip to content

Adding itSettings breaks the runner #12

@steinybot

Description

@steinybot

Reproduction: https://github.com/steinybot/bug-reports/tree/kamon/sbt-runner

This works fine:

scalaVersion := "2.13.5"

run / fork := true
sbt:bug-reports> inspect Compile/run/runner
[info] Task: sbt.ScalaRun
[info] Description:
[info] 	Implementation used to run a main class.
[info] Provided by:
[info] 	ProjectRef(uri("file:/Users/jason/source/bug-reports/"), "bug-reports") / Compile / run / runner
[info] Defined at:
[info] 	Defaults.scala:2566
[info] 	(kamon.instrumentation.sbt.SbtKanelaRunner.projectSettings) SbtKanelaRunner.scala:48

But adding integration test settings breaks it:

scalaVersion := "2.13.5"

run / fork := true
configs(IntegrationTest)
Defaults.itSettings
sbt:bug-reports> inspect Compile/run/runner
[info] Task: sbt.ScalaRun
[info] Description:
[info] 	Implementation used to run a main class.
[info] Provided by:
[info] 	ProjectRef(uri("file:/Users/jason/source/bug-reports/"), "bug-reports") / Compile / run / runner
[info] Defined at:
[info] 	/Users/jason/source/bug-reports/build.sbt:5

I haven't tracked down the cause of this yet but it is a bit strange. Defaults.itSettings are scoped to IntegrationTest so I don't see how that is messing with tasks in the Compile configuration.

One thing that I did notice is that SbtKanelaRunner overrides projectConfigurations. Should it be adding the configuration to super.projectConfigurations instead?

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