Skip to content
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

name setting will take from the versioned project not from cross project if using Defaults.coreDefaultSettings #16

Open
LBsh opened this issue Jul 2, 2020 · 0 comments

Comments

@LBsh
Copy link

LBsh commented Jul 2, 2020

Note I had a different result than #4

Let's say I have the following:

lazy val somename := Project("someone", file("somefile")).settings(
  //...
).cross

lazy val somename_2_11 = somename("2.11.8")
lazy val somename_2_12 = somename("2.12.1")

AND if you have set

override val projectSettings = Defaults.coreDefaultSettings

Then in sbt:

> somename-2_11/name
[info] somename-2_11

This seems to be due to this in the default settings:

def projectCore: Seq[Setting[_]] = Seq(
    name := thisProject.value.id,
    logManager := LogManager.defaults(extraLoggers.value, StandardMain.console),
    onLoadMessage := (onLoadMessage or
      Def.setting {
        s"Set current project to ${name.value} (in build ${thisProjectRef.value.build})"
      }).value
  )

If you have publish settings, this might also fail at compile time because it tried to download
https://packages.confluent.io/maven/com/etsy/somename_2_11_2.12/0.0.1-SNAPSHOT/somename_2_11_2.12-0.0.1-SNAPSHOT.pom
and https://packages.confluent.io/maven/com/etsy/somename_2_11_2.12/0.0.1-SNAPSHOT/somename_2_12_2.11-0.0.1-SNAPSHOT.pom

where I expect this to be somename_2.12-0.0.1-SNAPSHOT.pom and somename_2.11-0.0.1-SNAPSHOT.pom

This is my publish settings:

  val publishingSettings = Seq(
    // ...
    publishTo := getPublishTarget(version.value)
  )

I'm using sbt.version = 1.3.8

So I think sbt-cross should always overwrite that project name settings to avoid surprises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant