sbt / sbt/sbt-eclipse

java.lang.IllegalStateException: Undefined setting 'eclipseSkipProject' (for RootProject)

Open
#304 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
712
Forks
163
PR merge metrics
No merged PRs in 30d

Description

I have been struggling with this bug for many hours. After migrating from Eclipse 2.3.0 to 4.0.0 (to use Play 2.4 instead of 2.3), I figured out that using RootProject prevent the eclipse plugin to work, although I explicitely asked him to discard the creation of the eclipse project for the rootProject. Can you please help me for that?

Setup
  • build.sbt
lazy val server = (project in file("server"))
   .settings(scalaVersion := "2.11.7")
  .dependsOn(leonProject)

lazy val leonProject = RootProject(uri("https://github.com/epfl-lara/leon.git#5bf8a57cc03ae5ccbd890e3f4f0121a6f9dd1bb2"))

EclipseKeys.skipProject in leonProject := true

EclipseKeys.preTasks := Seq(compile in Compile)
  • project/
    • plugins.sbt
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
  • build.properties
sbt.version=0.13.9

Then ,run

sbt eclipse

Expected

> eclipse
[info] About to create Eclipse project files for your project(s).
[info] Updating {file:/C:/Users/..../}server...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Successfully created Eclipse project files for project(s):
[info] server

Actual

> eclipse
[info] About to create Eclipse project files for your project(s).
java.lang.IllegalStateException: Undefined setting 'eclipseSkipProject in Scope(Select(ProjectRef(https://github.com/epfl-lara/leon.git#5bf8a57cc03ae5ccbd890e3f4f0121a6f9dd1bb2,root)),This,This,This)'!
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$setting$1.apply(Eclipse.scala:682)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$setting$1.apply(Eclipse.scala:682)
    at scala.Option.getOrElse(Option.scala:120)
    at com.typesafe.sbteclipse.core.Eclipse$.setting(Eclipse.scala:681)
    at com.typesafe.sbteclipse.core.Eclipse$.skip(Eclipse.scala:601)
    at com.typesafe.sbteclipse.core.Eclipse$.skip(Eclipse.scala:184)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$3.apply(Eclipse.scala:122)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$3.apply(Eclipse.scala:122)
    at scala.Option$WithFilter.map(Option.scala:206)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6.apply(Eclipse.scala:122)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6.apply(Eclipse.scala:121)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
    at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
    at com.typesafe.sbteclipse.core.Eclipse$.handleProjects(Eclipse.scala:121)
    at com.typesafe.sbteclipse.core.Eclipse$.action(Eclipse.scala:105)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:86)
    at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:86)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
    at sbt.Command$.process(Command.scala:92)
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
    at sbt.State$$anon$1.process(State.scala:184)
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.MainLoop$.next(MainLoop.scala:98)
    at sbt.MainLoop$.run(MainLoop.scala:91)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
    at sbt.Using.apply(Using.scala:24)
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
    at sbt.MainLoop$.runLogged(MainLoop.scala:24)
    at sbt.StandardMain$.runManaged(Main.scala:53)
    at sbt.xMain.run(Main.scala:28)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
    at xsbt.boot.Launch$.run(Launch.scala:57)
    at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
    at xsbt.boot.Launch$.launch(Launch.scala:65)
    at xsbt.boot.Launch$.apply(Launch.scala:16)
    at xsbt.boot.Boot$.runImpl(Boot.scala:32)
    at xsbt.boot.Boot$.main(Boot.scala:21)
    at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.IllegalStateException: Undefined setting 'eclipseSkipProject in Scope(Select(ProjectRef(https://github.com/epfl-lara/leon.git#5bf8a57cc03ae5ccbd890e3f4f0121a6f9dd1bb2,root)),This,This,This)'!
[error] Use 'last' for the full log.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the build.sbt, project/plugins.sbt, and build.properties setup, then run sbt eclipse. Read the sbteclipse stack-trace locations in Eclipse.scala, especially lines 601 and 682, and compare the handling of the RootProject with the expected result: Eclipse files are generated for server without the command failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.