Dependency Management in Scala: Now and Later
Mark Harrah
Typesafe
Manual dependency management
Automatic dependency management
Transitive/Conflict Resolution
demo 1.0
A 1.0
B 2.3
C 3.0
D 1.3
C 4.0
...
...
On-demand access and caching
Need metadata for org.example:A: 1.0
In cache?
Uptodate?
Exists?
<repo>/org/example/A/1.0/pom.xml
Download and cache.
Process and continue.
Yes
Yes
Yes
Fail. Cache failure
No
No
No
Motivation for something different
Metadata: Universes/Compatibility
Cross-versioning
Better Cross-versioning
Richer resolution configuration
demo:demo => org.example:demo
Extra metadata: main class
$ dz run org.example.HelloWorld
Getting org.example:hello-world:2.10.0 ...
Running HelloWorld...
Hello World!
Management and distribution
Proposal
Metadata repository
$ dz search http
net.databinder.dispatch:dispatch-core
0.9.5 (scalaVersion: 2.9.2, 2.10)
Metadata repository: DVCS
Version controlled metadata
org.example:demo:2.4
- dependsOn B 1.0
+ dependsOn B 1.1
Artifact repository
scalac -cp a6/32f978cc4/content A.scala
Metadata core
Metadata example
organization: | org.example |
name: | demo |
uniqueVersion | 2.11.0-20130208-134329-f1a342c |
commonVersion | 2.11.0 |
binaryVersion | 2.11 |
artifacts | 9823d8af32, a2ee3291ca (sources) |
provides | demo:demo |
apiURL | http://example.org/api/ |
mainClass | org.example.RunDemo |
dependsOn | org.example:core, org.example:util |
Flattened, simplified, ...
Compatibility
Opportunities
Conclusion