These are chat archives for sbt/sbt
A relaxed chat room about sbt (That interactive build tool). For getting help on sbt, we encourage people to document it on Stackoverflow or subscribing to Lightbend subscription.
unmanaged*- is what you fill with your file manager. And
managed*is what you generate with a code
How can I refer to a scoped key programmatically? I.e. what is the programmatic equivalent of e.g.
Context: neo-sbt-scalafmt defines a TaskKey
scalafmt that formats your sources, but it also defines a scope called
test (https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/master/sbt-scalafmt/src/main/scala/com/lucidchart/sbt/scalafmt/ScalafmtCorePlugin.scala#L143) that only checks if the sources are in line with the expected format. Depending on a SettingKey the TaskKey
scalaFmt is invoked before
compile. I want to introduce a new SettingKey that invokes
scalafmt::test instead. The below compiles, but always runs
if (scalafmtOnCompile.value) scalafmt in resolvedScoped.value.scope else if (scalafmtTestOnCompile.value) (test in scalafmt) in resolvedScoped.value.scope
scalafmttask scope, that's the scope of
testthat I want to use"
intakes one of
Reference. Not sure what those are, will have a look if it's possible to convert a TaskKey into one of them..
test in (resolvedScoped.value.scope in scalafmt.key)should compile
scalafmt::test. Can you have a quick look at this line and tell me if my understanding is correct, that it's a scoped key? This is what I want to refer to:
inspect scalafmtTestOnCompiletells me
[info] Setting: Boolean = true
scalafmtOnCompileand it was set to true in a different file. sorry!
test in (resolvedScoped.value.scope in scalafmt.key)does the job. thank you!