Can't use EclipseKeys unqualified when using sbteclipse is global plugin
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 712
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
I have installed sbteclipse as a global plugin (since in most of my builds nothing depends on it). I have some configuration for it in ~/.sbt/0.13/sbteclipse.sbt, that uses EclipseKeys unqualified. When I switched from 2.5.0 to 4.0.0, I needed to add an import there for EclipseKeys. This is not needed if I place the setting in build.sbt, whether the plugin is installed locally or globally. This is also not needed with sbteclipse 2.5.0 (I rechecked) or 3.0.0.
Relevant settings from ~/.sbt/0.13/plugins/plugins.sbt:
resolvers ++= Seq(
Classpaths.typesafeResolver,
Classpaths.sbtPluginReleases,
Opts.resolver.sonatypeReleases
)
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
and from ~/.sbt/0.13/sbteclipse.sbt:
import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys //** REQUIRED**, but shouldn't be.
EclipseKeys.withSource in ThisBuild := true
Actual error without the import:
/Users/pgiarrusso/.sbt/0.13/sbteclipse.sbt:2: error: not found: value EclipseKeys
EclipseKeys.withSource in ThisBuild := true
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
With the import, output of sbt about:
[info] Loading global plugins from /Users/pgiarrusso/.sbt/0.13/plugins
[info] Loading project definition from /Users/pgiarrusso/AeroFS/Repos/chess-bluevelvet/project
[info] Set current project to chess (in build file:/Users/pgiarrusso/AeroFS/Repos/chess-bluevelvet/)
> about
[info] This is sbt 0.13.8
[info] The current project is {file:/Users/pgiarrusso/AeroFS/Repos/chess-bluevelvet/}chess-bluevelvet 0.1-SNAPSHOT
[info] The current project is built against Scala 2.11.6
[info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, growl.GrowlingTests, com.orrsella.sbtsound.SbtSound, np.Plugin, org.sbtidea.SbtIdeaPlugin, com.typesafe.sbteclipse.plugin.EclipsePlugin, org.ensime.sbt.Plugin, ls.Plugin, com.typesafe.sbt.SbtStartScript, sbtman.Plugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the global plugin configuration in ~/.sbt/0.13/plugins/plugins.sbt and ~/.sbt/0.13/sbteclipse.sbt, using sbteclipse 4.0.0 and sbt 0.13.8. Compare global and build.sbt loading, then verify that EclipseKeys.withSource in ThisBuild works without an import in the global configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100