A relaxed chat room about sbt (the interactive build tool). Also good for sbt help: Stack Overflow, or Lightbend subscription. https://www.scala-sbt.org/support.html has advice on where to go.
eed3si9n on 0.13
Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 3 more (compare)
eed3si9n on fixbuild
eed3si9n on fixbuild
Fix typo (compare)
eed3si9n on fixbuild
Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 1 more (compare)
eed3si9n on scalaversionbump
eed3si9n on 0.13
Bumping up Scala version to 2.1… Try to keep bincompat Fixes #1666 and 1 more (compare)
eed3si9n on scalaversionbump
Fixes #1666 (compare)
How can I refer to a scoped key programmatically? I.e. what is the programmatic equivalent of e.g. scalafmt::test
?
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 scalafmt
, not scalafmt::test
.
if (scalafmtOnCompile.value) scalafmt in resolvedScoped.value.scope
else if (scalafmtTestOnCompile.value) (test in scalafmt) in resolvedScoped.value.scope
scalafmt
task scope, that's the scope of test
that I want to use"
scalafmt
, not 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:test in (resolvedScoped.value.scope in scalafmt.key)
does the job. thank you!
Hi everyone, i have a custom resolver in my build.sbt file that's not challenged when resolving dependencies, these are my revolvers
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
,Resolver.sonatypeRepo("releases")
,Resolver.typesafeRepo("releases")
,"spray repo" at "http://repo.spray.io"
,"SpinGo OSS" at "http://spingo-oss.s3.amazonaws.com/repositories/releases"
)
and this is the warning i get :
[info] Resolving com.spingo#op-rabbit-core_2.11;1.2.1 ...
[warn] module not found: com.spingo#op-rabbit-core_2.11;1.2.1
[warn] ==== local: tried
[warn] /root/.ivy2/local/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn] /root/.sbt/preloaded/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////root/.sbt/preloaded/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom
i tried both sbt 13.8 and 13.15 and got the same result, do you guys have any idea about this? thanks for your help
are multi-module projects always configured from the root?
I want to have a multi-module SBT project where the SBT modules are also git submodules with their own build.sbt's, that can be built as stand-alone projects when cloned by themselves / separately from the any multi-module context.
The root project build configs would describe tasks related to interactions between the modules: rebuilding modules that depend on other modules, etc., but without repeating module-specific configurations that already exist in each module's build configs.
Can a root project play nicely with modules' existing SBT configs?
some larger context is that i feel that with appropriate build- and VCS- tooling a person should be able to have the best of both of the {mono,poly}-repo worlds: upgrading a bunch of inter-connected components in lockstep when that is desired (e.g. a single commit to an umbrella repo that upgrades the submodule SHAs of its submodule-repos) while still letting the component projects exist and be developed/forked in a standalone way.
git submodules basically do exactly what is needed here on the VCS front, and i'm trying to figure out whether I can get SBT to handle it as well. it seems philosophically aligned with SBT's whole "recursive project definitions" design, but afaict ppl don't use it this way and current SBT may not make this feasible