question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sbt 1.2.8 generates a synthetic configuration instead of failing

See original GitHub issue

steps

cd /tmp
mkdir sbt101
cd sbt101
touch build.sbt

Add the following content to the file

ThisBuild / version := "1.0"

lazy val db = project.settings(
  version := "2.0",
)

lazy val business = project.settings(
  version := "3.0"
)
  • Save and open up a terminal
  • Run the following command
sbt
  • When you are in sbt console, run the following commands
sbt:sbt101> business/version
[info] 3.0

sbt:sbt101> business:version
[info] business / Business / version
[info] 	3.0
[info] db / Business / version
[info] 	2.0
[info] Business / version
[info] 	1.0
sbt:sbt101>

sbt:sbt101> db/version
[info] 2.0
sbt:sbt101> db:version

[info] business / Db / version
[info] 	3.0
[info] db / Db / version
[info] 	2.0
[info] Db / version
[info] 	1.0
sbt:sbt101>

problem

  • The output from db/version do not match with db:version.
  • sbt generates a synthetic Configuration which does not exist. example? see Business and Db above

expectation

  • The outputs from db/version and db:version(and other commands alike) should have matched their outputs.
  • Instead of creating a synthetic Configuration, it should have failed. The current output leads to confusions (and may be wrong as well, can’t say for sure)

notes

  • Thanks to @dwijnand for the help on gitter chat and helping out on this issue.

sbt version: 1.2.8

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dwijnandcommented, May 7, 2019

Agreed.

1reaction
dwijnandcommented, May 7, 2019

No, “it should have failed” is what I expect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt Reference Manual — Combined Pages
sbt is a build tool for Scala, Java, and more. It requires Java 1.8 or later. Install. See Installing sbt for the setup...
Read more >
sbt/sbt - Gitter
Hi, I have a question regarding Per-configuration classpath dependencies between modules. I'm working on a project where there's different modules for web ...
Read more >
[1.3.0] sbt plugin does not work with 1.2.8 if plugin ... - GitHub
workaround by eed3si9n pluginCrossBuild / sbtVersion := "1.2.8" original report by xuwei-k steps sbt version: 1.3.0 ...
Read more >
Cannot build SBT project with Scala 2.12.8 - Stack Overflow
In IntelliJ, sbt configuration was set to JRE 1.8. I changed it to jdk 10 and finally project built. Share. Share a link...
Read more >
sbt Reference Manual — Combined Pages - Huihoo
Instead, the build definition creates a huge list of objects with type Setting[T] ... sbt 0.13.6 will try to reconstruct dependencies tree when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found