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

Type mismatch in full configuration #8

Closed
ghost opened this issue Jul 27, 2011 · 3 comments
Closed

Type mismatch in full configuration #8

ghost opened this issue Jul 27, 2011 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 27, 2011

Hi Eugene!

When I try to use sbt-assembly in a full configuration, I get this:

[error] /Users/psnively/vmware/git/vcib/vcaf-db/project/Build.scala:71: type mismatch;
[error] found : scala.Seq[sbt.Project.Setting[]]
[error] required: Seq[sbt.Project.Setting[
$1(in lazy value creation)]] where type _$1(in lazy value creation)
[error] Error occurred in an application involving default arguments.
[error] settings = buildSettings ++ Seq (libraryDependencies := commonDeps, resolvers := cseResolvers) ++ Seq (sbtassembly.Plugin.assemblySettings: _*)

I'm sure I'm being dense, but I don't see how those types don't match. :-)

Any thoughts?

Thanks!
Paul

@eed3si9n
Copy link
Member

The static type of sbtassembly.Plugin.assemblySettings is already Seq[sbt.Project.Setting[_]] and you're putting it in Seq again. I think.

@ghost
Copy link
Author

ghost commented Jul 27, 2011

I thought of that, too, but here's what I get when I remove the Seq():

[error] /Users/psnively/vmware/git/vcib/vcaf-db/project/Build.scala:71: type mismatch;
[error] found : scala.Seq[sbt.Project.Setting[_]]
[error] required: Seq[scala.collection.TraversableOnce[?]]
[error] Error occurred in an application involving default arguments.
[error] settings = buildSettings ++ Seq (libraryDependencies := commonDeps, resolvers := cseResolvers) ++ (sbtassembly.Plugin.assemblySettings: _*)

To me, this is still just bizarre: it's as if there are two different kinds of Seq's being talked about. Does that make any sense?

@eed3si9n
Copy link
Member

I think you have to delay the set up by using settings method. The following worked for me:

import sbt._
import Keys._

object FooBuild extends Build {
  lazy val root = Project("root", file(".")) aggregate(cli)
  lazy val cli = Project("cli", file("cli")) settings(sbtassembly.Plugin.assemblySettings: _*)

  override lazy val settings = super.settings ++ Seq(
    version := "0.1-SNAPSHOT",
    organization := "com.example"
  )    
}

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