Libraries marked as "provided' don't get their sources linked
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 712
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
Sbteclipse doesn't seem to handle dependencies used with the "provided" configuration correctly when using with-sources=true. These dependencies will correctly be included in the generated eclipse project, however, their source code will not be linked to the library in the Eclipse project. "compile" and (probably) "test" dependencies work fine. However, it looks like any other type of dependency won't.
I think that the problem is in the "externalDependencies()" method in sbteclipse-core/src/main/scala/com/typesafe/sbteclipse/core/Eclipse.scala. This function is called twice - once for the "compile" configuration and once for the "test" configuration. Libraries defined in those configurations have their sources linked fine (well, I didn't try the "test" configuration, but, I suspect it works). I'm guessing that the problem is either that this function should be called for more configurations or that they way its looking up the source dependencies isn't quite correct since its trying to look them up in the "compile" or "test" configuration, but the sources aren't available in those configurations (I guess that could also be a bug in core sbt or ivy, although, I don't know sbt internals well enough to know if it is).
A sample project that demonstrates this issue: https://github.com/DaGenix/eclipse-sources-provided-problem.git
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
Start with externalDependencies() in sbteclipse-core/src/main/scala/com/typesafe/sbteclipse/core/Eclipse.scala and reproduce the issue using the linked sample project. Compare source resolution for compile, test, and provided dependencies. Done means libraries using the provided configuration have their sources linked when with-sources=true, without breaking existing compile or test behavior.
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
- 38/100