Skip to content

stagingDirectory key conflicts with sbt 1.11.0 #1699

@mrdziuban

Description

@mrdziuban

I'm not really sure if this should be reported here or to sbt itself, but when upgrading to sbt 1.11.0 with a build.sbt that refers to the stagingDirectory I get this error:

/path/to-/my-project/build.sbt:564: error: reference to stagingDirectory is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._
and import _root_.sbt.Keys._
      val stagingDir = (Docker / stagingDirectory).value

It's simple to work around but I figured I'd report it anyway. For now I'm just importing sbt-native-packager's version as an alias, e.g.

import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.{stagingDirectory => pkgStagingDirectory}
// or equivalently
import com.typesafe.sbt.packager.Keys.{stagingDirectory => pkgStagingDirectory}

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