Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-6660

REPL: load transitive dependencies of JARs on classpath

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: None
    • Component/s: Repl / Interpreter
    • Labels:
      None

      Description

      The Scala REPL should load dependencies referenced in MANIFEST.MF files of other JARs on the classpath.

      As described in https://support.typesafe.com/tickets/1585:

      We have JAR files that contain standard META-INF/MANIFEST.MF files with the Class-Path: entry. This entry points to a number of other JARs that should be loaded transitively by the ClassLoader. Unfortunately the REPL does not load these transitive dependencies, instead dependency JARs need to be placed on the classpath explicitly one by one.

      As an example let's say I have A.jar and B.jar. I also have a C.jar that has nothing else in it than a MANIFEST.MF with 'Class-Path: A.jar B.jar'. If I use

      > scala -classpath A.jar;B.jar

      everything is ok. I can e.g import A and import B. However, if I use

      > scala -classpath C.jar

      I couldn't import or use any classes from A.jar or B.jar.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              szeiger Stefan Zeiger
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: