sbt / sbt/sbt-eclipse

reloving dependencies from unneeded projects in depended builds

Open
#178 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 have a Build containing a Project that depends on another Project using ProjectRef from a different Build on Github that contains multiple Projects. The specific Project that I depend on is OK and has no unresolved dependencies so I can run the update and compile tasks without dependency errors. However, when I run the eclipse task, sbt is attempting to resolve dependencies from other projects I do not depend on in the same Build as the project I do depend on that happen to be broken, which leads to unresolved dependency errors and makes the eclipse task stop without producing the project files.

e.g.

 Build1 {
  val myProject = Project(...).dependsOn(ProjectRef(uri(...Build2Repo...), "dependedProject"))
}

then in the repo on github (not mine)

Build2 {
  val dependedProject = Project(...)
  val fooProject = Project(...).dependsOn(dependedProject)
  val barProject = Project(...).dependsOn(fooProject)
}

when I run eclipse task (but not update task) sbt is trying to resolve dependencies in fooProject and BarProject even though dependedProject does not depend on them and neither does my project.

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 described Build1/Build2 setup and compare the eclipse task with update and compile. Trace why eclipse resolves dependencies from unrelated projects such as fooProject and barProject; done when eclipse generates the project files while resolving only the dependedProject dependency graph.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.