sbt / sbt/sbt-eclipse

Doesn't see managedSources unless explicitly invoked

Open
#350 0 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'm using the SBT protobuf plugin together with sbteclipse, on SBT 1.0.1.

addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % "0.6.3")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")

Now it seems that sbteclipse doesn't "see" the extra managedSources that .enablePlugins(ProtobufPlugin) puts into a project configuration, unless that's explicitly invoked before running eclipse.

In other words, in a clean workspace, sbt eclipse will generate a correct .classpath. But running it again will not have the src_managed generated protobuf sources in it. Touching a .proto file, opening the SBT console, and typing compile and then eclipse will once more yield the correct result.

I stumbled onto this when doing an SBT 1.0 upgrade... I'm unsure whether this worked before, or whether I'm just missing something extra in my project. I'd expect that managedSources is interrogated by sbt eclipse before generating the .classpath though, so I don't know what's up.

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

Reproduce the issue in a clean workspace with sbt 1.0.1, sbt-protobuf 0.6.3, and sbteclipse 5.2.2 by running sbt eclipse repeatedly, then compare the generated .classpath. Start by tracing how sbteclipse reads managedSources; done means repeated eclipse runs include the generated src_managed protobuf sources without a prior compile.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.